diff options
author | Benjamin Tissoires <bentiss@kernel.org> | 2024-01-24 12:26:59 +0100 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-01-31 10:27:08 +0100 |
commit | 764ad6b02777d77dca3659ca490f0898aa593670 (patch) | |
tree | 0e42f1b4a2b6c57fec946137e316371f90a3e69d /include | |
parent | HID: bpf: actually free hdev memory after attaching a HID-BPF program (diff) | |
download | linux-764ad6b02777d77dca3659ca490f0898aa593670.tar.xz linux-764ad6b02777d77dca3659ca490f0898aa593670.zip |
HID: bpf: use __bpf_kfunc instead of noinline
Follow the docs at Documentation/bpf/kfuncs.rst:
- declare the function with `__bpf_kfunc`
- disables missing prototype warnings, which allows to remove them from
include/linux/hid-bpf.h
Removing the prototypes is not an issue because we currently have to
redeclare them when writing the BPF program. They will eventually be
generated by bpftool directly AFAIU.
Link: https://lore.kernel.org/r/20240124-b4-hid-bpf-fixes-v2-3-052520b1e5e6@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hid_bpf.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/linux/hid_bpf.h b/include/linux/hid_bpf.h index 840cd254172d..7118ac28d468 100644 --- a/include/linux/hid_bpf.h +++ b/include/linux/hid_bpf.h @@ -77,17 +77,6 @@ enum hid_bpf_attach_flags { int hid_bpf_device_event(struct hid_bpf_ctx *ctx); int hid_bpf_rdesc_fixup(struct hid_bpf_ctx *ctx); -/* Following functions are kfunc that we export to BPF programs */ -/* available everywhere in HID-BPF */ -__u8 *hid_bpf_get_data(struct hid_bpf_ctx *ctx, unsigned int offset, const size_t __sz); - -/* only available in syscall */ -int hid_bpf_attach_prog(unsigned int hid_id, int prog_fd, __u32 flags); -int hid_bpf_hw_request(struct hid_bpf_ctx *ctx, __u8 *buf, size_t buf__sz, - enum hid_report_type rtype, enum hid_class_request reqtype); -struct hid_bpf_ctx *hid_bpf_allocate_context(unsigned int hid_id); -void hid_bpf_release_context(struct hid_bpf_ctx *ctx); - /* * Below is HID internal */ |