]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
Merge branch 'bpf-dump-and-disasm-nfp-jit'
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 18 Jan 2018 00:26:16 +0000 (01:26 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 18 Jan 2018 00:26:16 +0000 (01:26 +0100)
commitcda18e9726d0f1e280f9e4a19d85ab01c157b414
tree173640edb8a446423ab1dd4e00add1c782c17048
parent4f7d58517f461aa6e7b7509668f04021e089323d
parente65935969d0fac9df28d9c49bdbab5d8d8286a20
Merge branch 'bpf-dump-and-disasm-nfp-jit'

Jakub Kicinski says:

====================
Jiong says:

Currently bpftool could disassemble host jited image, for example x86_64,
using libbfd. However it couldn't disassemble offload jited image.

There are two reasons:

  1. bpf_obj_get_info_by_fd/struct bpf_prog_info couldn't get the address
     of jited image and image's length.

  2. Even after issue 1 resolved, bpftool couldn't figure out what is the
     offload arch from bpf_prog_info, therefore can't drive libbfd
     disassembler correctly.

  This patch set resolve issue 1 by introducing two new fields "jited_len"
and "jited_image" in bpf_dev_offload. These two fields serve as the generic
interface to communicate the jited image address and length for all offload
targets to higher level caller. For example, bpf_obj_get_info_by_fd could
use them to fill the userspace visible fields jited_prog_len and
jited_prog_insns.

  This patch set resolve issue 2 by getting bfd backend name through
"ifindex", i.e network interface index.

v1:
 - Deduct bfd arch name through ifindex, i.e network interface index.
   First, map ifindex to devname through ifindex_to_name_ns, then get
   pci id through /sys/class/dev/DEVNAME/device/vendor. (Daniel, Alexei)
====================

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>