Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
HardenedBSD
HardenedBSD
Commits
ff88dbee
Commit
ff88dbee
authored
Jan 10, 2022
by
HardenedBSD Sync Service
Browse files
Merge branch 'freebsd/current/main' into hardened/current/master
parents
69a1fbc6
ae13829d
Changes
1
Show whitespace changes
Inline
Side-by-side
sys/vm/vm_extern.h
View file @
ff88dbee
...
...
@@ -140,6 +140,11 @@ u_int vm_wait_count(void);
static
inline
bool
vm_addr_align_ok
(
vm_paddr_t
pa
,
u_long
alignment
)
{
#ifdef INVARIANTS
if
(
!
powerof2
(
alignment
))
panic
(
"%s: alignment is not a power of 2: %#lx"
,
__func__
,
alignment
);
#endif
return
((
pa
&
(
alignment
-
1
))
==
0
);
}
...
...
@@ -150,6 +155,11 @@ vm_addr_align_ok(vm_paddr_t pa, u_long alignment)
static
inline
bool
vm_addr_bound_ok
(
vm_paddr_t
pa
,
vm_paddr_t
size
,
vm_paddr_t
boundary
)
{
#ifdef INVARIANTS
if
(
!
powerof2
(
boundary
))
panic
(
"%s: boundary is not a power of 2: %#jx"
,
__func__
,
(
uintmax_t
)
boundary
);
#endif
return
(((
pa
^
(
pa
+
size
-
1
))
&
-
boundary
)
==
0
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment