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-next>] [day] [month] [year] [list]
Message-ID: <09d713a59665d745e21d021deeaebe0a@dlink.ru>
Date:   Thu, 05 Dec 2019 15:45:27 +0300
From:   Alexander Lobakin <alobakin@...nk.ru>
To:     Paul Burton <paul.burton@...s.com>
Cc:     Hassan Naveed <hnaveed@...ecomp.com>,
        Ralf Baechle <ralf@...ux-mips.org>,
        James Hogan <jhogan@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Andrii Nakryiko <andriin@...com>, netdev@...r.kernel.org,
        bpf@...r.kernel.org, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: MIPS eBPF JIT support on pre-32R2

Hey all,

I'm writing about lines arch/mips/net/ebpf_jit.c:1806-1807:

	if (!prog->jit_requested || MIPS_ISA_REV < 2)
		return prog;

Do pre-32R2 architectures (32R1, maybe even R3000-like) actually support
this eBPF JIT code? If they do, then the condition 'MIPS_ISA_REV < 2'
should be removed as it is always true for them and tells CC to remove
JIT completely.

If they don't support instructions from this JIT, then the line
arch/mips/Kconfig:50:

	select HAVE_EBPF_JIT if (!CPU_MICROMIPS)

should be changed to something like:

	select HAVE_EBPF_JIT if !CPU_MICROMIPS && TARGET_ISA_REV >= 2

(and then the mentioned 'if' condition would become redundant)

At the moment it is possible to build a kernel without both JIT and
interpreter, but with CONFIG_BPF_SYSCALL=y (what should not be allowed
I suppose?) within the following configuration:

- select any pre-32R2 CPU (e.g. CONFIG_CPU_MIPS32_R1);
- enable CONFIG_BPF_JIT (CONFIG_MIPS_EBPF_JIT will be autoselected);
- enable CONFIG_BPF_JIT_ALWAYS_ON (this removes BPF interpreter from
   the system).

I may prepare a proper patch by myself if needed (after clarification).
Thanks.

Regards,
ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ