]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Adjust F_NEEDS_EFFICIENT_UNALIGNED_ACCESS handling in test_verifier.c
authorDavid Miller <davem@davemloft.net>
Sat, 1 Dec 2018 05:08:26 +0000 (21:08 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 1 Dec 2018 05:38:48 +0000 (21:38 -0800)
commit946d56b9a20c4217de6ad26a50a1768de5b9075a
tree73d1e878ca47383a15d562a93a19d68240d62787
parent5d5adade18102e0d6c569d37de787b31405b4315
bpf: Adjust F_NEEDS_EFFICIENT_UNALIGNED_ACCESS handling in test_verifier.c

Make it set the flag argument to bpf_verify_program() which will relax
the alignment restrictions.

Now all such test cases will go properly through the verifier even on
inefficient unaligned access architectures.

On inefficient unaligned access architectures do not try to run such
programs, instead mark the test case as passing but annotate the
result similarly to how it is done now in the presence of this flag.

So, we get complete full coverage for all REJECT test cases, and at
least verifier level coverage for ACCEPT test cases.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/test_verifier.c