Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102639333
D30898.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D30898.diff
View Options
diff --git a/sys/kern/kern_sharedpage.c b/sys/kern/kern_sharedpage.c
--- a/sys/kern/kern_sharedpage.c
+++ b/sys/kern/kern_sharedpage.c
@@ -308,27 +308,43 @@
#ifdef RANDOM_FENESTRASX
ptrdiff_t base;
#endif
+ u_int flags;
sv = (struct sysentvec *)param;
- if ((sv->sv_flags & SV_SHP) == 0)
+ flags = sv->sv_flags;
+ if ((flags & SV_SHP) == 0)
return;
+ MPASS(sv->sv_shared_page_obj == NULL);
+ MPASS(sv->sv_shared_page_base != 0);
+
sv->sv_shared_page_obj = shared_page_obj;
- sv->sv_sigcode_base = sv->sv_shared_page_base +
- shared_page_fill(*(sv->sv_szsigcode), 16, sv->sv_sigcode);
- if ((sv->sv_flags & SV_ABI_MASK) != SV_ABI_FREEBSD)
- return;
- if ((sv->sv_flags & SV_TIMEKEEP) != 0) {
+ if ((flags & SV_ABI_MASK) == SV_ABI_FREEBSD) {
+ sv->sv_sigcode_base = sv->sv_shared_page_base +
+ shared_page_fill(*(sv->sv_szsigcode), 16, sv->sv_sigcode);
+ }
+ if ((flags & SV_TIMEKEEP) != 0) {
#ifdef COMPAT_FREEBSD32
- if ((sv->sv_flags & SV_ILP32) != 0) {
- KASSERT(compat32_svtk == NULL,
- ("Compat32 already registered"));
- compat32_svtk = alloc_sv_tk_compat32();
+ if ((flags & SV_ILP32) != 0) {
+ if ((flags & SV_ABI_MASK) == SV_ABI_FREEBSD) {
+ KASSERT(compat32_svtk == NULL,
+ ("Compat32 already registered"));
+ compat32_svtk = alloc_sv_tk_compat32();
+ } else {
+ KASSERT(compat32_svtk != NULL,
+ ("Compat32 not registered"));
+ }
sv->sv_timekeep_base = sv->sv_shared_page_base +
compat32_svtk->sv_timekeep_off;
} else {
#endif
- KASSERT(host_svtk == NULL, ("Host already registered"));
- host_svtk = alloc_sv_tk();
+ if ((flags & SV_ABI_MASK) == SV_ABI_FREEBSD) {
+ KASSERT(host_svtk == NULL,
+ ("Host already registered"));
+ host_svtk = alloc_sv_tk();
+ } else {
+ KASSERT(host_svtk != NULL,
+ ("Host not registered"));
+ }
sv->sv_timekeep_base = sv->sv_shared_page_base +
host_svtk->sv_timekeep_off;
#ifdef COMPAT_FREEBSD32
@@ -336,7 +352,8 @@
#endif
}
#ifdef RANDOM_FENESTRASX
- if ((sv->sv_flags & SV_RNG_SEED_VER) != 0) {
+ if ((flags & (SV_ABI_MASK | SV_RNG_SEED_VER)) ==
+ (SV_ABI_FREEBSD | SV_RNG_SEED_VER)) {
/*
* Only allocate a single VDSO entry for multiple sysentvecs,
* i.e., native and COMPAT32.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 4:51 AM (21 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14653367
Default Alt Text
D30898.diff (2 KB)
Attached To
Mode
D30898: Add exec_sysvec_init_abi() to setup non native sysentvecs.
Attached
Detach File
Event Timeline
Log In to Comment