[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240607-hid_bpf_struct_ops-v2-14-3f95f4d02292@kernel.org>
Date: Fri, 07 Jun 2024 17:28:34 +0200
From: Benjamin Tissoires <bentiss@...nel.org>
To: Shuah Khan <shuah@...nel.org>, Jiri Kosina <jikos@...nel.org>,
Jonathan Corbet <corbet@....net>, Alexei Starovoitov <ast@...nel.org>
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-input@...r.kernel.org, linux-doc@...r.kernel.org,
Benjamin Tissoires <bentiss@...nel.org>
Subject: [PATCH HID v2 14/16] 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.
Signed-off-by: Benjamin Tissoires <bentiss@...nel.org>
---
new in v2
---
drivers/hid/bpf/hid_bpf_struct_ops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hid/bpf/hid_bpf_struct_ops.c b/drivers/hid/bpf/hid_bpf_struct_ops.c
index 9192c66cde20..056d05d96962 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,
};
--
2.44.0
Powered by blists - more mailing lists