]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: provide helper that indicates eBPF was migrated
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 30 Jul 2015 10:42:47 +0000 (12:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jul 2015 18:13:20 +0000 (11:13 -0700)
commitf8f24ebf75204c831fbdc975952f01f9cdb5d67f
tree13d386f67becd762c92ce75ae4277ab36bf500f9
parenta9b52ffb27e400f38d449e6ac2b0a1a7447a0327
bpf: provide helper that indicates eBPF was migrated

During recent discussions we had with Michael, we found that it would
be useful to have an indicator that tells the JIT that an eBPF program
had been migrated from classic instructions into eBPF instructions, as
only in that case A and X need to be cleared in the prologue. Such eBPF
programs do not set a particular type, but all have BPF_PROG_TYPE_UNSPEC.
Thus, introduce a small helper for ac692962ddae ("s390/bpf: Only clear
A and X for converted BPF programs") and possibly others in future.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/s390/net/bpf_jit_comp.c
include/linux/filter.h