[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-10 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-10 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-09 Thread Will Deacon
One really minor nit... On Thu, Nov 08, 2012 at 08:59:31PM +, Kees Cook wrote: > There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK > path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and > move seccomp into the syscall_trace_enter() handler. > >

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-09 Thread Will Deacon
One really minor nit... On Thu, Nov 08, 2012 at 08:59:31PM +, Kees Cook wrote: There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-08 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-08 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Kees Cook
On Thu, Nov 1, 2012 at 1:33 PM, Russell King - ARM Linux wrote: > It's pointless having: > > tst r10, #_TIF_SECCOMP > bne __sys_trace > tst r10, #_TIF_SYSCALL_WORK > bne __sys_trace > > Instead, make TIF_SECCOMP be bit 11, combine it into

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Russell King - ARM Linux
On Thu, Nov 01, 2012 at 12:46:37PM -0700, Kees Cook wrote: > #ifdef CONFIG_SECCOMP > - tst r10, #_TIF_SECCOMP > - beq 1f > - mov r0, scno > - bl __secure_computing > - add r0, sp, #S_R0 + S_OFF @ pointer to regs > - ldmia r0, {r0 -

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE path in entry-common.S. In order to add support for CONFIG_HAVE_ARCH_SECCOMP_FILTER without mangling the assembly too badly, seccomp was moved into the syscall_trace_enter() handler. Expanded ptrace_syscall_trace() into both

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE path in entry-common.S. In order to add support for CONFIG_HAVE_ARCH_SECCOMP_FILTER without mangling the assembly too badly, seccomp was moved into the syscall_trace_enter() handler. Expanded ptrace_syscall_trace() into both

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Russell King - ARM Linux
On Thu, Nov 01, 2012 at 12:46:37PM -0700, Kees Cook wrote: #ifdef CONFIG_SECCOMP - tst r10, #_TIF_SECCOMP - beq 1f - mov r0, scno - bl __secure_computing - add r0, sp, #S_R0 + S_OFF @ pointer to regs - ldmia r0, {r0 - r3}

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Kees Cook
On Thu, Nov 1, 2012 at 1:33 PM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: It's pointless having: tst r10, #_TIF_SECCOMP bne __sys_trace tst r10, #_TIF_SYSCALL_WORK bne __sys_trace Instead, make TIF_SECCOMP be bit 11, combine it

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-11-01 Thread Kees Cook
There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_WORK path in entry-common.S, so merge TIF_SECCOMP into TIF_SYSCALL_WORK and move seccomp into the syscall_trace_enter() handler. Expanded some of the tracehook logic into the callers to make this code more readable. Since

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-10-30 Thread Kees Cook
On Mon, Oct 29, 2012 at 7:05 PM, Al Viro wrote: > On Mon, Oct 29, 2012 at 05:41:20PM -0700, Kees Cook wrote: >> From: Will Drewry >> >> There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE >> path in entry-common.S. In order to add support for >>

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-10-30 Thread Kees Cook
On Mon, Oct 29, 2012 at 7:05 PM, Al Viro v...@zeniv.linux.org.uk wrote: On Mon, Oct 29, 2012 at 05:41:20PM -0700, Kees Cook wrote: From: Will Drewry w...@chromium.org There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE path in entry-common.S. In order to add support for

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-10-29 Thread Al Viro
On Mon, Oct 29, 2012 at 05:41:20PM -0700, Kees Cook wrote: > From: Will Drewry > > There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE > path in entry-common.S. In order to add support for > CONFIG_HAVE_ARCH_SECCOMP_FILTER without mangling the assembly too badly, > seccomp

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-10-29 Thread Kees Cook
From: Will Drewry There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE path in entry-common.S. In order to add support for CONFIG_HAVE_ARCH_SECCOMP_FILTER without mangling the assembly too badly, seccomp was moved into the syscall_trace_enter() handler. Additionally, the

[PATCH 2/4] arch/arm: move secure_computing into trace

2012-10-29 Thread Kees Cook
From: Will Drewry w...@chromium.org There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE path in entry-common.S. In order to add support for CONFIG_HAVE_ARCH_SECCOMP_FILTER without mangling the assembly too badly, seccomp was moved into the syscall_trace_enter() handler.

Re: [PATCH 2/4] arch/arm: move secure_computing into trace

2012-10-29 Thread Al Viro
On Mon, Oct 29, 2012 at 05:41:20PM -0700, Kees Cook wrote: From: Will Drewry w...@chromium.org There is very little difference in the TIF_SECCOMP and TIF_SYSCALL_TRACE path in entry-common.S. In order to add support for CONFIG_HAVE_ARCH_SECCOMP_FILTER without mangling the assembly too badly,