lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20150820213323.GL16279@outflux.net>
Date:	Thu, 20 Aug 2015 14:33:23 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Jan Willeke <willeke@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andy Lutomirski <luto@...capital.net>
Subject: seccomp selftest on s390

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ