diff options
| author | Jiri Kosina <jkosina@suse.com> | 2025-07-31 22:43:21 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-07-31 22:43:21 +0200 |
| commit | bfb0195705f23568b77744cefc1cb81fd7a94d59 (patch) | |
| tree | 70b30731c91c48c15a3c33465aaa0336b62cf558 /include/linux | |
| parent | 069e79a08103c684d31b638cbed82fcc3ac0fad3 (diff) | |
| parent | a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd (diff) | |
Merge branch 'for-6.17/core' into for-linus
- hardening of HID core parser against conversion to 0 bits in s32ton()
by buggy/malicious devices (Alan Stern)
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hid.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 568a9d8c749b..2cc4f1e4ea96 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -1216,7 +1216,11 @@ static inline void hid_hw_wait(struct hid_device *hdev) /** * hid_report_len - calculate the report length * - * @report: the report we want to know the length + * @report: the report whose length we want to know + * + * The length counts the report ID byte, but only if the ID is nonzero + * and therefore is included in the report. Reports whose ID is zero + * never include an ID byte. */ static inline u32 hid_report_len(struct hid_report *report) { @@ -1239,6 +1243,8 @@ void hid_quirks_exit(__u16 bus); dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__) #define hid_warn(hid, fmt, ...) \ dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__) +#define hid_warn_ratelimited(hid, fmt, ...) \ + dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__) #define hid_info(hid, fmt, ...) \ dev_info(&(hid)->dev, fmt, ##__VA_ARGS__) #define hid_dbg(hid, fmt, ...) \ |
