diff options
| author | Benjamin Tissoires <bentiss@kernel.org> | 2024-06-26 16:46:23 +0300 |
|---|---|---|
| committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-06-27 11:58:19 +0300 |
| commit | 67eccf151d76a9939ad8a50c6db5cb486b01df24 (patch) | |
| tree | 1a2b0d02140df64b820dded3ccc511d38d47ee1d /include/linux/hid.h | |
| parent | ebae0b2a6f4b3b949f30f076fbc65d3b0bb04785 (diff) | |
| download | linux-67eccf151d76a9939ad8a50c6db5cb486b01df24.tar.xz | |
HID: add source argument to HID low level functions
This allows to know who actually sent what when we process the request
to the device.
This will be useful for a BPF firewall program to allow or not requests
coming from a dedicated hidraw node client.
Link: https://patch.msgid.link/20240626-hid_hw_req_bpf-v2-2-cfd60fb6c79f@kernel.org
Acked-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Diffstat (limited to 'include/linux/hid.h')
| -rw-r--r-- | include/linux/hid.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 8e06d89698e6..dac2804b4562 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -1125,6 +1125,12 @@ int __must_check hid_hw_open(struct hid_device *hdev); void hid_hw_close(struct hid_device *hdev); void hid_hw_request(struct hid_device *hdev, struct hid_report *report, enum hid_class_request reqtype); +int __hid_hw_raw_request(struct hid_device *hdev, + unsigned char reportnum, __u8 *buf, + size_t len, enum hid_report_type rtype, + enum hid_class_request reqtype, + __u64 source); +int __hid_hw_output_report(struct hid_device *hdev, __u8 *buf, size_t len, __u64 source); int hid_hw_raw_request(struct hid_device *hdev, unsigned char reportnum, __u8 *buf, size_t len, enum hid_report_type rtype, |
