2 "map element value illegal alu op, 1",
4 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
5 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
6 BPF_ST_MEM(BPF_DW
, BPF_REG_2
, 0, 0),
7 BPF_LD_MAP_FD(BPF_REG_1
, 0),
8 BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem
),
9 BPF_JMP_IMM(BPF_JEQ
, BPF_REG_0
, 0, 2),
10 BPF_ALU64_IMM(BPF_AND
, BPF_REG_0
, 8),
11 BPF_ST_MEM(BPF_DW
, BPF_REG_0
, 0, 22),
14 .fixup_map_hash_48b
= { 3 },
15 .errstr
= "R0 bitwise operator &= on pointer",
19 "map element value illegal alu op, 2",
21 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
22 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
23 BPF_ST_MEM(BPF_DW
, BPF_REG_2
, 0, 0),
24 BPF_LD_MAP_FD(BPF_REG_1
, 0),
25 BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem
),
26 BPF_JMP_IMM(BPF_JEQ
, BPF_REG_0
, 0, 2),
27 BPF_ALU32_IMM(BPF_ADD
, BPF_REG_0
, 0),
28 BPF_ST_MEM(BPF_DW
, BPF_REG_0
, 0, 22),
31 .fixup_map_hash_48b
= { 3 },
32 .errstr
= "R0 32-bit pointer arithmetic prohibited",
36 "map element value illegal alu op, 3",
38 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
39 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
40 BPF_ST_MEM(BPF_DW
, BPF_REG_2
, 0, 0),
41 BPF_LD_MAP_FD(BPF_REG_1
, 0),
42 BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem
),
43 BPF_JMP_IMM(BPF_JEQ
, BPF_REG_0
, 0, 2),
44 BPF_ALU64_IMM(BPF_DIV
, BPF_REG_0
, 42),
45 BPF_ST_MEM(BPF_DW
, BPF_REG_0
, 0, 22),
48 .fixup_map_hash_48b
= { 3 },
49 .errstr
= "R0 pointer arithmetic with /= operator",
53 "map element value illegal alu op, 4",
55 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
56 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
57 BPF_ST_MEM(BPF_DW
, BPF_REG_2
, 0, 0),
58 BPF_LD_MAP_FD(BPF_REG_1
, 0),
59 BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem
),
60 BPF_JMP_IMM(BPF_JEQ
, BPF_REG_0
, 0, 2),
61 BPF_ENDIAN(BPF_FROM_BE
, BPF_REG_0
, 64),
62 BPF_ST_MEM(BPF_DW
, BPF_REG_0
, 0, 22),
65 .fixup_map_hash_48b
= { 3 },
66 .errstr_unpriv
= "R0 pointer arithmetic prohibited",
67 .errstr
= "invalid mem access 'inv'",
69 .result_unpriv
= REJECT
,
70 .flags
= F_NEEDS_EFFICIENT_UNALIGNED_ACCESS
,
73 "map element value illegal alu op, 5",
75 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
76 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
77 BPF_ST_MEM(BPF_DW
, BPF_REG_2
, 0, 0),
78 BPF_LD_MAP_FD(BPF_REG_1
, 0),
79 BPF_EMIT_CALL(BPF_FUNC_map_lookup_elem
),
80 BPF_JMP_IMM(BPF_JEQ
, BPF_REG_0
, 0, 7),
81 BPF_MOV64_IMM(BPF_REG_3
, 4096),
82 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
83 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
84 BPF_STX_MEM(BPF_DW
, BPF_REG_2
, BPF_REG_0
, 0),
85 BPF_STX_XADD(BPF_DW
, BPF_REG_2
, BPF_REG_3
, 0),
86 BPF_LDX_MEM(BPF_DW
, BPF_REG_0
, BPF_REG_2
, 0),
87 BPF_ST_MEM(BPF_DW
, BPF_REG_0
, 0, 22),
90 .fixup_map_hash_48b
= { 3 },
91 .errstr_unpriv
= "leaking pointer from stack off -8",
92 .errstr
= "R0 invalid mem access 'inv'",
94 .flags
= F_NEEDS_EFFICIENT_UNALIGNED_ACCESS
,