From: Kees Cook <keescook@chromium.org>
To: Jan Willeke <willeke@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andy Lutomirski <luto@amacapital.net>
Subject: seccomp selftest on s390
Date: Thu, 20 Aug 2015 14:33:23 -0700 [thread overview]
Message-ID: <20150820213323.GL16279@outflux.net> (raw)
Hi!
I don't have access to s390 running a modern kernel, so I've not been able
to meaningfully run the seccomp selftest suite. In a quick review, I think
the following is close to the missing pieces, but I can't verify it. :)
Can someone let me know if this works, or otherwise check that the
tools/testing/selftests/seccomp suite passes on s390?
Thanks!
-Kees
--- seccomp_bpf.c.orig 2015-08-20 21:13:17.735789007 +0000
+++ seccomp_bpf.c 2015-08-20 21:09:49.547879621 +0000
@@ -1210,6 +1211,10 @@
# define ARCH_REGS struct pt_regs
# define SYSCALL_NUM gpr[0]
# define SYSCALL_RET gpr[3]
+#elif defined(__s390__)
+# define ARCH_REGS s390_regs
+# define SYSCALL_NUM gprs[1]
+# define SYSCALL_RET gprs[2]
#else
# error "Do not know how to find your architecture's registers and syscalls"
#endif
@@ -1243,7 +1248,7 @@
ret = ptrace(PTRACE_GETREGSET, tracee, NT_PRSTATUS, &iov);
EXPECT_EQ(0, ret);
-#if defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || defined(__powerpc__)
+#if defined(__x86_64__) || defined(__i386__) || defined(__aarch64__) || defined(__powerpc__) || defined(__s390__)
{
regs.SYSCALL_NUM = syscall;
}
--
Kees Cook
Chrome OS Security
reply other threads:[~2015-08-20 21:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150820213323.GL16279@outflux.net \
--to=keescook@chromium.org \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=willeke@de.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