]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: print all relevant byte opcodes for "load double word"
authorQuentin Monnet <quentin.monnet@netronome.com>
Thu, 19 Oct 2017 22:46:24 +0000 (15:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2017 01:11:32 +0000 (02:11 +0100)
commit5b4cbfbcf409dda595b84a30db34f3b255f86c32
tree210a806962557717ae47b1dc68560e4dc73ac27d
parent3f7a1058e74cc0e0259efab2d43e1ff10de90971
tools: bpftool: print all relevant byte opcodes for "load double word"

The eBPF instruction permitting to load double words (8 bytes) into a
register need 8-byte long "immediate" field, and thus occupy twice the
space of other instructions. bpftool was aware of this and would
increment the instruction counter only once on meeting such instruction,
but it would only print the first four bytes of the immediate value to
load. Make it able to dump the whole 16 byte-long double instruction
instead (as would `llvm-objdump -d <program>`).

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/bpf/bpftool/prog.c