bpf: pass btf object id in bpf_map_info.
Kui-Feng Lee authored

Include btf object id (btf_obj_id) in bpf_map_info so that tools (ex:
bpftools struct_ops dump) know the correct btf from the kernel to look up
type information of struct_ops types.

Since struct_ops types can be defined and registered in a module. The
type information of a struct_ops type are defined in the btf of the
module defining it.  The userspace tools need to know which btf is for
the module defining a struct_ops type.
Signed-off-by: default avatarKui-Feng Lee <thinker.li@gmail.com>
Link: https://lore.kernel.org/r/20240119225005.668602-7-thinker.li@gmail.com

Signed-off-by: default avatarMartin KaFai Lau <martin.lau@kernel.org>
1338b933
Name Last commit Last update
Documentation bpf, docs: Clarify that MOVSX is only for BPF_X not BPF_K
LICENSES LICENSES: Add the copyleft-next-0.3.1 license
arch bpf, arm64: Enable the inline of bpf_kptr_xchg()
block Merge tag 'for-6.8/block-2024-01-08' of git://git.kernel.dk/linux
certs Merge tag 'v6.7-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
crypto crypto: scomp - fix req->dst buffer overflow
drivers Merge tag 'net-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
fs Merge tag 'eventfs-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
include bpf: pass btf object id in bpf_map_info.
init Merge tag 'driver-core-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
io_uring Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
ipc shm: Slim down dependencies
kernel bpf: pass btf object id in bpf_map_info.
lib Merge tag 'cxl-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
mm Merge tag 'memblock-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
net bpf, net: introduce bpf_struct_ops_desc.
rust Merge tag 'rust-6.8' of https://github.com/Rust-for-Linux/linux
samples Merge tag 'trace-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
scripts Merge tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
security Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
sound Merge tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
tools bpf: pass btf object id in bpf_map_info.
usr usr/Kconfig: fix typos of "its"
virt Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
.clang-format clang-format: Update with v6.7-rc4's `for_each` macro list
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.