summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-01-30 13:31:01 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:01 +0100
commite39c2891415b3b5c7381ece06bb45b3c7bdd4342 (patch)
tree3435399f56e21260ffb607d19d079bd5a8b67981 /arch/x86
parentd52e9d690fff1fd9d0ccffe375fd01b700f82a64 (diff)
downloadop-kernel-dev-e39c2891415b3b5c7381ece06bb45b3c7bdd4342.zip
op-kernel-dev-e39c2891415b3b5c7381ece06bb45b3c7bdd4342.tar.gz
x86: ptrace FLAG_MASK cleanup
This cleans up the FLAG_MASK macro to use symbolic constants instead of a magic number. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/ptrace.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index fed83d0..b71226d 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -32,10 +32,15 @@
/*
* Determines which flags the user has access to [1 = access, 0 = no access].
- * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), NT(14), IOPL(12-13), IF(9).
- * Also masks reserved bits (31-22, 15, 5, 3, 1).
*/
-#define FLAG_MASK 0x00050dd5
+#define FLAG_MASK_32 ((unsigned long) \
+ (X86_EFLAGS_CF | X86_EFLAGS_PF | \
+ X86_EFLAGS_AF | X86_EFLAGS_ZF | \
+ X86_EFLAGS_SF | X86_EFLAGS_TF | \
+ X86_EFLAGS_DF | X86_EFLAGS_OF | \
+ X86_EFLAGS_RF | X86_EFLAGS_AC))
+
+#define FLAG_MASK FLAG_MASK_32
static long *pt_regs_access(struct pt_regs *regs, unsigned long regno)
{
OpenPOWER on IntegriCloud