Skip to content

Commit 55bad79

Browse files
Benjamin TissoiresAlexei Starovoitov
authored andcommitted
bpf: allow more maps in sleepable bpf programs
These 2 maps types are required for HID-BPF when a user wants to do IO with a device from a sleepable tracing point. Allowing BPF_MAP_TYPE_QUEUE (and therefore BPF_MAP_TYPE_STACK) allows for a BPF program to prepare from an IRQ the list of HID commands to send back to the device and then these commands can be retrieved from the sleepable trace point. Signed-off-by: Benjamin Tissoires <bentiss@kernel.org> Link: https://lore.kernel.org/r/20240221-hid-bpf-sleepable-v3-1-1fb378ca6301@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 63c7049 commit 55bad79

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/bpf/verifier.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18022,6 +18022,8 @@ static int check_map_prog_compatibility(struct bpf_verifier_env *env,
1802218022
case BPF_MAP_TYPE_SK_STORAGE:
1802318023
case BPF_MAP_TYPE_TASK_STORAGE:
1802418024
case BPF_MAP_TYPE_CGRP_STORAGE:
18025+
case BPF_MAP_TYPE_QUEUE:
18026+
case BPF_MAP_TYPE_STACK:
1802518027
break;
1802618028
default:
1802718029
verbose(env,

0 commit comments

Comments
 (0)