]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: bpf: fix cfi stubs for hid_bpf_ops
authorBenjamin Tissoires <bentiss@kernel.org>
Fri, 27 Sep 2024 14:17:41 +0000 (16:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:04:07 +0000 (12:04 +0200)
commitfe80f7efc1e5a84aec625223db0056e503b8ae46
treef214d81cd8dca8220ac06fa33ca325d338bf5117
parenta79fe32c636fed4a2716ed08453951257cfc8680
HID: bpf: fix cfi stubs for hid_bpf_ops

commit acd5f76fd5292c91628e04da83e8b78c986cfa2b upstream.

With the introduction of commit e42ac1418055 ("bpf: Check unsupported ops
from the bpf_struct_ops's cfi_stubs"), a HID-BPF struct_ops containing
a .hid_hw_request() or a .hid_hw_output_report() was failing to load
as the cfi stubs were not defined.

Fix that by defining those simple static functions and restore HID-BPF
functionality.

This was detected with the HID selftests suddenly failing on Linus' tree.

Cc: stable@vger.kernel.org # v6.11+
Fixes: 9286675a2aed ("HID: bpf: add HID-BPF hooks for hid_hw_output_report")
Fixes: 8bd0488b5ea5 ("HID: bpf: add HID-BPF hooks for hid_hw_raw_requests")
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/bpf/hid_bpf_struct_ops.c