From 194cf787ea668b44ffd0f3c026ff0c2be0f88846 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 30 Jan 2008 13:30:48 +0100 Subject: [PATCH] --- yaml --- r: 79866 b: refs/heads/master c: 77c03dcd448aa4c7be45f4edb97381ef463e3911 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/ptrace_32.c | 9 +++------ trunk/arch/x86/kernel/ptrace_64.c | 9 +++------ 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index ec966257a624..fe4a7175022d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2608a6584a0a32d3251dfafad31d9f8b2c784466 +refs/heads/master: 77c03dcd448aa4c7be45f4edb97381ef463e3911 diff --git a/trunk/arch/x86/kernel/ptrace_32.c b/trunk/arch/x86/kernel/ptrace_32.c index 09227cfb7c4c..4619bda470b6 100644 --- a/trunk/arch/x86/kernel/ptrace_32.c +++ b/trunk/arch/x86/kernel/ptrace_32.c @@ -37,9 +37,6 @@ */ #define FLAG_MASK 0x00050dd5 -/* set's the trap flag. */ -#define TRAP_FLAG 0x100 - /* * Offset of eflags on child stack.. */ @@ -235,11 +232,11 @@ static void set_singlestep(struct task_struct *child) /* * If TF was already set, don't do anything else */ - if (regs->eflags & TRAP_FLAG) + if (regs->eflags & X86_EFLAGS_TF) return; /* Set TF on the kernel stack.. */ - regs->eflags |= TRAP_FLAG; + regs->eflags |= X86_EFLAGS_TF; /* * ..but if TF is changed by the instruction we will trace, @@ -260,7 +257,7 @@ static void clear_singlestep(struct task_struct *child) /* But touch TF only if it was set by us.. */ if (child->ptrace & PT_DTRACE) { struct pt_regs *regs = get_child_regs(child); - regs->eflags &= ~TRAP_FLAG; + regs->eflags &= ~X86_EFLAGS_TF; child->ptrace &= ~PT_DTRACE; } } diff --git a/trunk/arch/x86/kernel/ptrace_64.c b/trunk/arch/x86/kernel/ptrace_64.c index 375fadc23a25..8e433b3773d2 100644 --- a/trunk/arch/x86/kernel/ptrace_64.c +++ b/trunk/arch/x86/kernel/ptrace_64.c @@ -42,9 +42,6 @@ */ #define FLAG_MASK 0x54dd5UL -/* set's the trap flag. */ -#define TRAP_FLAG 0x100UL - /* * eflags and offset of eflags on child stack.. */ @@ -187,11 +184,11 @@ static void set_singlestep(struct task_struct *child) /* * If TF was already set, don't do anything else */ - if (regs->eflags & TRAP_FLAG) + if (regs->eflags & X86_EFLAGS_TF) return; /* Set TF on the kernel stack.. */ - regs->eflags |= TRAP_FLAG; + regs->eflags |= X86_EFLAGS_TF; /* * ..but if TF is changed by the instruction we will trace, @@ -212,7 +209,7 @@ static void clear_singlestep(struct task_struct *child) /* But touch TF only if it was set by us.. */ if (child->ptrace & PT_DTRACE) { struct pt_regs *regs = task_pt_regs(child); - regs->eflags &= ~TRAP_FLAG; + regs->eflags &= ~X86_EFLAGS_TF; child->ptrace &= ~PT_DTRACE; } }