Skip to content

Commit

Permalink
[PATCH] Make <linux/personality.h> userspace proof
Browse files Browse the repository at this point in the history
<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>
  • Loading branch information
Ralf Baechle authored and Linus Torvalds committed Oct 20, 2006
1 parent 3fcfab1 commit 34e856e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/personality.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _LINUX_PERSONALITY_H
#define _LINUX_PERSONALITY_H

#ifdef __KERNEL__

/*
* Handling of different ABIs (personalities).
*/
Expand All @@ -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.
*
Expand Down Expand Up @@ -71,6 +75,7 @@ enum {
PER_MASK = 0x00ff,
};

#ifdef __KERNEL__

/*
* Description of an execution domain.
Expand Down Expand Up @@ -111,4 +116,6 @@ struct exec_domain {
#define set_personality(pers) \
((current->personality == pers) ? 0 : __set_personality(pers))

#endif /* __KERNEL__ */

#endif /* _LINUX_PERSONALITY_H */

0 comments on commit 34e856e

Please sign in to comment.