No description
Find a file
Andrii Nakryiko 5eccd2db42 bpf: reuse btf_prepare_func_args() check for main program BTF validation
Instead of btf_check_subprog_arg_match(), use btf_prepare_func_args()
logic to validate "trustworthiness" of main BPF program's BTF information,
if it is present.

We ignored results of original BTF check anyway, often times producing
confusing and ominously-sounding "reg type unsupported for arg#0
function" message, which has no apparent effect on program correctness
and verification process.

All the -EFAULT returning sanity checks are already performed in
check_btf_info_early(), so there is zero reason to have this duplication
of logic between btf_check_subprog_call() and btf_check_subprog_arg_match().
Dropping btf_check_subprog_arg_match() simplifies
btf_check_func_arg_match() further removing `bool processing_call` flag.

One subtle bit that was done by btf_check_subprog_arg_match() was
potentially marking main program's BTF as unreliable. We do this
explicitly now with a dedicated simple check, preserving the original
behavior, but now based on well factored btf_prepare_func_args() logic.

Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231215011334.2307144-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2023-12-19 18:06:46 -08:00
arch netdev 2023-12-18 16:46:08 -08:00
block
certs
crypto
Documentation devlink: extend multicast filtering by port index 2023-12-19 15:31:40 +01:00
drivers bpf-next-for-netdev 2023-12-19 18:35:28 +01:00
fs netdev 2023-12-18 16:46:08 -08:00
include bpf: reuse btf_prepare_func_args() check for main program BTF validation 2023-12-19 18:06:46 -08:00
init
io_uring
ipc
kernel bpf: reuse btf_prepare_func_args() check for main program BTF validation 2023-12-19 18:06:46 -08:00
lib netdev 2023-12-18 16:46:08 -08:00
LICENSES
mm
net bpf-next-for-netdev 2023-12-19 18:35:28 +01:00
rust
samples
scripts
security Revert BPF token-related functionality 2023-12-19 08:23:03 -08:00
sound
tools bpf: reuse btf_prepare_func_args() check for main program BTF validation 2023-12-19 18:06:46 -08:00
usr
virt
.clang-format
.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.