summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/verifier/jmp32.c
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@gmail.com>2019-02-05 15:41:25 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2019-02-05 18:56:10 +0300
commite2c6f50e48849298bed694de03cceb537d95cdc4 (patch)
treede65f65ba0b2109f46edd4b0c41572adefa717d7 /tools/testing/selftests/bpf/verifier/jmp32.c
parente8cb0167ae684ed2f73cd880c385b74ef2ae702e (diff)
downloadlinux-e2c6f50e48849298bed694de03cceb537d95cdc4.tar.xz
selftests/bpf: add "any alignment" annotation for some tests
RISC-V does, in-general, not have "efficient unaligned access". When testing the RISC-V BPF JIT, some selftests failed in the verification due to misaligned access. Annotate these tests with the F_NEEDS_EFFICIENT_UNALIGNED_ACCESS flag. Signed-off-by: Björn Töpel <bjorn.topel@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier/jmp32.c')
-rw-r--r--tools/testing/selftests/bpf/verifier/jmp32.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/verifier/jmp32.c b/tools/testing/selftests/bpf/verifier/jmp32.c
index ceb39ffa0e88..f0961c58581e 100644
--- a/tools/testing/selftests/bpf/verifier/jmp32.c
+++ b/tools/testing/selftests/bpf/verifier/jmp32.c
@@ -27,6 +27,7 @@
.data64 = { 1ULL << 63 | 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jset32: BPF_X",
@@ -58,6 +59,7 @@
.data64 = { 1ULL << 63 | 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jset32: min/max deduction",
@@ -93,6 +95,7 @@
.data64 = { -1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jeq32: BPF_X",
@@ -119,6 +122,7 @@
.data64 = { 1ULL << 63 | 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jeq32: min/max deduction",
@@ -154,6 +158,7 @@
.data64 = { -1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jne32: BPF_X",
@@ -180,6 +185,7 @@
.data64 = { 1ULL << 63 | 2, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jne32: min/max deduction",
@@ -218,6 +224,7 @@
.data64 = { 0, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jge32: BPF_X",
@@ -244,6 +251,7 @@
.data64 = { (UINT_MAX - 1) | 2ULL << 32, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jge32: min/max deduction",
@@ -284,6 +292,7 @@
.data64 = { 0, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jgt32: BPF_X",
@@ -310,6 +319,7 @@
.data64 = { (UINT_MAX - 1) | 2ULL << 32, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jgt32: min/max deduction",
@@ -350,6 +360,7 @@
.data64 = { INT_MAX, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jle32: BPF_X",
@@ -376,6 +387,7 @@
.data64 = { UINT_MAX, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jle32: min/max deduction",
@@ -416,6 +428,7 @@
.data64 = { INT_MAX - 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jlt32: BPF_X",
@@ -442,6 +455,7 @@
.data64 = { (INT_MAX - 1) | 3ULL << 32, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jlt32: min/max deduction",
@@ -482,6 +496,7 @@
.data64 = { -2, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jsge32: BPF_X",
@@ -508,6 +523,7 @@
.data64 = { -2, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jsge32: min/max deduction",
@@ -548,6 +564,7 @@
.data64 = { 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jsgt32: BPF_X",
@@ -574,6 +591,7 @@
.data64 = { 0x7fffffff, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jsgt32: min/max deduction",
@@ -614,6 +632,7 @@
.data64 = { 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jsle32: BPF_X",
@@ -640,6 +659,7 @@
.data64 = { 0x7fffffff | 2ULL << 32, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jsle32: min/max deduction",
@@ -680,6 +700,7 @@
.data64 = { 1, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jslt32: BPF_X",
@@ -706,6 +727,7 @@
.data64 = { 0x7fffffff | 2ULL << 32, }
},
},
+ .flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
},
{
"jslt32: min/max deduction",