diff options
author | 2023-04-21 23:45:14 +0300 | |
---|---|---|
committer | 2023-04-22 08:26:58 -0700 | |
commit | 35150203e30b52d657165e325e3abc3b29c2086d (patch) | |
tree | 42924574a6541d46b70a6dcf4cbdb61e409b00ad /tools/testing/selftests/bpf/verifier/prevent_map_lookup.c | |
parent | bpf: fix link failure with NETFILTER=y INET=n (diff) | |
download | linux-35150203e30b52d657165e325e3abc3b29c2086d.tar.gz linux-35150203e30b52d657165e325e3abc3b29c2086d.tar.bz2 linux-35150203e30b52d657165e325e3abc3b29c2086d.zip |
selftests/bpf: verifier/prevent_map_lookup converted to inline assembly
Test verifier/prevent_map_lookup automatically converted to use inline assembly.
This was a part of a series [1] but could not be applied becuase
another patch from a series had to be witheld.
[1] https://lore.kernel.org/bpf/20230421174234.2391278-1-eddyz87@gmail.com/
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20230421204514.2450907-1-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/verifier/prevent_map_lookup.c')
-rw-r--r-- | tools/testing/selftests/bpf/verifier/prevent_map_lookup.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tools/testing/selftests/bpf/verifier/prevent_map_lookup.c b/tools/testing/selftests/bpf/verifier/prevent_map_lookup.c deleted file mode 100644 index fc4e301260f6..000000000000 --- a/tools/testing/selftests/bpf/verifier/prevent_map_lookup.c +++ /dev/null @@ -1,29 +0,0 @@ -{ - "prevent map lookup in stack trace", - .insns = { - BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), - BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), - BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), - BPF_LD_MAP_FD(BPF_REG_1, 0), - BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem), - BPF_EXIT_INSN(), - }, - .fixup_map_stacktrace = { 3 }, - .result = REJECT, - .errstr = "cannot pass map_type 7 into func bpf_map_lookup_elem", - .prog_type = BPF_PROG_TYPE_PERF_EVENT, -}, -{ - "prevent map lookup in prog array", - .insns = { - BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), - BPF_MOV64_REG(BPF_REG_2, BPF_REG_10), - BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8), - BPF_LD_MAP_FD(BPF_REG_1, 0), - BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0, BPF_FUNC_map_lookup_elem), - BPF_EXIT_INSN(), - }, - .fixup_prog2 = { 3 }, - .result = REJECT, - .errstr = "cannot pass map_type 3 into func bpf_map_lookup_elem", -}, |