]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita95fcb0c1d9d1a8d9494ae3c5c8036f9f64c824c
tree61befd17c5dbb8c91c1e5593a56f82b97da752c3
parentf555caeb3edb48c2c278c2807e438366a189bda0
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