aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorWill Drewry <wad@chromium.org>2012-04-17 15:48:57 -0400
committerJames Morris <james.l.morris@oracle.com>2012-04-17 22:24:50 -0400
commite4da89d02f369450996cfd04f64b1cce4d8afaea (patch)
tree93d5e48347bb6c47ef10741d225969cacd57f77e /arch/sparc/kernel
parentb1fa650c7e6e81ca788fef52b1659295eb82ffdd (diff)
seccomp: ignore secure_computing return values
This change is inspired by https://lkml.org/lkml/2012/4/16/14 which fixes the build warnings for arches that don't support CONFIG_HAVE_ARCH_SECCOMP_FILTER. In particular, there is no requirement for the return value of secure_computing() to be checked unless the architecture supports seccomp filter. Instead of silencing the warnings with (void) a new static inline is added to encode the expected behavior in a compiler and human friendly way. v2: - cleans things up with a static inline - removes sfr's signed-off-by since it is a different approach v1: - matches sfr's original change Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Will Drewry <wad@chromium.org> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/ptrace_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index 6f97c0767995..484dabac7045 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -1062,7 +1062,7 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
1062 int ret = 0; 1062 int ret = 0;
1063 1063
1064 /* do the secure computing check first */ 1064 /* do the secure computing check first */
1065 secure_computing(regs->u_regs[UREG_G1]); 1065 secure_computing_strict(regs->u_regs[UREG_G1]);
1066 1066
1067 if (test_thread_flag(TIF_SYSCALL_TRACE)) 1067 if (test_thread_flag(TIF_SYSCALL_TRACE))
1068 ret = tracehook_report_syscall_entry(regs); 1068 ret = tracehook_report_syscall_entry(regs);