11 #include <linux/kernel.h>
13 #include <linux/module.h>
14 #include <linux/personality.h>
16 #include <linux/sched.h>
19 #include <linux/sysctl.h>
20 #include <linux/types.h>
24 static void default_handler(
int,
struct pt_regs *);
30 static unsigned long ident_map[32] = {
31 0, 1, 2, 3, 4, 5, 6, 7,
32 8, 9, 10, 11, 12, 13, 14, 15,
33 16, 17, 18, 19, 20, 21, 22, 23,
34 24, 25, 26, 27, 28, 29, 30, 31
39 .handler = default_handler,
42 .signal_map = ident_map,
43 .signal_invmap = ident_map,
65 for (ep = exec_domains; ep; ep = ep->
next) {
67 if (try_module_get(ep->
module))
73 request_module(
"personality-%d", pers);
76 for (ep = exec_domains; ep; ep = ep->
next) {
77 if (pers >= ep->
pers_low && pers <= ep->pers_high)
78 if (try_module_get(ep->
module))
102 for (tmp = exec_domains;
tmp; tmp = tmp->
next) {
107 ep->
next = exec_domains;
123 for (epp = &exec_domains; *epp; epp = &(*epp)->
next) {
148 #ifdef CONFIG_PROC_FS
149 static int execdomains_proc_show(
struct seq_file *
m,
void *
v)
154 for (ep = exec_domains; ep; ep = ep->
next)
168 .
open = execdomains_proc_open,
174 static int __init proc_execdomains_init(
void)
176 proc_create(
"execdomains", 0,
NULL, &execdomains_proc_fops);
184 unsigned int old =
current->personality;
186 if (personality != 0xffffffff)