linux/tools
Gianluca Borello 3c839744b3 bpf: Preserve const register type on const OR alu ops
Occasionally, clang (e.g. version 3.8.1) translates a sum between two
constant operands using a BPF_OR instead of a BPF_ADD. The verifier is
currently not handling this scenario, and the destination register type
becomes UNKNOWN_VALUE even if it's still storing a constant. As a result,
the destination register cannot be used as argument to a helper function
expecting a ARG_CONST_STACK_*, limiting some use cases.

Modify the verifier to handle this case, and add a few tests to make sure
all combinations are supported, and stack boundaries are still verified
even with BPF_OR.

Signed-off-by: Gianluca Borello <g.borello@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-05 13:40:05 -05:00
..
accounting
arch x86/cpufeature: Add AVX512_4VNNIW and AVX512_4FMAPS features 2016-10-19 17:37:13 +02:00
build tools build: Add feature detection for g++ 2016-10-05 19:59:35 -03:00
cgroup
firewire
gpio
hv
iio
include bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
kvm/kvm_stat
laptop
lguest
lib tools lib traceevent: Fix kbuffer_read_at_offset() 2016-10-05 11:36:22 -03:00
net
nfsd
objtool objtool: Fix rare switch jump table pattern detection 2016-10-27 08:20:27 +02:00
pcmcia
perf perf hists: Fix column length on --hierarchy 2016-11-09 11:55:29 -03:00
power tools/power/acpi: Remove direct kernel source include reference 2016-11-16 22:31:26 +01:00
scripts
spi
testing bpf: Preserve const register type on const OR alu ops 2016-12-05 13:40:05 -05:00
thermal/tmon
time
usb
virtio ringtest: poll for new buffers once before updating event index 2016-10-31 00:21:43 +02:00
vm
Makefile