diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-30 07:31:01 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:31:01 -0500 |
commit | e39c2891415b3b5c7381ece06bb45b3c7bdd4342 (patch) | |
tree | 3435399f56e21260ffb607d19d079bd5a8b67981 /arch/x86 | |
parent | d52e9d690fff1fd9d0ccffe375fd01b700f82a64 (diff) |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index fed83d066135..b71226d653ed 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -32,10 +32,15 @@ | |||
32 | 32 | ||
33 | /* | 33 | /* |
34 | * Determines which flags the user has access to [1 = access, 0 = no access]. | 34 | * Determines which flags the user has access to [1 = access, 0 = no access]. |
35 | * Prohibits changing ID(21), VIP(20), VIF(19), VM(17), NT(14), IOPL(12-13), IF(9). | ||
36 | * Also masks reserved bits (31-22, 15, 5, 3, 1). | ||
37 | */ | 35 | */ |
38 | #define FLAG_MASK 0x00050dd5 | 36 | #define FLAG_MASK_32 ((unsigned long) \ |
37 | (X86_EFLAGS_CF | X86_EFLAGS_PF | \ | ||
38 | X86_EFLAGS_AF | X86_EFLAGS_ZF | \ | ||
39 | X86_EFLAGS_SF | X86_EFLAGS_TF | \ | ||
40 | X86_EFLAGS_DF | X86_EFLAGS_OF | \ | ||
41 | X86_EFLAGS_RF | X86_EFLAGS_AC)) | ||
42 | |||
43 | #define FLAG_MASK FLAG_MASK_32 | ||
39 | 44 | ||
40 | static long *pt_regs_access(struct pt_regs *regs, unsigned long regno) | 45 | static long *pt_regs_access(struct pt_regs *regs, unsigned long regno) |
41 | { | 46 | { |