]> 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)
commitb55e885a09f87e3cf4aab5dbc31e31ea89052aa5
tree73d1e878ca47383a15d562a93a19d68240d62787
parentbc9d9eaf05a77ce10cc548fffd769137e9d7a881
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