diff options
Diffstat (limited to 'include/linux/personality.h')
-rw-r--r-- | include/linux/personality.h | 71 |
1 files changed, 2 insertions, 69 deletions
diff --git a/include/linux/personality.h b/include/linux/personality.h index 8fc7dd1a57ff..646c0a7d50fa 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #ifndef _LINUX_PERSONALITY_H | 1 | #ifndef _LINUX_PERSONALITY_H |
2 | #define _LINUX_PERSONALITY_H | 2 | #define _LINUX_PERSONALITY_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <uapi/linux/personality.h> |
5 | |||
5 | 6 | ||
6 | /* | 7 | /* |
7 | * Handling of different ABIs (personalities). | 8 | * Handling of different ABIs (personalities). |
@@ -14,72 +15,6 @@ extern int register_exec_domain(struct exec_domain *); | |||
14 | extern int unregister_exec_domain(struct exec_domain *); | 15 | extern int unregister_exec_domain(struct exec_domain *); |
15 | extern int __set_personality(unsigned int); | 16 | extern int __set_personality(unsigned int); |
16 | 17 | ||
17 | #endif /* __KERNEL__ */ | ||
18 | |||
19 | /* | ||
20 | * Flags for bug emulation. | ||
21 | * | ||
22 | * These occupy the top three bytes. | ||
23 | */ | ||
24 | enum { | ||
25 | UNAME26 = 0x0020000, | ||
26 | ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */ | ||
27 | FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors | ||
28 | * (signal handling) | ||
29 | */ | ||
30 | MMAP_PAGE_ZERO = 0x0100000, | ||
31 | ADDR_COMPAT_LAYOUT = 0x0200000, | ||
32 | READ_IMPLIES_EXEC = 0x0400000, | ||
33 | ADDR_LIMIT_32BIT = 0x0800000, | ||
34 | SHORT_INODE = 0x1000000, | ||
35 | WHOLE_SECONDS = 0x2000000, | ||
36 | STICKY_TIMEOUTS = 0x4000000, | ||
37 | ADDR_LIMIT_3GB = 0x8000000, | ||
38 | }; | ||
39 | |||
40 | /* | ||
41 | * Security-relevant compatibility flags that must be | ||
42 | * cleared upon setuid or setgid exec: | ||
43 | */ | ||
44 | #define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC | \ | ||
45 | ADDR_NO_RANDOMIZE | \ | ||
46 | ADDR_COMPAT_LAYOUT | \ | ||
47 | MMAP_PAGE_ZERO) | ||
48 | |||
49 | /* | ||
50 | * Personality types. | ||
51 | * | ||
52 | * These go in the low byte. Avoid using the top bit, it will | ||
53 | * conflict with error returns. | ||
54 | */ | ||
55 | enum { | ||
56 | PER_LINUX = 0x0000, | ||
57 | PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT, | ||
58 | PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, | ||
59 | PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, | ||
60 | PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE, | ||
61 | PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS | | ||
62 | WHOLE_SECONDS | SHORT_INODE, | ||
63 | PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS, | ||
64 | PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE, | ||
65 | PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS, | ||
66 | PER_BSD = 0x0006, | ||
67 | PER_SUNOS = 0x0006 | STICKY_TIMEOUTS, | ||
68 | PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE, | ||
69 | PER_LINUX32 = 0x0008, | ||
70 | PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB, | ||
71 | PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS,/* IRIX5 32-bit */ | ||
72 | PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS,/* IRIX6 new 32-bit */ | ||
73 | PER_IRIX64 = 0x000b | STICKY_TIMEOUTS,/* IRIX6 64-bit */ | ||
74 | PER_RISCOS = 0x000c, | ||
75 | PER_SOLARIS = 0x000d | STICKY_TIMEOUTS, | ||
76 | PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, | ||
77 | PER_OSF4 = 0x000f, /* OSF/1 v4 */ | ||
78 | PER_HPUX = 0x0010, | ||
79 | PER_MASK = 0x00ff, | ||
80 | }; | ||
81 | |||
82 | #ifdef __KERNEL__ | ||
83 | 18 | ||
84 | /* | 19 | /* |
85 | * Description of an execution domain. | 20 | * Description of an execution domain. |
@@ -116,6 +51,4 @@ struct exec_domain { | |||
116 | #define set_personality(pers) \ | 51 | #define set_personality(pers) \ |
117 | ((current->personality == (pers)) ? 0 : __set_personality(pers)) | 52 | ((current->personality == (pers)) ? 0 : __set_personality(pers)) |
118 | 53 | ||
119 | #endif /* __KERNEL__ */ | ||
120 | |||
121 | #endif /* _LINUX_PERSONALITY_H */ | 54 | #endif /* _LINUX_PERSONALITY_H */ |