diff options
author | Will Drewry <wad@chromium.org> | 2012-04-17 15:48:57 -0400 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2012-04-17 22:24:50 -0400 |
commit | e4da89d02f369450996cfd04f64b1cce4d8afaea (patch) | |
tree | 93d5e48347bb6c47ef10741d225969cacd57f77e /arch/sh/kernel | |
parent | b1fa650c7e6e81ca788fef52b1659295eb82ffdd (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/sh/kernel')
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 2 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace_64.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 9698671444e6..81f999a672f6 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -503,7 +503,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
503 | { | 503 | { |
504 | long ret = 0; | 504 | long ret = 0; |
505 | 505 | ||
506 | secure_computing(regs->regs[0]); | 506 | secure_computing_strict(regs->regs[0]); |
507 | 507 | ||
508 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 508 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
509 | tracehook_report_syscall_entry(regs)) | 509 | tracehook_report_syscall_entry(regs)) |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index bc81e07dc098..af90339dadcd 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -522,7 +522,7 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs) | |||
522 | { | 522 | { |
523 | long long ret = 0; | 523 | long long ret = 0; |
524 | 524 | ||
525 | secure_computing(regs->regs[9]); | 525 | secure_computing_strict(regs->regs[9]); |
526 | 526 | ||
527 | if (test_thread_flag(TIF_SYSCALL_TRACE) && | 527 | if (test_thread_flag(TIF_SYSCALL_TRACE) && |
528 | tracehook_report_syscall_entry(regs)) | 528 | tracehook_report_syscall_entry(regs)) |