seccomp: ignore secure_computing return values
PATCH 1/1 seccomp: ignore secure_computing return values
Unless an architecture selects CONFIG_HAVE_ARCH_SECCOMP_FILTER, it is not required to respect the return value from secure_computing().
This change matches https://lkml.org/lkml/2012/4/16/14 exactly except that it applies cleanly to security-next. Because there is no other difference than the alignment, I've kept Signed-off-by intact.
--- arch/microblaze/kernel/ptrace.c | 2 +- arch/mips/kernel/ptrace.c | 2 +- arch/powerpc/kernel/ptrace.c | 2 +- arch/s390/kernel/ptrace.c | 2 +- arch/sh/kernel/ptrace_32.c | 2 +- arch/sh/kernel/ptrace_64.c | 2 +- arch/sparc/kernel/ptrace_64.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
arch/microblaze/kernel/ptrace.c +1 -1
@@ -136,7 +136,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) {long ret =0 ; -secure_computing (regs->r12); + (void )secure_computing (regs->r12);if (test_thread_flag (TIF_SYSCALL_TRACE ) &&tracehook_report_syscall_entry (regs))
arch/mips/kernel/ptrace.c +1 -1
@@ -535,7 +535,7 @@ static inline int audit_arch(void) asmlinkage void syscall_trace_enter(struct pt_regs *regs) {/* do the secure computing check first */ -secure_computing (regs->regs[2 ]); + (void )secure_computing (regs->regs[2 ]);if (!(current->ptrace &PT_PTRACED )) goto out;
arch/powerpc/kernel/ptrace.c +1 -1
@@ -1710,7 +1710,7 @@ long do_syscall_trace_enter(struct pt_regs *regs) {long ret =0 ; -secure_computing (regs->gpr[0 ]); + (void )secure_computing (regs->gpr[0 ]);if (test_thread_flag (TIF_SYSCALL_TRACE ) &&tracehook_report_syscall_entry (regs))
arch/s390/kernel/ptrace.c +1 -1
@@ -719,7 +719,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)long ret =0 ;/* Do the secure computing check first. */ -secure_computing (regs->gprs[2 ]); + (void )secure_computing (regs->gprs[2 ]);/* * The sysc_tracesys code in entry.S stored the system
arch/sh/kernel/ptrace_32.c +1 -1
@@ -503,7 +503,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) {long ret =0 ; -secure_computing (regs->regs[0 ]); + (void )secure_computing (regs->regs[0 ]);if (test_thread_flag (TIF_SYSCALL_TRACE ) &&tracehook_report_syscall_entry (regs))
arch/sh/kernel/ptrace_64.c +1 -1
@@ -522,7 +522,7 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs) {long long ret =0 ; -secure_computing (regs->regs[9 ]); + (void )secure_computing (regs->regs[9 ]);if (test_thread_flag (TIF_SYSCALL_TRACE ) &&tracehook_report_syscall_entry (regs))
arch/sparc/kernel/ptrace_64.c +1 -1
@@ -1062,7 +1062,7 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)int ret =0 ;/* do the secure computing check first */ -secure_computing (regs->u_regs[UREG_G1 ]); + (void )secure_computing (regs->u_regs[UREG_G1 ]);if (test_thread_flag (TIF_SYSCALL_TRACE )) ret =tracehook_report_syscall_entry (regs);
Signature · 1 line
1.7.5.4
Hi Will,
Quoted 7 lines · On Mon, 16 Apr 2012 12:47:41 -0500 Will Drewry <[email protected]> wrote:
Unless an architecture selects
CONFIG_HAVE_ARCH_SECCOMP_FILTER, it is not required to respect the return value fromsecure_computing().This change matches https://lkml.org/lkml/2012/4/16/14 exactly except that it applies cleanly to security-next. Because there is no other difference than the alignment, I've kept Signed-off-by intact.
Given that, I think you should have kept the authorship (i.e. put
From: Stephen Rothwell <[email protected]>
at the top of the patch). Also, you should probably mention the compile error that this fixes in the commit message as well.
But otherwise, thanks for submitting this.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Quoted 7 lines · Stephen Rothwell
Hi Will,
Quoted 4 lines · On Mon, 16 Apr 2012 12:47:41 -0500 Will Drewry <[email protected]> wrote:
Unless an architecture selects
CONFIG_HAVE_ARCH_SECCOMP_FILTER, it is not required to respect the return value fromsecure_computing().
Quoted 7 lines
Quoted 3 lines
This change matches https://lkml.org/lkml/2012/4/16/14 exactly except that it applies cleanly to security-next. Because there is no other difference than the alignment, I've kept Signed-off-by intact.
Given that, I think you should have kept the authorship (i.e. put
From: Stephen Rothwell <[email protected]>
No problem - happy to resend! I manually created the patch (grep; vi) but and the result was identical :)
Quoted 2 lines
at the top of the patch). Also, you should probably mention the compile error that this fixes in the commit message as well.
I'll fix it and resend!
Quoted 1 line
But otherwise, thanks for submitting this.
Didn't mean to obscure authorship or the details.
Cheers!
will