Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110741420
D40299.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
D40299.diff
View Options
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -447,6 +447,30 @@
sysctl_kern_securelvl, "I",
"Current secure level");
+static int
+sysctl_kern_fallback_elf_brand(SYSCTL_HANDLER_ARGS)
+{
+ struct prison *pr;
+ int error, fallback_elf_brand;
+
+ pr = req->td->td_ucred->cr_prison;
+ fallback_elf_brand = pr->pr_elf_fallback_brand;
+ error = sysctl_handle_int(oidp, &fallback_elf_brand, 0, req);
+ if (error || !req->newptr)
+ return (error);
+ sx_slock(&allprison_lock);
+ mtx_lock(&pr->pr_mtx);
+ pr->pr_elf_fallback_brand = fallback_elf_brand;
+ mtx_unlock(&pr->pr_mtx);
+ sx_sunlock(&allprison_lock);
+ return (error);
+}
+
+SYSCTL_PROC(_kern, OID_AUTO, fallback_elf_brand,
+ CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, 0, 0,
+ sysctl_kern_fallback_elf_brand, "I",
+ "Current ELF ABI fallback brand");
+
#ifdef INCLUDE_CONFIG_FILE
/* Actual kernel configuration options. */
extern char kernconfstring[];
@@ -736,10 +760,3 @@
const int pcb_size = sizeof(struct pcb);
SYSCTL_INT(_debug_sizeof, OID_AUTO, pcb, CTLFLAG_RD,
SYSCTL_NULL_INT_PTR, sizeof(struct pcb), "sizeof(struct pcb)");
-
-/* XXX compatibility, remove for 6.0 */
-#include <sys/imgact.h>
-#include <sys/imgact_elf.h>
-SYSCTL_INT(_kern, OID_AUTO, fallback_elf_brand, CTLFLAG_RW,
- &__elfN(fallback_brand), sizeof(__elfN(fallback_brand)),
- "compatibility for kern.fallback_elf_brand");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 23, 1:30 PM (5 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16797892
Default Alt Text
D40299.diff (1 KB)
Attached To
Mode
D40299: Tie kern.fallback_elf_brand to the fallback elf brand of the current prison
Attached
Detach File
Event Timeline
Log In to Comment