xref: /kernel/linux/linux-5.10/tools/testing/selftests/bpf/verifier/basic.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/tools/testing/selftests/bpf/verifier/
18c2ecf20Sopenharmony_ci{
28c2ecf20Sopenharmony_ci	"empty prog",
38c2ecf20Sopenharmony_ci	.insns = {
48c2ecf20Sopenharmony_ci	},
58c2ecf20Sopenharmony_ci	.errstr = "last insn is not an exit or jmp",
68c2ecf20Sopenharmony_ci	.result = REJECT,
78c2ecf20Sopenharmony_ci},
88c2ecf20Sopenharmony_ci{
98c2ecf20Sopenharmony_ci	"only exit insn",
108c2ecf20Sopenharmony_ci	.insns = {
118c2ecf20Sopenharmony_ci	BPF_EXIT_INSN(),
128c2ecf20Sopenharmony_ci	},
138c2ecf20Sopenharmony_ci	.errstr = "R0 !read_ok",
148c2ecf20Sopenharmony_ci	.result = REJECT,
158c2ecf20Sopenharmony_ci},
168c2ecf20Sopenharmony_ci{
178c2ecf20Sopenharmony_ci	"no bpf_exit",
188c2ecf20Sopenharmony_ci	.insns = {
198c2ecf20Sopenharmony_ci	BPF_ALU64_REG(BPF_MOV, BPF_REG_0, BPF_REG_2),
208c2ecf20Sopenharmony_ci	},
218c2ecf20Sopenharmony_ci	.errstr = "not an exit",
228c2ecf20Sopenharmony_ci	.result = REJECT,
238c2ecf20Sopenharmony_ci},
24

Indexes created Thu Nov 07 10:32:03 CST 2024