No description
Find a file
Joanne Koong b00fa38a9c bpf: Enable non-atomic allocations in local storage
Currently, local storage memory can only be allocated atomically
(GFP_ATOMIC). This restriction is too strict for sleepable bpf
programs.

In this patch, the verifier detects whether the program is sleepable,
and passes the corresponding GFP_KERNEL or GFP_ATOMIC flag as a
5th argument to bpf_task/sk/inode_storage_get. This flag will propagate
down to the local storage functions that allocate memory.

Please note that bpf_task/sk/inode_storage_update_elem functions are
invoked by userspace applications through syscalls. Preemption is
disabled before bpf_task/sk/inode_storage_update_elem is called, which
means they will always have to allocate memory atomically.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: KP Singh <kpsingh@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20220318045553.3091807-2-joannekoong@fb.com
2022-03-20 18:55:05 -07:00
arch ARM: rethook: Add rethook arm implementation 2022-03-17 20:16:49 -07:00
block
certs
crypto
Documentation docs: fprobe: Add fprobe description to ftrace-use.rst 2022-03-17 20:17:08 -07:00
drivers veth: Allow jumbo frames in xdp mode 2022-03-17 20:33:52 +01:00
fs Change since last update: 2022-03-02 12:08:36 -08:00
include bpf: Enable non-atomic allocations in local storage 2022-03-20 18:55:05 -07:00
init
ipc
kernel bpf: Enable non-atomic allocations in local storage 2022-03-20 18:55:05 -07:00
lib lib/sort: Add priv pointer to swap function 2022-03-17 20:17:18 -07:00
LICENSES
mm
net bpf: Enable non-atomic allocations in local storage 2022-03-20 18:55:05 -07:00
samples fprobe: Add sample program for fprobe 2022-03-17 20:16:58 -07:00
scripts
security ima: Always return a file measurement in ima_file_hash() 2022-03-10 18:56:24 -08:00
sound spi: Make remove() return void 2022-02-28 10:43:07 -08:00
tools libbpf: Avoid NULL deref when initializing map BTF info 2022-03-20 18:53:04 -07:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-03 11:55:12 -08:00
Makefile Linux 5.17-rc6 2022-02-27 14:36:33 -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.