summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2024-06-08 11:01:26 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2024-06-14 11:20:21 +0200
commitbd0747543b3d973df6af0f43965f58965375d524 (patch)
treedfa704245a5d770dc2f89881ffc3b65c289a71ed /drivers/hid
parentHID: bpf: error on warnings when compiling bpf objects (diff)
downloadlinux-bd0747543b3d973df6af0f43965f58965375d524.tar.xz
linux-bd0747543b3d973df6af0f43965f58965375d524.zip
bpf: allow bpf helpers to be used into HID-BPF struct_ops
Without this helpers like bpf_printk() or bpf_map_update() are not available, making anything but change of bytes impossible to do. Link: https://lore.kernel.org/r/20240608-hid_bpf_struct_ops-v3-14-6ac6ade58329@kernel.org Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/bpf/hid_bpf_struct_ops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/bpf/hid_bpf_struct_ops.c b/drivers/hid/bpf/hid_bpf_struct_ops.c
index dde547e734ed..1f24fadaa738 100644
--- a/drivers/hid/bpf/hid_bpf_struct_ops.c
+++ b/drivers/hid/bpf/hid_bpf_struct_ops.c
@@ -89,6 +89,7 @@ static int hid_bpf_ops_btf_struct_access(struct bpf_verifier_log *log,
}
static const struct bpf_verifier_ops hid_bpf_verifier_ops = {
+ .get_func_proto = bpf_base_func_proto,
.is_valid_access = hid_bpf_ops_is_valid_access,
.btf_struct_access = hid_bpf_ops_btf_struct_access,
};