On Mon, Apr 16, 2012 at 12:46 AM, Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote: > Hi all, > > After merging the final tree, today's linux-next build (powerpc > allnoconfig) failed like this: > > arch/powerpc/kernel/ptrace.c: In function 'do_syscall_trace_enter': > arch/powerpc/kernel/ptrace.c:1713:2: error: statement with no effect [-Werror=unused-value] > cc1: all warnings being treated as errors > > Introduced by commit acf3b2c71ed2 ("seccomp: add SECCOMP_RET_ERRNO"). I > have applied the following hack fix that fixes the build, but the other > seven call sites of secure_computing() should be fixed up properly. Thanks for this, and the other two fixes! I'll pull together a patch fixing up the other call sites. My past revisions had avoided this by using a new symbol, and I totally forgot to touch these up in the last round. What's the best way to submit the clean up -- against the security-next tree? Thanks and sorry for the noise! will > From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> > Date: Mon, 16 Apr 2012 15:39:49 +1000 > Subject: [PATCH] seccomp: hack fix for build failures with secure_computing > return value change > > Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> > --- > 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(-) > > diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c > index 6eb2aa9..9e3ffc9 100644 > --- a/arch/microblaze/kernel/ptrace.c > +++ b/arch/microblaze/kernel/ptrace.c > @@ -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)) > diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c > index 7c24c29..4f83d73 100644 > --- a/arch/mips/kernel/ptrace.c > +++ b/arch/mips/kernel/ptrace.c > @@ -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; > diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c > index 8d8e028..53cebc4 100644 > --- a/arch/powerpc/kernel/ptrace.c > +++ b/arch/powerpc/kernel/ptrace.c > @@ -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)) > diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c > index 02f300f..96e0dea 100644 > --- a/arch/s390/kernel/ptrace.c > +++ b/arch/s390/kernel/ptrace.c > @@ -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 > diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c > index 9698671..cf55945 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) > { > 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)) > diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c > index bc81e07..3d3600f 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) > { > 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)) > diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c > index 6f97c07..6ddec1f 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) > 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); > -- > 1.7.10.rc3 > > -- > Cheers, > Stephen Rothwell sfr@xxxxxxxxxxxxxxxx > http://www.canb.auug.org.au/~sfr/ -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html