Files
lkl_linux/include/linux
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
..
2022-02-01 14:25:50 +02:00
2022-01-22 08:33:34 +02:00
2022-01-15 08:47:31 -08:00
2022-01-09 10:36:51 -07:00
2022-03-17 20:17:18 -07:00
2021-11-17 10:36:15 -05:00
2021-12-10 17:10:55 -08:00
2021-12-10 12:51:28 +01:00
2021-12-01 00:06:43 +01:00
2022-03-16 15:13:36 -07:00
2022-01-15 08:47:31 -08:00
2022-01-20 08:52:54 +02:00
2022-01-04 13:15:33 -05:00
2022-03-02 22:44:49 -08:00
2021-12-17 09:06:15 +01:00
2021-12-20 09:03:05 +01:00
2022-02-05 15:20:34 +00:00
2022-01-27 13:53:26 +00:00
2021-12-16 22:22:20 +01:00
2022-02-09 09:24:40 -05:00
2022-01-12 10:14:09 -06:00
2021-11-16 19:07:53 -08:00
2022-01-31 11:30:56 +00:00
2022-01-22 08:33:37 +02:00
2022-01-08 12:43:57 -06:00
2021-11-18 09:36:39 +01:00
2022-01-24 14:45:02 +01:00
2021-11-30 17:25:20 -08:00
2022-03-17 20:16:29 -07:00
2022-03-17 20:16:29 -07:00
2022-01-22 08:33:37 +02:00
2022-01-22 08:33:38 +02:00
2022-03-17 20:17:18 -07:00
2021-11-25 18:35:23 +01:00
2022-01-27 13:53:27 +00:00
2021-12-30 12:13:04 +01:00
2022-01-14 18:50:52 -05:00
2021-12-09 10:49:56 -08:00
2022-01-08 00:28:41 -05:00