aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorAndres Freund <[email protected]>2022-07-31 18:38:31 -0700
committerArnaldo Carvalho de Melo <[email protected]>2022-08-01 15:30:48 -0300
commit96ed066054abf11c7d3e106e3011a51f3f1227a3 (patch)
tree80cbb98800774f9c335ca295980391fa68b585eb /scripts/bpf_doc.py
parent83aa0120487e8bc3f231e72c460add783f71f17c (diff)
tools bpf_jit_disasm: Fix compilation error with new binutils
binutils changed the signature of init_disassemble_info(), which now causes compilation to fail for tools/bpf/bpf_jit_disasm.c, e.g. on debian unstable. Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=60a3da00bd5407f07 Wire up the feature test and switch to init_disassemble_info_compat(), which were introduced in prior commits, fixing the compilation failure. I verified that bpf_jit_disasm can still disassemble bpf programs, both with the old and new dis-asm.h API. With old binutils there's no change in output before/after this patch. When comparing the output from old binutils (2.35) to new bintuils with the patch (upstream snapshot) there are a few output differences, but they are unrelated to this patch. An example hunk is: f4: mov %r14,%rsi f7: mov %r15,%rdx fa: mov $0x2a,%ecx - ff: callq 0xffffffffea8c4988 + ff: call 0xffffffffea8c4988 104: test %rax,%rax 107: jge 0x0000000000000110 109: xor %eax,%eax - 10b: jmpq 0x0000000000000073 + 10b: jmp 0x0000000000000073 110: cmp $0x16,%rax However, I had to use an older kernel to generate the bpf_jit_enabled = 2 output, as that has been broken since 5.18 / 1022a5498f6f745c ("bpf, x86_64: Use bpf_jit_binary_pack_alloc"). https://lore.kernel.org/[email protected] Signed-off-by: Andres Freund <[email protected]> Acked-by: Quentin Monnet <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Quentin Monnet <[email protected]> Cc: Sedat Dilek <[email protected]> Cc: [email protected] Link: http://lore.kernel.org/lkml/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions