diff options
author | Kyle McMartin <kyle@mcmartin.ca> | 2009-09-27 23:03:02 -0400 |
---|---|---|
committer | Kyle McMartin <kyle@ihatethathostname.lab.bos.redhat.com> | 2009-09-27 23:07:22 -0400 |
commit | ecd3d4bc06e48357d12e730482577c756a9f2dbc (patch) | |
tree | 36f683170f874157103cc962f4a3d3d85771e480 /arch/parisc/kernel/ptrace.c | |
parent | 2798af1abb5d560b926fd07ec58c5dcc6d3484d8 (diff) |
parisc: stop using task->ptrace for {single,block}step flags
task->ptrace flags belong to generic code, so instead thief some
TIF_ bits to use. Somewhat risky conversion of code to test TASK_FLAGS
instead of TASK_PTRACE in assembly, but it looks alright in the end.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc/kernel/ptrace.c')
-rw-r--r-- | arch/parisc/kernel/ptrace.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 08f6d2cbf0e..c4f49e45129 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -36,7 +36,8 @@ | |||
36 | */ | 36 | */ |
37 | void ptrace_disable(struct task_struct *task) | 37 | void ptrace_disable(struct task_struct *task) |
38 | { | 38 | { |
39 | task->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP); | 39 | clear_tsk_thread_flag(task, TIF_SINGLESTEP); |
40 | clear_tsk_thread_flag(task, TIF_BLOCKSTEP); | ||
40 | 41 | ||
41 | /* make sure the trap bits are not set */ | 42 | /* make sure the trap bits are not set */ |
42 | pa_psw(task)->r = 0; | 43 | pa_psw(task)->r = 0; |
@@ -56,8 +57,8 @@ void user_disable_single_step(struct task_struct *task) | |||
56 | 57 | ||
57 | void user_enable_single_step(struct task_struct *task) | 58 | void user_enable_single_step(struct task_struct *task) |
58 | { | 59 | { |
59 | task->ptrace &= ~PT_BLOCKSTEP; | 60 | clear_tsk_thread_flag(task, TIF_BLOCKSTEP); |
60 | task->ptrace |= PT_SINGLESTEP; | 61 | set_tsk_thread_flag(task, TIF_SINGLESTEP); |
61 | 62 | ||
62 | if (pa_psw(task)->n) { | 63 | if (pa_psw(task)->n) { |
63 | struct siginfo si; | 64 | struct siginfo si; |
@@ -99,8 +100,8 @@ void user_enable_single_step(struct task_struct *task) | |||
99 | 100 | ||
100 | void user_enable_block_step(struct task_struct *task) | 101 | void user_enable_block_step(struct task_struct *task) |
101 | { | 102 | { |
102 | task->ptrace &= ~PT_SINGLESTEP; | 103 | clear_tsk_thread_flag(task, TIF_SINGLESTEP); |
103 | task->ptrace |= PT_BLOCKSTEP; | 104 | set_tsk_thread_flag(task, TIF_BLOCKSTEP); |
104 | 105 | ||
105 | /* Enable taken branch trap. */ | 106 | /* Enable taken branch trap. */ |
106 | pa_psw(task)->r = 0; | 107 | pa_psw(task)->r = 0; |
@@ -275,7 +276,8 @@ long do_syscall_trace_enter(struct pt_regs *regs) | |||
275 | 276 | ||
276 | void do_syscall_trace_exit(struct pt_regs *regs) | 277 | void do_syscall_trace_exit(struct pt_regs *regs) |
277 | { | 278 | { |
278 | int stepping = !!(current->ptrace & (PT_SINGLESTEP|PT_BLOCKSTEP)); | 279 | int stepping = test_thread_flag(TIF_SINGLESTEP) || |
280 | test_thread_flag(TIF_BLOCKSTEP); | ||
279 | 281 | ||
280 | if (stepping || test_thread_flag(TIF_SYSCALL_TRACE)) | 282 | if (stepping || test_thread_flag(TIF_SYSCALL_TRACE)) |
281 | tracehook_report_syscall_exit(regs, stepping); | 283 | tracehook_report_syscall_exit(regs, stepping); |