Find a file
Alexei Starovoitov 6fcd486b3a bpf: Refactor RCU enforcement in the verifier.
bpf_rcu_read_lock/unlock() are only available in clang compiled kernels. Lack
of such key mechanism makes it impossible for sleepable bpf programs to use RCU
pointers.

Allow bpf_rcu_read_lock/unlock() in GCC compiled kernels (though GCC doesn't
support btf_type_tag yet) and allowlist certain field dereferences in important
data structures like tast_struct, cgroup, socket that are used by sleepable
programs either as RCU pointer or full trusted pointer (which is valid outside
of RCU CS). Use BTF_TYPE_SAFE_RCU and BTF_TYPE_SAFE_TRUSTED macros for such
tagging. They will be removed once GCC supports btf_type_tag.

With that refactor check_ptr_to_btf_access(). Make it strict in enforcing
PTR_TRUSTED and PTR_UNTRUSTED while deprecating old PTR_TO_BTF_ID without
modifier flags. There is a chance that this strict enforcement might break
existing programs (especially on GCC compiled kernels), but this cleanup has to
start sooner than later. Note PTR_TO_CTX access still yields old deprecated
PTR_TO_BTF_ID. Once it's converted to strict PTR_TRUSTED or PTR_UNTRUSTED the
kfuncs and helpers will be able to default to KF_TRUSTED_ARGS. KF_RCU will
remain as a weaker version of KF_TRUSTED_ARGS where obj refcnt could be 0.

Adjust rcu_read_lock selftest to run on gcc and clang compiled kernels.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: David Vernet <void@manifault.com>
Link: https://lore.kernel.org/bpf/20230303041446.3630-7-alexei.starovoitov@gmail.com
2023-03-03 17:42:20 +01:00
arch bpf, mips: Implement R4000 workarounds for JIT 2023-02-28 14:52:55 +01:00
block Updates for the interrupt subsystem: 2023-02-21 10:03:48 -08:00
certs certs: don't try to update blacklist keys 2023-02-13 10:11:20 +02:00
crypto Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
Documentation bpf: Introduce kptr_rcu. 2023-03-03 17:42:20 +01:00
drivers Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
fs Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
include bpf: Refactor RCU enforcement in the verifier. 2023-03-03 17:42:20 +01:00
init Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
io_uring for-6.3/block-2023-02-16 2023-02-20 14:27:21 -08:00
ipc fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
kernel bpf: Refactor RCU enforcement in the verifier. 2023-03-03 17:42:20 +01:00
lib Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
LICENSES
mm Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
net bpf: Introduce kptr_rcu. 2023-03-03 17:42:20 +01:00
rust Rust changes for v6.3 2023-02-20 10:40:42 -08:00
samples samples/bpf: Use bpf_{btf,link,map,prog}_get_info_by_fd() 2023-02-16 15:32:45 -08:00
scripts Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
security This update includes the following changes: 2023-02-21 18:10:50 -08:00
sound ARM: unused boardfile removal for 6.3 2023-02-20 15:28:57 -08:00
tools bpf: Refactor RCU enforcement in the verifier. 2023-03-03 17:42:20 +01:00
usr
virt VFIO fixes for v6.2-rc6 2023-01-23 11:56:07 -08:00
.clang-format iommufd for 6.2 2022-12-14 09:15:43 -08:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore .gitignore: ignore *.rpm 2022-12-30 17:22:14 +09:00
.mailmap 12 hotfixes, mostly against mm/. Five of these fixes are cc:stable. 2023-02-13 14:09:20 -08:00
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: update SCTP maintainers 2023-02-02 11:35:33 -08:00
Kbuild
Kconfig
MAINTAINERS Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
Makefile Rust changes for v6.3 2023-02-20 10:40:42 -08: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.