summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2018-12-01 08:38:49 +0300
committerAlexei Starovoitov <ast@kernel.org>2018-12-01 08:38:49 +0300
commit9ffd05d9b78a2fb393d31936886c320b1d6e438f (patch)
tree64414ade83109cdb78f8a702d58ae59f1b72e7b8 /init
parent88945f460603ad8909b556c67a9229bb23188d41 (diff)
parent0a68632488aa0129ed530af9ae9e8573f5650812 (diff)
downloadlinux-9ffd05d9b78a2fb393d31936886c320b1d6e438f.tar.xz
Merge branch 'improve-test-coverage-sparc'
David Miller says: ==================== On sparc64 a ton of test cases in test_verifier.c fail because the memory accesses in the test case are unaligned (or cannot be proven to be aligned by the verifier). Perhaps we can eventually try to (carefully) modify each test case which has this problem to not use unaligned accesses but: 1) That is delicate work. 2) The changes might not fully respect the original intention of the testcase. 3) In some cases, such a transformation might not even be feasible at all. So add an "any alignment" flag to tell the verifier to forcefully disable it's alignment checks completely. test_verifier.c is then annotated to use this flag when necessary. The presence of the flag in each test case is good documentation to anyone who wants to actually tackle the job of eliminating the unaligned memory accesses in the test cases. I've also seen several weird things in test cases, like trying to access __skb->mark in a packet buffer. This gets rid of 104 test_verifier.c failures on sparc64. Changes since v1: 1) Explain the new BPF_PROG_LOAD flag in easier to understand terms. Suggested by Alexei. 2) Make bpf_verify_program() just take a __u32 prog_flags instead of just accumulating boolean arguments over and over. Also suggested by Alexei. Changes since RFC: 1) Only the admin can allow the relaxation of alignment restrictions on inefficient unaligned access architectures. 2) Use F_NEEDS_EFFICIENT_UNALIGNED_ACCESS instead of making a new flag. 3) Annotate in the output, when we have a test case that the verifier accepted but we did not try to execute because we are on an inefficient unaligned access platform. Maybe with some arch machinery we can avoid this in the future. Signed-off-by: David S. Miller <davem@davemloft.net> ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions