提交 42cb0908 编写于 作者: D David S. Miller 提交者: Yang Yingliang

bpf: Make more use of 'any' alignment in test_verifier.c

commit 2acc5fd5 upstream

Use F_NEEDS_EFFICIENT_UNALIGNED_ACCESS in more tests where the
expected result is REJECT.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NAlexei Starovoitov <ast@kernel.org>
Signed-off-by: NTiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 608e9a7c
...@@ -1799,6 +1799,7 @@ static struct bpf_test tests[] = { ...@@ -1799,6 +1799,7 @@ static struct bpf_test tests[] = {
.errstr = "invalid bpf_context access", .errstr = "invalid bpf_context access",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_SK_MSG, .prog_type = BPF_PROG_TYPE_SK_MSG,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"direct packet read for SK_MSG", "direct packet read for SK_MSG",
...@@ -2191,6 +2192,7 @@ static struct bpf_test tests[] = { ...@@ -2191,6 +2192,7 @@ static struct bpf_test tests[] = {
}, },
.errstr = "invalid bpf_context access", .errstr = "invalid bpf_context access",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"check cb access: half, wrong type", "check cb access: half, wrong type",
...@@ -3151,6 +3153,7 @@ static struct bpf_test tests[] = { ...@@ -3151,6 +3153,7 @@ static struct bpf_test tests[] = {
.result = REJECT, .result = REJECT,
.errstr = "R0 invalid mem access 'inv'", .errstr = "R0 invalid mem access 'inv'",
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"raw_stack: skb_load_bytes, spilled regs corruption 2", "raw_stack: skb_load_bytes, spilled regs corruption 2",
...@@ -3181,6 +3184,7 @@ static struct bpf_test tests[] = { ...@@ -3181,6 +3184,7 @@ static struct bpf_test tests[] = {
.result = REJECT, .result = REJECT,
.errstr = "R3 invalid mem access 'inv'", .errstr = "R3 invalid mem access 'inv'",
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"raw_stack: skb_load_bytes, spilled regs + data", "raw_stack: skb_load_bytes, spilled regs + data",
...@@ -3680,6 +3684,7 @@ static struct bpf_test tests[] = { ...@@ -3680,6 +3684,7 @@ static struct bpf_test tests[] = {
.errstr = "R2 invalid mem access 'inv'", .errstr = "R2 invalid mem access 'inv'",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"direct packet access: test16 (arith on data_end)", "direct packet access: test16 (arith on data_end)",
...@@ -3863,6 +3868,7 @@ static struct bpf_test tests[] = { ...@@ -3863,6 +3868,7 @@ static struct bpf_test tests[] = {
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.result = REJECT, .result = REJECT,
.errstr = "invalid access to packet, off=0 size=8, R5(id=1,off=0,r=0)", .errstr = "invalid access to packet, off=0 size=8, R5(id=1,off=0,r=0)",
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"direct packet access: test24 (x += pkt_ptr, 5)", "direct packet access: test24 (x += pkt_ptr, 5)",
...@@ -4767,6 +4773,7 @@ static struct bpf_test tests[] = { ...@@ -4767,6 +4773,7 @@ static struct bpf_test tests[] = {
.result = REJECT, .result = REJECT,
.errstr = "invalid access to map value, value_size=64 off=-2 size=4", .errstr = "invalid access to map value, value_size=64 off=-2 size=4",
.prog_type = BPF_PROG_TYPE_CGROUP_SKB, .prog_type = BPF_PROG_TYPE_CGROUP_SKB,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"invalid cgroup storage access 5", "invalid cgroup storage access 5",
...@@ -6433,6 +6440,7 @@ static struct bpf_test tests[] = { ...@@ -6433,6 +6440,7 @@ static struct bpf_test tests[] = {
.errstr = "invalid mem access 'inv'", .errstr = "invalid mem access 'inv'",
.result = REJECT, .result = REJECT,
.result_unpriv = REJECT, .result_unpriv = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"map element value illegal alu op, 5", "map element value illegal alu op, 5",
...@@ -6455,6 +6463,7 @@ static struct bpf_test tests[] = { ...@@ -6455,6 +6463,7 @@ static struct bpf_test tests[] = {
.fixup_map2 = { 3 }, .fixup_map2 = { 3 },
.errstr = "R0 invalid mem access 'inv'", .errstr = "R0 invalid mem access 'inv'",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"map element value is preserved across register spilling", "map element value is preserved across register spilling",
...@@ -8951,6 +8960,7 @@ static struct bpf_test tests[] = { ...@@ -8951,6 +8960,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_end > pkt_data', good access", "XDP pkt read, pkt_end > pkt_data', good access",
...@@ -8989,6 +8999,7 @@ static struct bpf_test tests[] = { ...@@ -8989,6 +8999,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_end > pkt_data', bad access 2", "XDP pkt read, pkt_end > pkt_data', bad access 2",
...@@ -9007,6 +9018,7 @@ static struct bpf_test tests[] = { ...@@ -9007,6 +9018,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data' < pkt_end, good access", "XDP pkt read, pkt_data' < pkt_end, good access",
...@@ -9045,6 +9057,7 @@ static struct bpf_test tests[] = { ...@@ -9045,6 +9057,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data' < pkt_end, bad access 2", "XDP pkt read, pkt_data' < pkt_end, bad access 2",
...@@ -9063,6 +9076,7 @@ static struct bpf_test tests[] = { ...@@ -9063,6 +9076,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_end < pkt_data', good access", "XDP pkt read, pkt_end < pkt_data', good access",
...@@ -9117,6 +9131,7 @@ static struct bpf_test tests[] = { ...@@ -9117,6 +9131,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data' >= pkt_end, good access", "XDP pkt read, pkt_data' >= pkt_end, good access",
...@@ -9153,6 +9168,7 @@ static struct bpf_test tests[] = { ...@@ -9153,6 +9168,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data' >= pkt_end, bad access 2", "XDP pkt read, pkt_data' >= pkt_end, bad access 2",
...@@ -9228,6 +9244,7 @@ static struct bpf_test tests[] = { ...@@ -9228,6 +9244,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data' <= pkt_end, good access", "XDP pkt read, pkt_data' <= pkt_end, good access",
...@@ -9284,6 +9301,7 @@ static struct bpf_test tests[] = { ...@@ -9284,6 +9301,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_end <= pkt_data', good access", "XDP pkt read, pkt_end <= pkt_data', good access",
...@@ -9320,6 +9338,7 @@ static struct bpf_test tests[] = { ...@@ -9320,6 +9338,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_end <= pkt_data', bad access 2", "XDP pkt read, pkt_end <= pkt_data', bad access 2",
...@@ -9393,6 +9412,7 @@ static struct bpf_test tests[] = { ...@@ -9393,6 +9412,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data > pkt_meta', good access", "XDP pkt read, pkt_data > pkt_meta', good access",
...@@ -9431,6 +9451,7 @@ static struct bpf_test tests[] = { ...@@ -9431,6 +9451,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data > pkt_meta', bad access 2", "XDP pkt read, pkt_data > pkt_meta', bad access 2",
...@@ -9449,6 +9470,7 @@ static struct bpf_test tests[] = { ...@@ -9449,6 +9470,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_meta' < pkt_data, good access", "XDP pkt read, pkt_meta' < pkt_data, good access",
...@@ -9487,6 +9509,7 @@ static struct bpf_test tests[] = { ...@@ -9487,6 +9509,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_meta' < pkt_data, bad access 2", "XDP pkt read, pkt_meta' < pkt_data, bad access 2",
...@@ -9505,6 +9528,7 @@ static struct bpf_test tests[] = { ...@@ -9505,6 +9528,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data < pkt_meta', good access", "XDP pkt read, pkt_data < pkt_meta', good access",
...@@ -9559,6 +9583,7 @@ static struct bpf_test tests[] = { ...@@ -9559,6 +9583,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_meta' >= pkt_data, good access", "XDP pkt read, pkt_meta' >= pkt_data, good access",
...@@ -9595,6 +9620,7 @@ static struct bpf_test tests[] = { ...@@ -9595,6 +9620,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_meta' >= pkt_data, bad access 2", "XDP pkt read, pkt_meta' >= pkt_data, bad access 2",
...@@ -9670,6 +9696,7 @@ static struct bpf_test tests[] = { ...@@ -9670,6 +9696,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_meta' <= pkt_data, good access", "XDP pkt read, pkt_meta' <= pkt_data, good access",
...@@ -9726,6 +9753,7 @@ static struct bpf_test tests[] = { ...@@ -9726,6 +9753,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data <= pkt_meta', good access", "XDP pkt read, pkt_data <= pkt_meta', good access",
...@@ -9762,6 +9790,7 @@ static struct bpf_test tests[] = { ...@@ -9762,6 +9790,7 @@ static struct bpf_test tests[] = {
.errstr = "R1 offset is outside of the packet", .errstr = "R1 offset is outside of the packet",
.result = REJECT, .result = REJECT,
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"XDP pkt read, pkt_data <= pkt_meta', bad access 2", "XDP pkt read, pkt_data <= pkt_meta', bad access 2",
...@@ -9876,6 +9905,7 @@ static struct bpf_test tests[] = { ...@@ -9876,6 +9905,7 @@ static struct bpf_test tests[] = {
.errstr_unpriv = "R1 has pointer with unsupported alu operation", .errstr_unpriv = "R1 has pointer with unsupported alu operation",
.errstr = "dereference of modified ctx ptr", .errstr = "dereference of modified ctx ptr",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"check deducing bounds from const, 8", "check deducing bounds from const, 8",
...@@ -9890,6 +9920,7 @@ static struct bpf_test tests[] = { ...@@ -9890,6 +9920,7 @@ static struct bpf_test tests[] = {
.errstr_unpriv = "R1 has pointer with unsupported alu operation", .errstr_unpriv = "R1 has pointer with unsupported alu operation",
.errstr = "dereference of modified ctx ptr", .errstr = "dereference of modified ctx ptr",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"check deducing bounds from const, 9", "check deducing bounds from const, 9",
...@@ -10365,6 +10396,7 @@ static struct bpf_test tests[] = { ...@@ -10365,6 +10396,7 @@ static struct bpf_test tests[] = {
.result = REJECT, .result = REJECT,
.errstr = "R6 invalid mem access 'inv'", .errstr = "R6 invalid mem access 'inv'",
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: two calls with args", "calls: two calls with args",
...@@ -11230,6 +11262,7 @@ static struct bpf_test tests[] = { ...@@ -11230,6 +11262,7 @@ static struct bpf_test tests[] = {
.fixup_map1 = { 12, 22 }, .fixup_map1 = { 12, 22 },
.result = REJECT, .result = REJECT,
.errstr = "invalid access to map value, value_size=8 off=2 size=8", .errstr = "invalid access to map value, value_size=8 off=2 size=8",
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: two calls that receive map_value via arg=ptr_stack_of_caller. test2", "calls: two calls that receive map_value via arg=ptr_stack_of_caller. test2",
...@@ -11373,6 +11406,7 @@ static struct bpf_test tests[] = { ...@@ -11373,6 +11406,7 @@ static struct bpf_test tests[] = {
.fixup_map1 = { 12, 22 }, .fixup_map1 = { 12, 22 },
.result = REJECT, .result = REJECT,
.errstr = "invalid access to map value, value_size=8 off=2 size=8", .errstr = "invalid access to map value, value_size=8 off=2 size=8",
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: two calls that receive map_value_ptr_or_null via arg. test1", "calls: two calls that receive map_value_ptr_or_null via arg. test1",
...@@ -11544,6 +11578,7 @@ static struct bpf_test tests[] = { ...@@ -11544,6 +11578,7 @@ static struct bpf_test tests[] = {
.result = ACCEPT, .result = ACCEPT,
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.retval = POINTER_VALUE, .retval = POINTER_VALUE,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: pkt_ptr spill into caller stack 2", "calls: pkt_ptr spill into caller stack 2",
...@@ -11575,6 +11610,7 @@ static struct bpf_test tests[] = { ...@@ -11575,6 +11610,7 @@ static struct bpf_test tests[] = {
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.errstr = "invalid access to packet", .errstr = "invalid access to packet",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: pkt_ptr spill into caller stack 3", "calls: pkt_ptr spill into caller stack 3",
...@@ -11677,6 +11713,7 @@ static struct bpf_test tests[] = { ...@@ -11677,6 +11713,7 @@ static struct bpf_test tests[] = {
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.errstr = "same insn cannot be used with different", .errstr = "same insn cannot be used with different",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: pkt_ptr spill into caller stack 6", "calls: pkt_ptr spill into caller stack 6",
...@@ -11712,6 +11749,7 @@ static struct bpf_test tests[] = { ...@@ -11712,6 +11749,7 @@ static struct bpf_test tests[] = {
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.errstr = "R4 invalid mem access", .errstr = "R4 invalid mem access",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: pkt_ptr spill into caller stack 7", "calls: pkt_ptr spill into caller stack 7",
...@@ -11746,6 +11784,7 @@ static struct bpf_test tests[] = { ...@@ -11746,6 +11784,7 @@ static struct bpf_test tests[] = {
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.errstr = "R4 invalid mem access", .errstr = "R4 invalid mem access",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: pkt_ptr spill into caller stack 8", "calls: pkt_ptr spill into caller stack 8",
...@@ -11827,6 +11866,7 @@ static struct bpf_test tests[] = { ...@@ -11827,6 +11866,7 @@ static struct bpf_test tests[] = {
.prog_type = BPF_PROG_TYPE_SCHED_CLS, .prog_type = BPF_PROG_TYPE_SCHED_CLS,
.errstr = "invalid access to packet", .errstr = "invalid access to packet",
.result = REJECT, .result = REJECT,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"calls: caller stack init to zero or map_value_or_null", "calls: caller stack init to zero or map_value_or_null",
...@@ -12192,6 +12232,7 @@ static struct bpf_test tests[] = { ...@@ -12192,6 +12232,7 @@ static struct bpf_test tests[] = {
.result = REJECT, .result = REJECT,
.errstr = "BPF_XADD stores into R2 packet", .errstr = "BPF_XADD stores into R2 packet",
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.flags = F_NEEDS_EFFICIENT_UNALIGNED_ACCESS,
}, },
{ {
"xadd/w check whether src/dst got mangled, 1", "xadd/w check whether src/dst got mangled, 1",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册