summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-10-20 10:28:17 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-20 21:26:35 +0400
commit34e856e6a522a8fc0feba7497f5b05aeaa13d473 (patch)
treea6b0199f4f7a2e36ca4a8ff851b93b633344eea1
parent3fcfab16c5b86eaa3db3a9a31adba550c5b67141 (diff)
downloadlinux-34e856e6a522a8fc0feba7497f5b05aeaa13d473.tar.xz
[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>
-rw-r--r--include/linux/personality.h7
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 @@
#ifndef _LINUX_PERSONALITY_H
#define _LINUX_PERSONALITY_H
+#ifdef __KERNEL__
+
/*
* Handling of different ABIs (personalities).
*/
@@ -12,6 +14,8 @@ extern int register_exec_domain(struct exec_domain *);
extern int unregister_exec_domain(struct exec_domain *);
extern int __set_personality(unsigned long);
+#endif /* __KERNEL__ */
+
/*
* Flags for bug emulation.
*
@@ -71,6 +75,7 @@ enum {
PER_MASK = 0x00ff,
};
+#ifdef __KERNEL__
/*
* Description of an execution domain.
@@ -111,4 +116,6 @@ struct exec_domain {
#define set_personality(pers) \
((current->personality == pers) ? 0 : __set_personality(pers))
+#endif /* __KERNEL__ */
+
#endif /* _LINUX_PERSONALITY_H */