With the introduction of commit ee9ad135b208 ("bpf: Reject a store
through a fault prone pointer"), a HID-BPF program which would try to
change the name, phys or uniq of a HID device would be rejected by the
verifier. Also, this commits and its siblings manage to detect the
buffer overflow that is currently dynamically detected in the test
suite. The verifier now rejects the bpf program we try to load, marking
the test as fail. This is correct behavior, and better admittedly so fix
this so the CI stays green.Signed-off-by: Benjamin Tissoires <[email protected]> --- Changes in v2: - Fixed 2 issues found by shashiko - Link to v1: https://patch.msgid.link/[email protected] --- Benjamin Tissoires (3): HID: bpf: mark struct hid_device as safe BPF pointer selftests/hid: Add a test to ensure we can write fields in hid_device selftests/hid: prepare test_rdesc_fixup_get_data_overflow for the new verifier drivers/hid/bpf/hid_bpf_struct_ops.c | 6 +++ tools/testing/selftests/hid/hid_bpf.c | 51 ++++++++++++++++++---- tools/testing/selftests/hid/progs/hid.c | 26 +++++++++++ .../testing/selftests/hid/progs/hid_bpf_helpers.h | 3 ++ 4 files changed, 78 insertions(+), 8 deletions(-) --- base-commit: a93f3bf4e1d60777b1659b812c9e818cfc53b449 change-id: 20260821-wip-bpf-safe-39c069cd8334 Best regards, -- Benjamin Tissoires <[email protected]>

