Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108210796
D40266.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40266.diff
View Options
diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c
--- a/sys/cddl/dev/kinst/trampoline.c
+++ b/sys/cddl/dev/kinst/trampoline.c
@@ -68,15 +68,22 @@
sx_assert(&kinst_tramp_sx, SX_XLOCKED);
+#ifdef __amd64__
/*
- * Allocate virtual memory for the trampoline chunk. The returned
- * address is saved in "trampaddr". To simplify population of
- * trampolines, we follow the amd64 kernel's code model and allocate
- * them above KERNBASE, i.e., in the top 2GB of the kernel's virtual
- * address space. Trampolines must be executable so max_prot must
- * include VM_PROT_EXECUTE.
+ * To simplify population of trampolines, we follow the amd64 kernel's
+ * code model and allocate them above KERNBASE, i.e., in the top 2GB of
+ * the kernel's virtual address space (not the case for other
+ * platforms).
*/
trampaddr = KERNBASE;
+#else
+ trampaddr = VM_MIN_KERNEL_ADDRESS;
+#endif
+ /*
+ * Allocate virtual memory for the trampoline chunk. The returned
+ * address is saved in "trampaddr". Trampolines must be executable so
+ * max_prot must include VM_PROT_EXECUTE.
+ */
error = vm_map_find(kernel_map, NULL, 0, &trampaddr,
KINST_TRAMPCHUNK_SIZE, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL,
0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 23, 4:53 PM (21 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16058888
Default Alt Text
D40266.diff (1 KB)
Attached To
Mode
D40266: kinst: be explicit about trampoline placement
Attached
Detach File
Event Timeline
Log In to Comment