No description
Find a file
Andrii Nakryiko 0a342457b3 libbpf: Support extern resolution for BTF-defined maps in .maps section
Add extra logic to handle map externs (only BTF-defined maps are supported for
linking). Re-use the map parsing logic used during bpf_object__open(). Map
externs are currently restricted to always match complete map definition. So
all the specified attributes will be compared (down to pining, map_flags,
numa_node, etc). In the future this restriction might be relaxed with no
backwards compatibility issues. If any attribute is mismatched between extern
and actual map definition, linker will report an error, pointing out which one
mismatches.

The original intent was to allow for extern to specify attributes that matters
(to user) to enforce. E.g., if you specify just key information and omit
value, then any value fits. Similarly, it should have been possible to enforce
map_flags, pinning, and any other possible map attribute. Unfortunately, that
means that multiple externs can be only partially overlapping with each other,
which means linker would need to combine their type definitions to end up with
the most restrictive and fullest map definition. This requires an extra amount
of BTF manipulation which at this time was deemed unnecessary and would
require further extending generic BTF writer APIs. So that is left for future
follow ups, if there will be demand for that. But the idea seems intresting
and useful, so I want to document it here.

Weak definitions are also supported, but are pretty strict as well, just
like externs: all weak map definitions have to match exactly. In the follow up
patches this most probably will be relaxed, with __weak map definitions being
able to differ between each other (with non-weak definition always winning, of
course).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210423181348.1801389-13-andrii@kernel.org
2021-04-23 14:05:27 -07:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-04-02 11:03:07 -07:00
block block: Discard page cache of zone reset target range 2021-03-11 11:49:25 -07:00
certs
crypto crypto: mips/poly1305 - enable for all MIPS processors 2021-03-08 11:52:17 +01:00
Documentation bpf, doc: Fix some invalid links in bpf_devel_QA.rst 2021-04-22 23:27:11 +02:00
drivers nfc: pn533: prevent potential memory corruption 2021-04-02 14:27:50 -07:00
fs fs/jffs2: Delete obsolete TODO file 2021-03-30 16:54:49 -07:00
include bpf: Add a bpf_snprintf helper 2021-04-19 15:27:36 -07:00
init Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
ipc
kernel bpf: Remove unnecessary map checks for ARG_PTR_TO_CONST_STR 2021-04-23 09:58:21 -07:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
LICENSES
mm Merge branch 'akpm' (patches from Andrew) 2021-03-25 11:43:43 -07:00
net xsk: Align XDP socket batch size with DPDK 2021-04-23 09:50:35 +02:00
samples samples/bpf: Fix broken tracex1 due to kprobe argument change 2021-04-19 18:19:49 -07:00
scripts bpf: Generate BTF_KIND_FLOAT when linking vmlinux 2021-04-13 14:34:27 -07:00
security Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
sound sound fixes for 5.12-rc4 2021-03-19 09:53:32 -07:00
tools libbpf: Support extern resolution for BTF-defined maps in .maps section 2021-04-23 14:05:27 -07:00
usr Kbuild updates for v5.12 2021-02-25 10:17:31 -08:00
virt KVM: x86/mmu: Consider the hva in mmu_notifier retry 2021-02-22 13:16:53 -05:00
.clang-format cxl for 5.12 2021-02-24 09:38:36 -08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore clang-lto series for v5.12-rc1 2021-02-23 09:28:51 -08:00
.mailmap Merge branch 'akpm' (patches from Andrew) 2021-03-25 11:43:43 -07:00
COPYING
CREDITS treewide: Miguel has moved 2021-02-26 09:41:03 -08:00
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Update MCAN MMIO device driver maintainer 2021-03-30 09:31:54 +02:00
Makefile Linux 5.12-rc4 2021-03-21 14:56:43 -07:00
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.