2 "prevent map lookup in sockmap",
4 BPF_ST_MEM(BPF_DW
, BPF_REG_10
, -8, 0),
5 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
6 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
7 BPF_LD_MAP_FD(BPF_REG_1
, 0),
8 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_map_lookup_elem
),
11 .fixup_map_sockmap
= { 3 },
13 .errstr
= "cannot pass map_type 15 into func bpf_map_lookup_elem",
14 .prog_type
= BPF_PROG_TYPE_SOCK_OPS
,
17 "prevent map lookup in sockhash",
19 BPF_ST_MEM(BPF_DW
, BPF_REG_10
, -8, 0),
20 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
21 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
22 BPF_LD_MAP_FD(BPF_REG_1
, 0),
23 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_map_lookup_elem
),
26 .fixup_map_sockhash
= { 3 },
28 .errstr
= "cannot pass map_type 18 into func bpf_map_lookup_elem",
29 .prog_type
= BPF_PROG_TYPE_SOCK_OPS
,
32 "prevent map lookup in stack trace",
34 BPF_ST_MEM(BPF_DW
, BPF_REG_10
, -8, 0),
35 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
36 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
37 BPF_LD_MAP_FD(BPF_REG_1
, 0),
38 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_map_lookup_elem
),
41 .fixup_map_stacktrace
= { 3 },
43 .errstr
= "cannot pass map_type 7 into func bpf_map_lookup_elem",
44 .prog_type
= BPF_PROG_TYPE_PERF_EVENT
,
47 "prevent map lookup in prog array",
49 BPF_ST_MEM(BPF_DW
, BPF_REG_10
, -8, 0),
50 BPF_MOV64_REG(BPF_REG_2
, BPF_REG_10
),
51 BPF_ALU64_IMM(BPF_ADD
, BPF_REG_2
, -8),
52 BPF_LD_MAP_FD(BPF_REG_1
, 0),
53 BPF_RAW_INSN(BPF_JMP
| BPF_CALL
, 0, 0, 0, BPF_FUNC_map_lookup_elem
),
58 .errstr
= "cannot pass map_type 3 into func bpf_map_lookup_elem",