linux/arch/s390/net
Michael Holzheu 0fa963553a s390/bpf: reduce maximum program size to 64 KB
The s390 BFP compiler currently uses relative branch instructions
that only support jumps up to 64 KB. Examples are "j", "jnz", "cgrj",
etc.  Currently the maximum size of s390 BPF programs is set
to 0x7ffff.  If branches over 64 KB are generated the, kernel can
crash due to incorrect code.

So fix this an reduce the maximum size to 64 KB. Programs larger than
that will be interpreted.

Fixes: ce2b6ad9c1 ("s390/bpf: increase BPF_SIZE_MAX")

Cc: stable@vger.kernel.org # 4.3+
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2016-05-19 09:14:27 +02:00
..
bpf_jit_comp.c s390/bpf: reduce maximum program size to 64 KB 2016-05-19 09:14:27 +02:00
bpf_jit.h s390/bpf: recache skb->data/hlen for skb_vlan_push/pop 2015-07-29 14:59:58 -07:00
bpf_jit.S s390/bpf: Add s390x eBPF JIT compiler backend 2015-04-15 12:23:49 +02:00
Makefile s390/bpf,jit: BPF Just In Time compiler for s390 2012-09-26 15:44:49 +02:00