• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 {
2 	"ld_ind: check calling conv, r1",
3 	.insns = {
4 	BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
5 	BPF_MOV64_IMM(BPF_REG_1, 1),
6 	BPF_LD_IND(BPF_W, BPF_REG_1, -0x200000),
7 	BPF_MOV64_REG(BPF_REG_0, BPF_REG_1),
8 	BPF_EXIT_INSN(),
9 	},
10 	.errstr = "R1 !read_ok",
11 	.result = REJECT,
12 },
13 {
14 	"ld_ind: check calling conv, r2",
15 	.insns = {
16 	BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
17 	BPF_MOV64_IMM(BPF_REG_2, 1),
18 	BPF_LD_IND(BPF_W, BPF_REG_2, -0x200000),
19 	BPF_MOV64_REG(BPF_REG_0, BPF_REG_2),
20 	BPF_EXIT_INSN(),
21 	},
22 	.errstr = "R2 !read_ok",
23 	.result = REJECT,
24 },
25 {
26 	"ld_ind: check calling conv, r3",
27 	.insns = {
28 	BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
29 	BPF_MOV64_IMM(BPF_REG_3, 1),
30 	BPF_LD_IND(BPF_W, BPF_REG_3, -0x200000),
31 	BPF_MOV64_REG(BPF_REG_0, BPF_REG_3),
32 	BPF_EXIT_INSN(),
33 	},
34 	.errstr = "R3 !read_ok",
35 	.result = REJECT,
36 },
37 {
38 	"ld_ind: check calling conv, r4",
39 	.insns = {
40 	BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
41 	BPF_MOV64_IMM(BPF_REG_4, 1),
42 	BPF_LD_IND(BPF_W, BPF_REG_4, -0x200000),
43 	BPF_MOV64_REG(BPF_REG_0, BPF_REG_4),
44 	BPF_EXIT_INSN(),
45 	},
46 	.errstr = "R4 !read_ok",
47 	.result = REJECT,
48 },
49 {
50 	"ld_ind: check calling conv, r5",
51 	.insns = {
52 	BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
53 	BPF_MOV64_IMM(BPF_REG_5, 1),
54 	BPF_LD_IND(BPF_W, BPF_REG_5, -0x200000),
55 	BPF_MOV64_REG(BPF_REG_0, BPF_REG_5),
56 	BPF_EXIT_INSN(),
57 	},
58 	.errstr = "R5 !read_ok",
59 	.result = REJECT,
60 },
61 {
62 	"ld_ind: check calling conv, r7",
63 	.insns = {
64 	BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
65 	BPF_MOV64_IMM(BPF_REG_7, 1),
66 	BPF_LD_IND(BPF_W, BPF_REG_7, -0x200000),
67 	BPF_MOV64_REG(BPF_REG_0, BPF_REG_7),
68 	BPF_EXIT_INSN(),
69 	},
70 	.result = ACCEPT,
71 	.retval = 1,
72 },
73