Re: using ptrace to cancel a syscall on sparc

2016-01-19 Thread David Miller
From: Mike Frysinger Date: Mon, 18 Jan 2016 06:32:30 -0500 > looks like the bug is in arch/sparc/kernel/syscalls.S:linux_syscall_trace32 > (and linux_syscall_trace). they don't reload the args from the pt_regs > struct after calling syscall_trace_enter. i put in a small hack: Mike, please give

Re: using ptrace to cancel a syscall on sparc

2016-01-19 Thread David Miller
From: Mike Frysinger Date: Mon, 18 Jan 2016 06:32:30 -0500 > looks like the bug is in arch/sparc/kernel/syscalls.S:linux_syscall_trace32 > (and linux_syscall_trace). they don't reload the args from the pt_regs > struct after calling syscall_trace_enter. i put in a small hack: > linux_syscall_tr

Re: using ptrace to cancel a syscall on sparc

2016-01-19 Thread Mike Frysinger
On 19 Jan 2016 15:10, David Miller wrote: > From: Mike Frysinger > Date: Mon, 18 Jan 2016 06:32:30 -0500 > > > looks like the bug is in arch/sparc/kernel/syscalls.S:linux_syscall_trace32 > > (and linux_syscall_trace). they don't reload the args from the pt_regs > > struct after calling syscall_t

Re: using ptrace to cancel a syscall on sparc

2016-01-18 Thread Mike Frysinger
On 21 Dec 2015 02:31, Dmitry V. Levin wrote: > On Sun, Dec 20, 2015 at 12:47:54AM -0500, Mike Frysinger wrote: > > i've been playing with ptrace on sparc and trying to use it to watch and > > cancel specific syscalls. i have this working for other arches already. > [...] > > i'm having trouble wit

Re: using ptrace to cancel a syscall on sparc

2015-12-20 Thread Dmitry V. Levin
On Sun, Dec 20, 2015 at 12:47:54AM -0500, Mike Frysinger wrote: > i've been playing with ptrace on sparc and trying to use it to watch and > cancel specific syscalls. i have this working for other arches already. [...] > i'm having trouble with canceling of the syscall itself. seems like > no mat

using ptrace to cancel a syscall on sparc

2015-12-19 Thread Mike Frysinger
i've been playing with ptrace on sparc and trying to use it to watch and cancel specific syscalls. i have this working for other arches already. the test is pretty simple: - call open("f", O_CREAT) - call unlink("f") the tracer will watch for the unlink, and when it gets notified, stuffs the sy