diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-23 21:05:32 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-09-23 21:05:32 (GMT) |
commit | d19eff3acfd27dead12ff1f7255fbfea2d778cdb (patch) | |
tree | cc73fbbb1e34c5e8ea27362a788acdf510209d29 /arch | |
parent | f0eb4a24d43c13a4f3e8b7b04f3f06011614c933 (diff) | |
parent | d26a7730b5874a5fa6779c62f4ad7c5065a94723 (diff) | |
download | linux-d19eff3acfd27dead12ff1f7255fbfea2d778cdb.tar.xz |
Merge branch 'parisc-3.17-7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fixes from Helge Deller:
"We avoid using -mfast-indirect-calls for 64bit kernel builds to
prevent building an unbootable kernel due to latest gcc changes.
In the pdc_stable/firmware-access driver we fix a few possible stack
overflows and we now call secure_computing_strict() instead of
secure_computing() which fixes upcoming SECCOMP patches in the
for-next trees"
* 'parisc-3.17-7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds
parisc: pdc_stable.c: Avoid potential stack overflows
parisc: pdc_stable.c: Cleaning up unnecessary use of memset in conjunction with strncpy
parisc: ptrace: use secure_computing_strict()
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/Makefile | 7 | ||||
-rw-r--r-- | arch/parisc/kernel/ptrace.c | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 7187664..5db8882 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -48,7 +48,12 @@ cflags-y := -pipe # These flags should be implied by an hppa-linux configuration, but they # are not in gcc 3.2. -cflags-y += -mno-space-regs -mfast-indirect-calls +cflags-y += -mno-space-regs + +# -mfast-indirect-calls is only relevant for 32-bit kernels. +ifndef CONFIG_64BIT +cflags-y += -mfast-indirect-calls +endif # Currently we save and restore fpregs on all kernel entry/interruption paths. # If that gets optimized, we might need to disable the use of fpregs in the diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index 3bab724..92438c2 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c @@ -17,6 +17,7 @@ #include <linux/user.h> #include <linux/personality.h> #include <linux/security.h> +#include <linux/seccomp.h> #include <linux/compat.h> #include <linux/signal.h> #include <linux/audit.h> @@ -271,10 +272,7 @@ long do_syscall_trace_enter(struct pt_regs *regs) long ret = 0; /* Do the secure computing check first. */ - if (secure_computing(regs->gr[20])) { - /* seccomp failures shouldn't expose any additional code. */ - return -1; - } + secure_computing_strict(regs->gr[20]); if (test_thread_flag(TIF_SYSCALL_TRACE) && tracehook_report_syscall_entry(regs)) |