diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-10-18 21:34:55 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-10-18 23:16:02 +0300 |
commit | 3ddeac6705aba31b7528c7d7a528eabb74475622 (patch) | |
tree | 597a7e02253df1425deec7189c2c973c9e88ea22 /tools/bpf/bpftool/jit_disasm.c | |
parent | 1bd70d2eba9d90eb787634361f0f6fa2c86b3f6d (diff) | |
download | linux-3ddeac6705aba31b7528c7d7a528eabb74475622.tar.xz |
tools: bpftool: use 4 context mode for the NFP disasm
The nfp driver is currently always JITing the BPF for 4 context/thread
mode of the NFP flow processors. Tell this to the disassembler,
otherwise some registers may be incorrectly decoded.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/jit_disasm.c')
-rw-r--r-- | tools/bpf/bpftool/jit_disasm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/jit_disasm.c b/tools/bpf/bpftool/jit_disasm.c index 87439320ef70..c75ffd9ce2bb 100644 --- a/tools/bpf/bpftool/jit_disasm.c +++ b/tools/bpf/bpftool/jit_disasm.c @@ -77,7 +77,7 @@ static int fprintf_json(void *out, const char *fmt, ...) } void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes, - const char *arch) + const char *arch, const char *disassembler_options) { disassembler_ftype disassemble; struct disassemble_info info; @@ -116,6 +116,8 @@ void disasm_print_insn(unsigned char *image, ssize_t len, int opcodes, info.arch = bfd_get_arch(bfdf); info.mach = bfd_get_mach(bfdf); + if (disassembler_options) + info.disassembler_options = disassembler_options; info.buffer = image; info.buffer_length = len; |