File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,13 @@ static inline bool is_mov_percpu_addr(const struct bpf_insn *insn)
183183 return insn -> code == (BPF_ALU64 | BPF_MOV | BPF_X ) && insn -> off == BPF_ADDR_PERCPU ;
184184}
185185
186+ static void print_bpf_ja_indirect (bpf_insn_print_t verbose ,
187+ void * private_data ,
188+ const struct bpf_insn * insn )
189+ {
190+ verbose (private_data , "(%02x) gotox r%d\n" , insn -> code , insn -> dst_reg );
191+ }
192+
186193void print_bpf_insn (const struct bpf_insn_cbs * cbs ,
187194 const struct bpf_insn * insn ,
188195 bool allow_ptr_leaks )
@@ -358,6 +365,9 @@ void print_bpf_insn(const struct bpf_insn_cbs *cbs,
358365 } else if (insn -> code == (BPF_JMP | BPF_JA )) {
359366 verbose (cbs -> private_data , "(%02x) goto pc%+d\n" ,
360367 insn -> code , insn -> off );
368+ } else if (insn -> code == (BPF_JMP | BPF_JA | BPF_X ) ||
369+ insn -> code == (BPF_JMP32 | BPF_JA | BPF_X )) {
370+ print_bpf_ja_indirect (verbose , cbs -> private_data , insn );
361371 } else if (insn -> code == (BPF_JMP | BPF_JCOND ) &&
362372 insn -> src_reg == BPF_MAY_GOTO ) {
363373 verbose (cbs -> private_data , "(%02x) may_goto pc%+d\n" ,
You can’t perform that action at this time.
0 commit comments