bpf: Handle multiple variable additions into packet pointers in verifier.
authorDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2017 02:30:02 +0000 (19:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 12 May 2017 02:48:58 +0000 (19:48 -0700)
commit6832a333ed4a7cc4fcb170c045d1d96d0976fdd4
tree61befd17c5dbb8c91c1e5593a56f82b97da752c3
parent844cf763fba654436d3a4279b6a672c196cf1901
bpf: Handle multiple variable additions into packet pointers in verifier.

We must accumulate into reg->aux_off rather than use a plain assignment.

Add a test for this situation to test_align.

Reported-by: Alexei Starovoitov <ast@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c
tools/testing/selftests/bpf/test_align.c