archive mirror
 help / color / mirror / Atom feed
* MIPS eBPF JIT support on pre-32R2
@ 2019-12-05 12:45 Alexander Lobakin
  2019-12-05 13:04 ` Daniel Borkmann
  2019-12-05 18:44 ` Paul Burton
  0 siblings, 2 replies; 5+ messages in thread
From: Alexander Lobakin @ 2019-12-05 12:45 UTC (permalink / raw)
  To: Paul Burton
  Cc: Hassan Naveed, Ralf Baechle, James Hogan, Alexei Starovoitov,
	Daniel Borkmann, Martin KaFai Lau, Song Liu, Yonghong Song,
	Andrii Nakryiko, netdev, bpf, linux-mips, linux-kernel

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


should be changed to something like:


(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).

ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-12-06  8:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 12:45 MIPS eBPF JIT support on pre-32R2 Alexander Lobakin
2019-12-05 13:04 ` Daniel Borkmann
2019-12-05 18:44 ` Paul Burton
2019-12-06  7:20   ` Alexander Lobakin
2019-12-06  8:11     ` Alexander Lobakin

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).