diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-10-20 02:28:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:35 -0400 |
commit | 34e856e6a522a8fc0feba7497f5b05aeaa13d473 (patch) | |
tree | a6b0199f4f7a2e36ca4a8ff851b93b633344eea1 /include | |
parent | 3fcfab16c5b86eaa3db3a9a31adba550c5b67141 (diff) |
[PATCH] Make <linux/personality.h> userspace proof
<linux/personality.h> contains the constants for personality(2) but also
some defintions that are useless or even harmful in userspace such as the
personality() macro.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/personality.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/personality.h b/include/linux/personality.h index 80d780e5a8f5..bf4cf2080e5c 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h | |||
@@ -1,6 +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__ | ||
5 | |||
4 | /* | 6 | /* |
5 | * Handling of different ABIs (personalities). | 7 | * Handling of different ABIs (personalities). |
6 | */ | 8 | */ |
@@ -12,6 +14,8 @@ extern int register_exec_domain(struct exec_domain *); | |||
12 | extern int unregister_exec_domain(struct exec_domain *); | 14 | extern int unregister_exec_domain(struct exec_domain *); |
13 | extern int __set_personality(unsigned long); | 15 | extern int __set_personality(unsigned long); |
14 | 16 | ||
17 | #endif /* __KERNEL__ */ | ||
18 | |||
15 | /* | 19 | /* |
16 | * Flags for bug emulation. | 20 | * Flags for bug emulation. |
17 | * | 21 | * |
@@ -71,6 +75,7 @@ enum { | |||
71 | PER_MASK = 0x00ff, | 75 | PER_MASK = 0x00ff, |
72 | }; | 76 | }; |
73 | 77 | ||
78 | #ifdef __KERNEL__ | ||
74 | 79 | ||
75 | /* | 80 | /* |
76 | * Description of an execution domain. | 81 | * Description of an execution domain. |
@@ -111,4 +116,6 @@ struct exec_domain { | |||
111 | #define set_personality(pers) \ | 116 | #define set_personality(pers) \ |
112 | ((current->personality == pers) ? 0 : __set_personality(pers)) | 117 | ((current->personality == pers) ? 0 : __set_personality(pers)) |
113 | 118 | ||
119 | #endif /* __KERNEL__ */ | ||
120 | |||
114 | #endif /* _LINUX_PERSONALITY_H */ | 121 | #endif /* _LINUX_PERSONALITY_H */ |