diff options
-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 fed83d06613..b71226d653e 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 | { |