Modify some code about test_verifier#11344
Open
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
Open
Modify some code about test_verifier#11344kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
kernel-patches-daemon-bpf[bot] wants to merge 2 commits intobpf-next_basefrom
Conversation
Author
|
Upstream branch: bd2e02e |
026b5c1 to
b72a510
Compare
Author
|
Upstream branch: 0c55d48 |
9a3f905 to
1247c04
Compare
b72a510 to
ebefa82
Compare
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set unconditionally for the most archs such as x86_64, aarch64, ppc64el and s390x, but this config may be not set by users for riscv64 and loongarch64. If CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set, the BPF verifier detects if a program has unaligned access and then rejects them. So it should also check the flag F_NEEDS_EFFICIENT_UNALIGNED_ACCESS if the expected result is REJECT and set alignment_prevented_execution as 1, then the message "(NOTE: not executed due to unknown alignment)" can be printed for some testcases of test_verifier to reflect the reality. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
There exists failure when executing the testcase "./test_verifier 190" if CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set on LoongArch. #190/p calls: two calls that return map_value with incorrect bool check FAIL ... misaligned access off (0x0; 0xffffffffffffffff)+0 size 8 ... Summary: 0 PASSED, 0 SKIPPED, 1 FAILED It means that the program has unaligned accesses, but the kernel sets CONFIG_ARCH_STRICT_ALIGN by default to enable -mstrict-align to prevent unaligned accesses, so add a flag F_NEEDS_EFFICIENT_UNALIGNED_ACCESS into the testcase to avoid the failure. This is somehow similar with the commit ce1f289 ("selftests/bpf: Add F_NEEDS_EFFICIENT_UNALIGNED_ACCESS to some tests"). Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Author
|
Upstream branch: e95e85b |
1247c04 to
509e17f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: Modify some code about test_verifier
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1064123