From: Ralf Baechle <ralf@linux-mips.org>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] Make <linux/personality.h> userspace proof
Date: Tue, 17 Oct 2006 16:55:26 +0100 [thread overview]
Message-ID: <20061017155526.GA9888@linux-mips.org> (raw)
<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>
---
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 80d780e..bf4cf20 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
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 @@ #define get_personality (current->perso
#define set_personality(pers) \
((current->personality == pers) ? 0 : __set_personality(pers))
+#endif /* __KERNEL__ */
+
#endif /* _LINUX_PERSONALITY_H */
next reply other threads:[~2006-10-17 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-17 15:55 Ralf Baechle [this message]
2006-10-18 10:24 ` [PATCH] Make <linux/personality.h> userspace proof Christoph Hellwig
2006-10-18 10:32 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061017155526.GA9888@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.