From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
To: <benh@kernel.crashing.org>, <paulus@samba.org>,
<linuxppc-dev@lists.ozlabs.org>
Cc: pmoore@redhat.com, linux-kernel@vger.kernel.org,
Bogdan Purcareata <bogdan.purcareata@freescale.com>,
strosake@linux.vnet.ibm.com
Subject: [PATCH 2/3] powerpc: Relax secure computing on syscall entry trace
Date: Wed, 11 Feb 2015 08:36:17 +0000 [thread overview]
Message-ID: <1423643778-32525-3-git-send-email-bogdan.purcareata@freescale.com> (raw)
In-Reply-To: <1423643778-32525-1-git-send-email-bogdan.purcareata@freescale.com>
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.
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
---
arch/powerpc/kernel/ptrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index d82fd0b..d41faab 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(regs->gpr[0]) == -1)
+ return -1L;
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
tracehook_report_syscall_entry(regs)) {
--
2.1.4
next prev parent reply other threads:[~2015-02-11 8:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 8:36 [PATCH v2 0/3] powerpc: Enable seccomp filter support Bogdan Purcareata
2015-02-11 8:36 ` [PATCH v2 1/3] powerpc: Don't force ENOSYS as error on syscall fail Bogdan Purcareata
2015-02-12 5:24 ` Michael Ellerman
2015-02-12 8:38 ` Purcareata Bogdan
2015-02-11 8:36 ` Bogdan Purcareata [this message]
2015-02-11 8:36 ` [PATCH 3/3] powerpc: Enable HAVE_ARCH_SECCOMP_FILTER Bogdan Purcareata
-- strict thread matches above, loose matches on Subject: below --
2015-02-09 7:55 [PATCH 0/3] powerpc: Enable seccomp filter support Bogdan Purcareata
2015-02-09 7:55 ` [PATCH 2/3] powerpc: Relax secure computing on syscall entry trace Bogdan Purcareata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423643778-32525-3-git-send-email-bogdan.purcareata@freescale.com \
--to=bogdan.purcareata@freescale.com \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=pmoore@redhat.com \
--cc=strosake@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).