diff options
| author | Benjamin Tissoires <bentiss@kernel.org> | 2024-10-01 16:30:08 +0200 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-10-04 16:10:43 +0200 |
| commit | 6fd47effe92b794c32f08504c2c64d1e40bbb543 (patch) | |
| tree | 39bdb2a71a6bd7b02b3b5fd628075140c1ca7c23 /drivers/hid/bpf | |
| parent | 7316fef4b993c4435f9fe55e7f2590baf25621ec (diff) | |
HID: bpf: allow write access to quirks field in struct hid_device
This allows to give more control from BPF during report descriptor fixup.
We already reset the quirks before calling ->probe(), so now we reset
it once before calling hid_bpf_rdesc_fixup().
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Link: https://patch.msgid.link/20241001-hid-bpf-hid-generic-v3-4-2ef1019468df@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'drivers/hid/bpf')
| -rw-r--r-- | drivers/hid/bpf/hid_bpf_struct_ops.c | 1 |
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 702c22fae136..0e611a9d79d7 100644 --- a/drivers/hid/bpf/hid_bpf_struct_ops.c +++ b/drivers/hid/bpf/hid_bpf_struct_ops.c @@ -79,6 +79,7 @@ static int hid_bpf_ops_btf_struct_access(struct bpf_verifier_log *log, WRITE_RANGE(hid_device, name, true), WRITE_RANGE(hid_device, uniq, true), WRITE_RANGE(hid_device, phys, true), + WRITE_RANGE(hid_device, quirks, false), }; #undef WRITE_RANGE const struct btf_type *state = NULL; |
