summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBogdan Purcareata <bogdan.purcareata@freescale.com>2015-02-11 08:13:56 (GMT)
committerHonghua Yin <Hong-Hua.Yin@freescale.com>2015-03-30 09:20:15 (GMT)
commitb60f6873f5db357aefb8979753cc7f4eb0dff96e (patch)
treeabb6ea044faa7597dbc59cd8ab40766f44879344 /arch
parentdb63a7500a9a0e4c38799819592ac594b77e49eb (diff)
downloadlinux-fsl-qoriq-b60f6873f5db357aefb8979753cc7f4eb0dff96e.tar.xz
powerpc: Relax secure computing on syscall entry trace
The secure_computing_strict will just force the kernel to panic on secure_computing failure. Once SECCOMP_FILTER support is enabled in the kernel, syscalls can be denied without system failure. v4: - rebase on top of 3.19 v3,v2: no changes Upstream-Status: Pending [https://lkml.org/lkml/2015/2/18/53] Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> Change-Id: Icd077291db86657edce29b8079696fc8e48e554e Reviewed-on: http://git.am.freescale.net:8181/33031 Tested-by: Honghua Yin <Hong-Hua.Yin@freescale.com> Reviewed-by: Honghua Yin <Hong-Hua.Yin@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/ptrace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index ed1f0fb..f4755cf 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -1772,7 +1772,9 @@ long do_syscall_trace_enter(struct pt_regs *regs)
user_exit();
- secure_computing_strict(regs->gpr[0]);
+ /* Do the secure computing check first; failures should be fast. */
+ if (secure_computing() == -1)
+ return -1L;
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
tracehook_report_syscall_entry(regs)) {