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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 17 Apr 2017 16:12:50 -0400 (EDT)
From:   David Miller <davem@...hat.com>
To:     daniel@...earbox.net
Cc:     sparclinux@...r.kernel.org, netdev@...r.kernel.org, ast@...nel.org
Subject: Re: [PATCH RFC] sparc64: eBPF JIT

From: Daniel Borkmann <daniel@...earbox.net>
Date: Mon, 17 Apr 2017 20:44:35 +0200

> On a quick initial glance, you also need to map BPF_REG_AX. If
> I understand the convention correctly, you could use L7 for that.
> 
> You can test for it through tools/testing/selftests/bpf/test_kmod.sh
> which exercises the test_bpf.ko under various sysctl combinations as
> part of the BPF selftest suite.

Ok, blinding works properly with this fix:

--- arch/sparc/net/bpf_jit.h~	2017-04-13 17:44:24.084936201 -0700
+++ arch/sparc/net/bpf_jit.h	2017-04-17 12:07:22.559029482 -0700
@@ -17,8 +17,10 @@
 #ifndef __ASSEMBLER__
 #define G0		0x00
 #define G1		0x01
+#define G2		0x02
 #define G3		0x03
 #define G6		0x06
+#define G7		0x07
 #define O0		0x08
 #define O1		0x09
 #define O2		0x0a
--- arch/sparc/net/bpf_jit_comp.c~	2017-04-16 20:24:49.060342700 -0700
+++ arch/sparc/net/bpf_jit_comp.c	2017-04-17 12:05:08.470048483 -0700
@@ -195,10 +195,12 @@ static const int bpf2sparc[] = {
 	/* read-only frame pointer to access stack */
 	[BPF_REG_FP] = FP,
 
+	[BPF_REG_AX] = G7,
+
 	/* temporary register for internal BPF JIT */
 	[TMP_REG_1] = G1,
-	[TMP_REG_2] = G3,
-	[TMP_REG_3] = L6,
+	[TMP_REG_2] = G2,
+	[TMP_REG_3] = G3,
 
 	[SKB_HLEN_REG] = L4,
 	[SKB_DATA_REG] = L5,
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -31,7 +31,8 @@ config SPARC
 	select ARCH_WANT_IPC_PARSE_VERSION
 	select GENERIC_PCI_IOMAP
 	select HAVE_NMI_WATCHDOG if SPARC64
-	select HAVE_CBPF_JIT
+	select HAVE_CBPF_JIT if SPARC32
+	select HAVE_EBPF_JIT if SPARC64
 	select HAVE_DEBUG_BUGVERBOSE
 	select GENERIC_SMP_IDLE_THREAD
 	select GENERIC_CLOCKEVENTS

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ