Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-04 Thread Andy Lutomirski
On Thu, Jul 3, 2014 at 9:32 AM, Will Deacon wrote: > On Thu, Jul 03, 2014 at 05:13:50PM +0100, Andy Lutomirski wrote: >> On Thu, Jul 3, 2014 at 9:11 AM, Will Deacon wrote: >> > On Thu, Jul 03, 2014 at 04:39:21PM +0100, Andy Lutomirski wrote: >> >> On Thu, Jul 3, 2014 at 3:24 AM, Will Deacon wrot

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-03 Thread Will Deacon
On Thu, Jul 03, 2014 at 05:13:50PM +0100, Andy Lutomirski wrote: > On Thu, Jul 3, 2014 at 9:11 AM, Will Deacon wrote: > > On Thu, Jul 03, 2014 at 04:39:21PM +0100, Andy Lutomirski wrote: > >> On Thu, Jul 3, 2014 at 3:24 AM, Will Deacon wrote: > >> > On Thu, Jul 03, 2014 at 08:43:07AM +0100, AKASH

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-03 Thread Will Deacon
On Thu, Jul 03, 2014 at 04:39:21PM +0100, Andy Lutomirski wrote: > On Thu, Jul 3, 2014 at 3:24 AM, Will Deacon wrote: > > On Thu, Jul 03, 2014 at 08:43:07AM +0100, AKASHI Takahiro wrote: > >> On 06/24/2014 05:54 PM, Will Deacon wrote: > >> > On Mon, Jun 23, 2014 at 08:46:52PM +0100, Kees Cook wrot

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-03 Thread Andy Lutomirski
On Thu, Jul 3, 2014 at 9:11 AM, Will Deacon wrote: > On Thu, Jul 03, 2014 at 04:39:21PM +0100, Andy Lutomirski wrote: >> On Thu, Jul 3, 2014 at 3:24 AM, Will Deacon wrote: >> > On Thu, Jul 03, 2014 at 08:43:07AM +0100, AKASHI Takahiro wrote: >> >> On 06/24/2014 05:54 PM, Will Deacon wrote: >> >>

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-03 Thread Andy Lutomirski
On Thu, Jul 3, 2014 at 3:24 AM, Will Deacon wrote: > On Thu, Jul 03, 2014 at 08:43:07AM +0100, AKASHI Takahiro wrote: >> Hi Will, > > Hi Akashi, > >> On 06/24/2014 05:54 PM, Will Deacon wrote: >> > On Mon, Jun 23, 2014 at 08:46:52PM +0100, Kees Cook wrote: >> >> What's the state of seccomp on arm6

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-03 Thread Will Deacon
On Thu, Jul 03, 2014 at 08:43:07AM +0100, AKASHI Takahiro wrote: > Hi Will, Hi Akashi, > On 06/24/2014 05:54 PM, Will Deacon wrote: > > On Mon, Jun 23, 2014 at 08:46:52PM +0100, Kees Cook wrote: > >> What's the state of seccomp on arm64? I saw a series back in March, > >> but nothing since then?

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-07-03 Thread AKASHI Takahiro
Hi Will, On 06/24/2014 05:54 PM, Will Deacon wrote: On Mon, Jun 23, 2014 at 08:46:52PM +0100, Kees Cook wrote: On Mon, Jun 23, 2014 at 1:46 AM, Will Deacon wrote: On Fri, Jun 20, 2014 at 07:10:46PM +0100, Kees Cook wrote: On Fri, Jun 20, 2014 at 10:36 AM, Kees Cook wrote: On Fri, Jun 20, 2

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-24 Thread AKASHI Takahiro
On 06/24/2014 05:54 PM, Will Deacon wrote: On Mon, Jun 23, 2014 at 08:46:52PM +0100, Kees Cook wrote: On Mon, Jun 23, 2014 at 1:46 AM, Will Deacon wrote: On Fri, Jun 20, 2014 at 07:10:46PM +0100, Kees Cook wrote: On Fri, Jun 20, 2014 at 10:36 AM, Kees Cook wrote: On Fri, Jun 20, 2014 at 10:

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-24 Thread Will Deacon
On Mon, Jun 23, 2014 at 08:46:52PM +0100, Kees Cook wrote: > On Mon, Jun 23, 2014 at 1:46 AM, Will Deacon wrote: > > On Fri, Jun 20, 2014 at 07:10:46PM +0100, Kees Cook wrote: > >> On Fri, Jun 20, 2014 at 10:36 AM, Kees Cook wrote: > >> > On Fri, Jun 20, 2014 at 10:23 AM, Will Deacon > >> > wro

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-23 Thread Kees Cook
On Mon, Jun 23, 2014 at 1:46 AM, Will Deacon wrote: > On Fri, Jun 20, 2014 at 07:10:46PM +0100, Kees Cook wrote: >> On Fri, Jun 20, 2014 at 10:36 AM, Kees Cook wrote: >> > On Fri, Jun 20, 2014 at 10:23 AM, Will Deacon wrote: >> >> Right, gotcha. Thanks for the explanation. I was confused, becaus

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-23 Thread Will Deacon
On Fri, Jun 20, 2014 at 07:10:46PM +0100, Kees Cook wrote: > On Fri, Jun 20, 2014 at 10:36 AM, Kees Cook wrote: > > On Fri, Jun 20, 2014 at 10:23 AM, Will Deacon wrote: > >> Right, gotcha. Thanks for the explanation. I was confused, because > >> tracehook_report_syscall does the right thing (retu

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-20 Thread Kees Cook
On Fri, Jun 20, 2014 at 10:36 AM, Kees Cook wrote: > On Fri, Jun 20, 2014 at 10:23 AM, Will Deacon wrote: >> On Fri, Jun 20, 2014 at 05:44:52PM +0100, Kees Cook wrote: >>> On Fri, Jun 20, 2014 at 3:22 AM, Will Deacon wrote: >>> > I'm struggling to see the bug in the current code, so apologies if

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-20 Thread Kees Cook
On Fri, Jun 20, 2014 at 10:23 AM, Will Deacon wrote: > On Fri, Jun 20, 2014 at 05:44:52PM +0100, Kees Cook wrote: >> On Fri, Jun 20, 2014 at 3:22 AM, Will Deacon wrote: >> > I'm struggling to see the bug in the current code, so apologies if my >> > questions aren't helpful. >> > >> > On Wed, Jun

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-20 Thread Will Deacon
On Fri, Jun 20, 2014 at 05:44:52PM +0100, Kees Cook wrote: > On Fri, Jun 20, 2014 at 3:22 AM, Will Deacon wrote: > > I'm struggling to see the bug in the current code, so apologies if my > > questions aren't helpful. > > > > On Wed, Jun 18, 2014 at 09:27:48PM +0100, Kees Cook wrote: > >> An x86 tr

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-20 Thread Kees Cook
On Fri, Jun 20, 2014 at 3:22 AM, Will Deacon wrote: > Hi Kees, > > I'm struggling to see the bug in the current code, so apologies if my > questions aren't helpful. > > On Wed, Jun 18, 2014 at 09:27:48PM +0100, Kees Cook wrote: >> An x86 tracer wanting to change the syscall uses PTRACE_SETREGS >>

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-20 Thread Will Deacon
Hi Kees, I'm struggling to see the bug in the current code, so apologies if my questions aren't helpful. On Wed, Jun 18, 2014 at 09:27:48PM +0100, Kees Cook wrote: > An x86 tracer wanting to change the syscall uses PTRACE_SETREGS > (stored to regs->orig_ax), and an ARM tracer uses PTRACE_SET_SYSC

Re: [PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-18 Thread Andy Lutomirski
On Wed, Jun 18, 2014 at 1:27 PM, Kees Cook wrote: > An x86 tracer wanting to change the syscall uses PTRACE_SETREGS > (stored to regs->orig_ax), and an ARM tracer uses PTRACE_SET_SYSCALL > (stored to current_thread_info()->syscall). When this happens, the > syscall can change across the call to se

[PATCH] arm: ptrace: fix syscall modification under PTRACE_O_TRACESECCOMP

2014-06-18 Thread Kees Cook
An x86 tracer wanting to change the syscall uses PTRACE_SETREGS (stored to regs->orig_ax), and an ARM tracer uses PTRACE_SET_SYSCALL (stored to current_thread_info()->syscall). When this happens, the syscall can change across the call to secure_computing(), since it may block on tracer notification