| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/18 13:05 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"HID_WACOM",
"USB_HID",
"HID"
],
"FocusSymbols": [
"wacom_penpartner_irq",
"wacom_pl_irq",
"wacom_ptu_irq",
"wacom_dtu_irq",
"wacom_dtus_irq",
"wacom_graphire_irq",
"wacom_intuos_pad",
"wacom_intuos_bt_irq",
"wacom_wac_finger_count_touches",
"wacom_intuos_pro2_bt_touch",
"wacom_24hdt_irq",
"wacom_bpt_touch",
"wacom_bpt3_touch_msg",
"wacom_bpt3_button_msg",
"wacom_bamboo_pad_touch_event",
"wacom_report_numbered_buttons",
"wacom_wac_irq"
],
"KMSANReasoning": "The patch adds NULL pointer checks for various input device pointers (pen_input, pad_input, touch_input) in several IRQ and event handlers in drivers/hid/wacom_wac.c to prevent NULL pointer dereference crashes when certain input devices are not initialized/registered.\n\nThese changes address NULL pointer dereference bugs, which are caught by standard kernel fault handling and generic debugging builds. The patch does not introduce or modify any memory allocations, data copying to user space, variable initializations, or buffer length calculations that could expose uninitialized memory. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false,
"Reasoning": "The patch adds defensive NULL pointer checks and dev_warn_once/pr_warn_once assertions across multiple report/event handling functions in the Wacom HID driver (drivers/hid/wacom_wac.c) to prevent dereferencing unallocated or unconfigured pen, pad, and touch input devices. The HID driver is reachable in virtualized QEMU environments via USB raw gadget or /dev/uhid emulation, so fuzzing this modified report handling logic is worthwhile.",
"WorthFuzzing": true
} |
| 1/1 | 2026/10/18 13:05 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 2656c0fb9b853c4354ceb4138b9594e207bbacef\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Oct 18 13:05:22 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c\nindex c4cd87b781c45..e3fff2471d431 100644\n--- a/drivers/hid/wacom_wac.c\n+++ b/drivers/hid/wacom_wac.c\n@@ -128,6 +128,12 @@ static int wacom_penpartner_irq(struct wacom_wac *wacom)\n \tunsigned char *data = wacom-\u003edata;\n \tstruct input_dev *input = wacom-\u003epen_input;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: pen_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tswitch (data[0]) {\n \tcase 1:\n \t\tif (data[5] \u0026 0x80) {\n@@ -174,6 +180,12 @@ static int wacom_pl_irq(struct wacom_wac *wacom)\n \tstruct input_dev *input = wacom-\u003epen_input;\n \tint prox, pressure;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: pen_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tif (data[0] != WACOM_REPORT_PENABLED) {\n \t\tdev_dbg(input-\u003edev.parent,\n \t\t\t\"%s: received unknown report #%d\\n\", __func__, data[0]);\n@@ -233,6 +245,12 @@ static int wacom_ptu_irq(struct wacom_wac *wacom)\n \tunsigned char *data = wacom-\u003edata;\n \tstruct input_dev *input = wacom-\u003epen_input;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: pen_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tif (data[0] != WACOM_REPORT_PENABLED) {\n \t\tdev_dbg(input-\u003edev.parent,\n \t\t\t\"%s: received unknown report #%d\\n\", __func__, data[0]);\n@@ -263,6 +281,12 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)\n \tstruct input_dev *input = wacom-\u003epen_input;\n \tint prox = data[1] \u0026 0x20;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: pen_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tdev_dbg(input-\u003edev.parent,\n \t\t\"%s: received report #%d\", __func__, data[0]);\n \n@@ -289,16 +313,26 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)\n \n static int wacom_dtus_irq(struct wacom_wac *wacom)\n {\n+\tstruct wacom_features *features = \u0026wacom-\u003efeatures;\n \tunsigned char *data = wacom-\u003edata;\n \tstruct input_dev *input = wacom-\u003epen_input;\n \tunsigned short prox, pressure = 0;\n \n+\tif (!input || (!wacom-\u003epad_input \u0026\u0026 features-\u003etype != DTUSX)) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: missing input device(s)\\n\",\n+\t\t\t __func__);\n+\t\treturn 0;\n+\t}\n+\n \tif (data[0] != WACOM_REPORT_DTUS \u0026\u0026 data[0] != WACOM_REPORT_DTUSPAD) {\n \t\tdev_dbg(input-\u003edev.parent,\n \t\t\t\"%s: received unknown report #%d\", __func__, data[0]);\n \t\treturn 0;\n \t} else if (data[0] == WACOM_REPORT_DTUSPAD) {\n \t\tinput = wacom-\u003epad_input;\n+\t\tif (!input)\n+\t\t\treturn 0;\n \t\tinput_report_key(input, BTN_0, (data[1] \u0026 0x01));\n \t\tinput_report_key(input, BTN_1, (data[1] \u0026 0x02));\n \t\tinput_report_key(input, BTN_2, (data[1] \u0026 0x04));\n@@ -349,6 +383,12 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)\n \tint rw = 0;\n \tint retval = 0;\n \n+\tif (!input || (!pad_input \u0026\u0026 features-\u003etype != GRAPHIRE)) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: missing input device(s)\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tif (features-\u003etype == GRAPHIRE_BT) {\n \t\tif (data[0] != WACOM_REPORT_PENABLED_BT) {\n \t\t\tdev_dbg(input-\u003edev.parent,\n@@ -541,6 +581,12 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)\n \t data[0] == WACOM_REPORT_CINTIQPAD))\n \t\treturn 0;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: pad_input is NULL\\n\", __func__);\n+\t\treturn 1; /* consume the report to prevent fall-through */\n+\t}\n+\n \tif (features-\u003etype \u003e= INTUOS4S \u0026\u0026 features-\u003etype \u003c= INTUOS4L) {\n \t\tbuttons = (data[3] \u003c\u003c 1) | (data[2] \u0026 0x01);\n \t\tring1 = data[1];\n@@ -1217,6 +1263,13 @@ static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)\n \tint i = 1;\n \tunsigned power_raw, battery_capacity, bat_charging, ps_connected;\n \n+\tif (!wacom-\u003epen_input || !wacom-\u003epad_input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: expected pen and pad input devices\\n\",\n+\t\t\t __func__);\n+\t\treturn 0;\n+\t}\n+\n \tswitch (data[0]) {\n \tcase 0x04:\n \t\tif (len \u003c 32) {\n@@ -1263,6 +1316,12 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)\n \tint count = 0;\n \tint i;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: touch_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tif (!touch_max)\n \t\treturn 0;\n \n@@ -1424,6 +1483,12 @@ static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom)\n \tint num_contacts_left = 5;\n \tint i, j;\n \n+\tif (!touch_input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: touch_input is NULL\\n\", __func__);\n+\t\treturn;\n+\t}\n+\n \tfor (i = 0; i \u003c finger_frames; i++) {\n \t\tunsigned char *frame = \u0026data[i*finger_frame_len + 109];\n \t\tint current_num_contacts = frame[0] \u0026 0x7F;\n@@ -1595,6 +1660,12 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)\n \tint byte_per_packet = WACOM_BYTES_PER_24HDT_PACKET;\n \tint y_offset = 2;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: touch_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tif (touch_is_muted(wacom) \u0026\u0026 !wacom-\u003eshared-\u003etouch_down)\n \t\treturn 0;\n \n@@ -3092,6 +3163,12 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)\n \tif (data[0] != 0x02)\n \t return 0;\n \n+\tif (!input || !pad_input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tfor (i = 0; i \u003c 2; i++) {\n \t\tint offset = (data[1] \u0026 0x80) ? (8 * i) : (9 * i);\n \t\tbool touch = report_touch_events(wacom)\n@@ -3126,8 +3203,17 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)\n {\n \tstruct wacom_features *features = \u0026wacom-\u003efeatures;\n \tstruct input_dev *input = wacom-\u003etouch_input;\n-\tbool touch = data[1] \u0026 0x80;\n-\tint slot = input_mt_get_slot_by_key(input, data[0]);\n+\tbool touch;\n+\tint slot;\n+\n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: touch_input is NULL\\n\", __func__);\n+\t\treturn;\n+\t}\n+\n+\ttouch = data[1] \u0026 0x80;\n+\tslot = input_mt_get_slot_by_key(input, data[0]);\n \n \tif (slot \u003c 0)\n \t\treturn;\n@@ -3170,6 +3256,12 @@ static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)\n \tstruct input_dev *input = wacom-\u003epad_input;\n \tstruct wacom_features *features = \u0026wacom-\u003efeatures;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: pad_input is NULL\\n\", __func__);\n+\t\treturn;\n+\t}\n+\n \tif (features-\u003etype == INTUOSHT || features-\u003etype == INTUOSHT2) {\n \t\tinput_report_key(input, BTN_LEFT, (data[1] \u0026 0x02) != 0);\n \t\tinput_report_key(input, BTN_BACK, (data[1] \u0026 0x08) != 0);\n@@ -3338,6 +3430,12 @@ static int wacom_bamboo_pad_touch_event(struct wacom_wac *wacom,\n \tint x, y;\n \tbool valid;\n \n+\tif (!input) {\n+\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\n+\t\t\t \"%s: touch_input is NULL\\n\", __func__);\n+\t\treturn 0;\n+\t}\n+\n \tprefix = data[0];\n \n \tfor (id = 0; id \u003c wacom-\u003efeatures.touch_max; id++) {\n@@ -4226,9 +4324,16 @@ static void wacom_update_led(struct wacom *wacom, int button_count, int mask,\n static void wacom_report_numbered_buttons(struct input_dev *input_dev,\n \t\t\t\tint button_count, int mask)\n {\n-\tstruct wacom *wacom = input_get_drvdata(input_dev);\n+\tstruct wacom *wacom;\n \tint i;\n \n+\tif (!input_dev) {\n+\t\tpr_warn_once(\"%s: input_dev is NULL\\n\", __func__);\n+\t\treturn;\n+\t}\n+\n+\twacom = input_get_drvdata(input_dev);\n+\n \tfor (i = 0; i \u003c wacom-\u003eled.count; i++)\n \t\twacom_update_led(wacom, button_count, mask, i);\n \n"
} |
| 2/1 | 2026/10/18 13:05 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"HID_WACOM",
"USB_HID",
"HID"
],
"FocusSymbols": [
"wacom_penpartner_irq",
"wacom_pl_irq",
"wacom_ptu_irq",
"wacom_dtu_irq",
"wacom_dtus_irq",
"wacom_graphire_irq",
"wacom_intuos_pad",
"wacom_intuos_bt_irq",
"wacom_wac_finger_count_touches",
"wacom_intuos_pro2_bt_touch",
"wacom_24hdt_irq",
"wacom_bpt_touch",
"wacom_bpt3_touch_msg",
"wacom_bpt3_button_msg",
"wacom_bamboo_pad_touch_event",
"wacom_report_numbered_buttons",
"wacom_wac_irq"
],
"Reasoning": "The patch adds defensive NULL pointer checks and dev_warn_once/pr_warn_once assertions across multiple report/event handling functions in the Wacom HID driver (drivers/hid/wacom_wac.c) to prevent dereferencing unallocated or unconfigured pen, pad, and touch input devices. The HID driver is reachable in virtualized QEMU environments via USB raw gadget or /dev/uhid emulation, so fuzzing this modified report handling logic is worthwhile.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 2656c0fb9b853c4354ceb4138b9594e207bbacef
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Oct 18 13:05:22 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index c4cd87b781c45..e3fff2471d431 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -128,6 +128,12 @@ static int wacom_penpartner_irq(struct wacom_wac *wacom)
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
switch (data[0]) {
case 1:
if (data[5] & 0x80) {
@@ -174,6 +180,12 @@ static int wacom_pl_irq(struct wacom_wac *wacom)
struct input_dev *input = wacom->pen_input;
int prox, pressure;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
if (data[0] != WACOM_REPORT_PENABLED) {
dev_dbg(input->dev.parent,
"%s: received unknown report #%d\n", __func__, data[0]);
@@ -233,6 +245,12 @@ static int wacom_ptu_irq(struct wacom_wac *wacom)
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
if (data[0] != WACOM_REPORT_PENABLED) {
dev_dbg(input->dev.parent,
"%s: received unknown report #%d\n", __func__, data[0]);
@@ -263,6 +281,12 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)
struct input_dev *input = wacom->pen_input;
int prox = data[1] & 0x20;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
dev_dbg(input->dev.parent,
"%s: received report #%d", __func__, data[0]);
@@ -289,16 +313,26 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)
static int wacom_dtus_irq(struct wacom_wac *wacom)
{
+ struct wacom_features *features = &wacom->features;
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
unsigned short prox, pressure = 0;
+ if (!input || (!wacom->pad_input && features->type != DTUSX)) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: missing input device(s)\n",
+ __func__);
+ return 0;
+ }
+
if (data[0] != WACOM_REPORT_DTUS && data[0] != WACOM_REPORT_DTUSPAD) {
dev_dbg(input->dev.parent,
"%s: received unknown report #%d", __func__, data[0]);
return 0;
} else if (data[0] == WACOM_REPORT_DTUSPAD) {
input = wacom->pad_input;
+ if (!input)
+ return 0;
input_report_key(input, BTN_0, (data[1] & 0x01));
input_report_key(input, BTN_1, (data[1] & 0x02));
input_report_key(input, BTN_2, (data[1] & 0x04));
@@ -349,6 +383,12 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
int rw = 0;
int retval = 0;
+ if (!input || (!pad_input && features->type != GRAPHIRE)) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: missing input device(s)\n", __func__);
+ return 0;
+ }
+
if (features->type == GRAPHIRE_BT) {
if (data[0] != WACOM_REPORT_PENABLED_BT) {
dev_dbg(input->dev.parent,
@@ -541,6 +581,12 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
data[0] == WACOM_REPORT_CINTIQPAD))
return 0;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pad_input is NULL\n", __func__);
+ return 1; /* consume the report to prevent fall-through */
+ }
+
if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
buttons = (data[3] << 1) | (data[2] & 0x01);
ring1 = data[1];
@@ -1217,6 +1263,13 @@ static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)
int i = 1;
unsigned power_raw, battery_capacity, bat_charging, ps_connected;
+ if (!wacom->pen_input || !wacom->pad_input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: expected pen and pad input devices\n",
+ __func__);
+ return 0;
+ }
+
switch (data[0]) {
case 0x04:
if (len < 32) {
@@ -1263,6 +1316,12 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)
int count = 0;
int i;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return 0;
+ }
+
if (!touch_max)
return 0;
@@ -1424,6 +1483,12 @@ static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom)
int num_contacts_left = 5;
int i, j;
+ if (!touch_input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return;
+ }
+
for (i = 0; i < finger_frames; i++) {
unsigned char *frame = &data[i*finger_frame_len + 109];
int current_num_contacts = frame[0] & 0x7F;
@@ -1595,6 +1660,12 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)
int byte_per_packet = WACOM_BYTES_PER_24HDT_PACKET;
int y_offset = 2;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return 0;
+ }
+
if (touch_is_muted(wacom) && !wacom->shared->touch_down)
return 0;
@@ -3092,6 +3163,12 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
if (data[0] != 0x02)
return 0;
+ if (!input || !pad_input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: input is NULL\n", __func__);
+ return 0;
+ }
+
for (i = 0; i < 2; i++) {
int offset = (data[1] & 0x80) ? (8 * i) : (9 * i);
bool touch = report_touch_events(wacom)
@@ -3126,8 +3203,17 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
{
struct wacom_features *features = &wacom->features;
struct input_dev *input = wacom->touch_input;
- bool touch = data[1] & 0x80;
- int slot = input_mt_get_slot_by_key(input, data[0]);
+ bool touch;
+ int slot;
+
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return;
+ }
+
+ touch = data[1] & 0x80;
+ slot = input_mt_get_slot_by_key(input, data[0]);
if (slot < 0)
return;
@@ -3170,6 +3256,12 @@ static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
struct input_dev *input = wacom->pad_input;
struct wacom_features *features = &wacom->features;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pad_input is NULL\n", __func__);
+ return;
+ }
+
if (features->type == INTUOSHT || features->type == INTUOSHT2) {
input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
@@ -3338,6 +3430,12 @@ static int wacom_bamboo_pad_touch_event(struct wacom_wac *wacom,
int x, y;
bool valid;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return 0;
+ }
+
prefix = data[0];
for (id = 0; id < wacom->features.touch_max; id++) {
@@ -4226,9 +4324,16 @@ static void wacom_update_led(struct wacom *wacom, int button_count, int mask,
static void wacom_report_numbered_buttons(struct input_dev *input_dev,
int button_count, int mask)
{
- struct wacom *wacom = input_get_drvdata(input_dev);
+ struct wacom *wacom;
int i;
+ if (!input_dev) {
+ pr_warn_once("%s: input_dev is NULL\n", __func__);
+ return;
+ }
+
+ wacom = input_get_drvdata(input_dev);
+
for (i = 0; i < wacom->led.count; i++)
wacom_update_led(wacom, button_count, mask, i);
|
| 3/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6254 output: 35 thoughts: 114 Thoughts: **Analyzing the Patch: Wacom and HID Fuzzing Potential** Okay, let's dive into this patch. My initial thought is to analyze what's being modified. It looks like we're touching `drivers/hid/wacom_wac.c`. Ah, a Wacom driver within the HID subsystem. My mind immediately jumps to the possibilities here. Wait, can we fuzz HID devices, particularly those like Wacom tablets, with syzkaller? Absolutely! USB HID devices and uhid are prime targets for syzkaller fuzzing. `/dev/uhid` and raw USB gadgets, specifically `syz_usb_connect`, are common entrypoints. Before I dig too deep into the code itself, let me check the git log and the commit message. Understanding the context of this change is crucial. I want to see *why* this change was made and, most importantly, if it opens any interesting fuzzing angles. |
| 4/2 | 2026/10/18 13:05 | tool | grepper |
0mArgs:{
"Expression": "missing input device",
"PathPrefixes": [
"drivers/hid/wacom_wac.c"
]
}Results: {
"Output": "drivers/hid/wacom_wac.c=314=static int wacom_dtus_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-322-\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\ndrivers/hid/wacom_wac.c:323:\t\t\t \"%s: missing input device(s)\\n\",\ndrivers/hid/wacom_wac.c-324-\t\t\t __func__);\n--\ndrivers/hid/wacom_wac.c=375=static int wacom_graphire_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-387-\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\ndrivers/hid/wacom_wac.c:388:\t\t\t \"%s: missing input device(s)\\n\", __func__);\ndrivers/hid/wacom_wac.c-389-\t\treturn 0;\n"
} |
| 5/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6892 output: 29 thoughts: 789 Thoughts: **Analyzing the Reachability of a Wacom Driver Patch** Okay, first things first, I need to understand what this commit is doing. The commit message tells me it's a syz-cluster patch, and it mentions applying a patch under review. The `git log` output would be handy, but I'll make do with what I have. I see that the patch introduces a series of NULL checks for input-related structures in `drivers/hid/wacom_wac.c`, specifically for `input`, `pen_input`, `pad_input`, and `touch_input` across a good number of functions. It looks like it's adding defensive programming to handle potentially NULL input devices. Now, the crucial question: is this code *reachable* in a syzkaller context? The documentation section on reachability is the key. I need to figure out if this Wacom driver can be triggered in a standard virtualized environment. The documentation is clear: fuzzing should only target reachable code. It highlights drivers accessible via virtual buses like virtio, USB gadget, loopback, etc. So, can a Wacom device be emulated in this environment? That's where the knowledge of HID and the Linux kernel's capabilities comes into play. I know that HID drivers bind to HID devices. HID devices can be created through `/dev/uhid` (if CONFIG_UHID is enabled) or using USB raw gadget or USB emulation (CONFIG_USB_RAW_GADGET / CONFIG_USB_DUMMY_HCD). If I can present a HID device with a matching Wacom VID/PID (or Bluetooth/USB configuration), the `hid-wacom` driver *should* bind to it. That's the critical link. To be extra certain, I should check the driver itself, probably in `drivers/hid/wacom_sys.c` or the Makefile and Kconfig files in the same directory, to confirm the binding logic. If the driver is designed to bind to devices presented through the mechanisms described (USB Raw Gadget/UHID), then I can confidently say this code is reachable and therefore worth fuzzing. |
| 6/2 | 2026/10/18 13:05 | tool | grepper |
0mArgs:{
"Expression": "HID_WACOM",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/Kconfig=1353=config HID_PULSAR\n--\ndrivers/hid/Kconfig-1364-\ndrivers/hid/Kconfig:1365:config HID_WACOM\ndrivers/hid/Kconfig-1366-\ttristate \"Wacom Intuos/Graphire tablet support (USB)\"\n--\ndrivers/hid/Makefile=163=wacom-objs\t\t\t:= wacom_wac.o wacom_sys.o\ndrivers/hid/Makefile:164:obj-$(CONFIG_HID_WACOM)\t\t+= wacom.o\ndrivers/hid/Makefile-165-obj-$(CONFIG_HID_WALTOP)\t+= hid-waltop.o\n"
} |
| 7/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8344 output: 35 thoughts: 12 Thoughts: Here's my thought process, as if I were considering this myself: **Kconfig Check for HID_WACOM** Okay, so I need to make sure the HID_WACOM option is set correctly in the Kconfig. I know this is the central configuration file for the Linux kernel, so any driver enablement hinges on this. I'm thinking, is it enabled as a module? Built-in? Disabled entirely? I need to quickly ascertain its state to understand if the relevant functionality is even *available* to the system. Depending on the current setting, that's where I will begin investigating and working. |
| 8/2 | 2026/10/18 13:05 | tool | read-file |
0mArgs:{
"File": "drivers/hid/Kconfig",
"FirstLine": 1364,
"LineCount": 30
}Results: {
"Contents": "1364:\t\n1365:\tconfig HID_WACOM\n1366:\t\ttristate \"Wacom Intuos/Graphire tablet support (USB)\"\n1367:\t\tdepends on USB_HID\n1368:\t\tselect POWER_SUPPLY\n1369:\t\tselect NEW_LEDS\n1370:\t\tselect LEDS_CLASS\n1371:\t\tselect LEDS_TRIGGERS\n1372:\t\thelp\n1373:\t\t Say Y here if you want to use the USB or BT version of the Wacom Intuos\n1374:\t\t or Graphire tablet.\n1375:\t\n1376:\t\t To compile this driver as a module, choose M here: the\n1377:\t\t module will be called wacom.\n1378:\t\n1379:\tconfig HID_WIIMOTE\n1380:\t\ttristate \"Nintendo Wii / Wii U peripherals\"\n1381:\t\tdepends on LEDS_CLASS\n1382:\t\tselect POWER_SUPPLY\n1383:\t\tselect INPUT_FF_MEMLESS\n1384:\t\thelp\n1385:\t\tSupport for Nintendo Wii and Wii U Bluetooth peripherals. Supported\n1386:\t\tdevices are the Wii Remote and its extension devices, but also devices\n1387:\t\tbased on the Wii Remote like the Wii U Pro Controller or the\n1388:\t\tWii Balance Board.\n1389:\t\n1390:\t\tSupport for all official Nintendo extensions is available, however, 3rd\n1391:\t\tparty extensions might not be supported. Please report these devices to:\n1392:\t\t http://github.com/dvdhrm/xwiimote/issues\n1393:\t\n"
} |
| 9/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8962 output: 31 thoughts: 51 Thoughts: Here's my thought process, as it stands: **Digging into the Kernel Configuration Dependencies** Okay, so `config HID_WACOM` has a dependency on `USB_HID`. That's the starting point. But, I need to understand the complete dependency tree here. What else does `USB_HID` rely on? Understanding those relationships is crucial for a complete picture. Let's see... the most logical next step is to examine the `USB_HID` configuration itself. Right, I know that should be located in `drivers/hid/usbhid/Kconfig`. Time to get the details! |
| 10/2 | 2026/10/18 13:05 | tool | grepper |
0mArgs:{
"Expression": "config USB_HID\\b",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/usbhid/Kconfig=2=menu \"USB HID support\"\n--\ndrivers/hid/usbhid/Kconfig-4-\ndrivers/hid/usbhid/Kconfig:5:config USB_HID\ndrivers/hid/usbhid/Kconfig-6-\ttristate \"USB HID transport layer\"\n"
} |
| 11/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9260 output: 35 thoughts: 15 Thoughts: Okay, here's my interpretation of that. **Analyzing the HID USB Configuration File** Alright, let's dive into this `drivers/hid/usbhid/Kconfig` file. I need to understand how the USB HID driver is configured, specifically through the Kconfig system. This is where the core options and dependencies for the USB Human Interface Device drivers are likely defined. I expect to see things like: * **Feature Flags**: Options to enable or disable support for specific HID features. Perhaps there are options for keyboards, mice, joysticks, tablets, etc. There might also be a generic `CONFIG_USB_HID` option. * **Dependency Checks**: Logic that determines when certain features are available based on other kernel configurations. I'm looking for the relationships, how the USB HID features depend on the other parts of the kernel. This is important to determine what will be included, and what will not be included in the kernel. * **Default Settings**: Defaults for enabling or disabling these features. I expect that a lot of HID devices are considered default, so a lot of them should be `y`. * **Help Text**: The explanation of each configuration option, which should tell me what that feature does and might suggest why I would want to turn it on or off. I'm probably going to scan it for top-level choices, any "select" statements that tie HID components together, and any dependencies on specific USB controllers or other drivers. This Kconfig file is the blueprint of which HID components are included in the kernel. |
| 12/2 | 2026/10/18 13:05 | tool | read-file |
0mArgs:{
"File": "drivers/hid/usbhid/Kconfig",
"FirstLine": 1,
"LineCount": 25
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tmenu \"USB HID support\"\n 3:\t\tdepends on USB\n 4:\t\n 5:\tconfig USB_HID\n 6:\t\ttristate \"USB HID transport layer\"\n 7:\t\tdefault y\n 8:\t\tdepends on HID\n 9:\t\thelp\n 10:\t\t Say Y here if you want to connect USB keyboards,\n 11:\t\t mice, joysticks, graphic tablets, or any other HID based devices\n 12:\t\t to your computer via USB, as well as Uninterruptible Power Supply\n 13:\t\t (UPS) and monitor control devices.\n 14:\t\n 15:\t\t You can't use this driver and the HIDBP (Boot Protocol) keyboard\n 16:\t\t and mouse drivers at the same time. More information is available:\n 17:\t\t \u003cfile:Documentation/input/input.rst\u003e.\n 18:\t\n 19:\t\t If unsure, say Y.\n 20:\t\n 21:\t\t To compile this driver as a module, choose M here: the\n 22:\t\t module will be called usbhid.\n 23:\t\n 24:\tcomment \"Input core support is needed for USB HID input layer or HIDBP support\"\n 25:\t\tdepends on USB_HID \u0026\u0026 INPUT=n\n"
} |
| 13/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9983 output: 58 thoughts: 69 Thoughts: Here's my analysis of the provided text, rendered in the first person, assuming an expert user: **Deep Dive into HID_WACOM Interrupt Handling** Okay, time to get my hands dirty and really understand the interrupt flow for these HID_WACOM devices. I need to trace the probing process and, crucially, how the interrupt handlers are actually invoked. Let's start by methodically searching for the call sites of those key interrupt routines: `wacom_penpartner_irq`, `wacom_pl_irq`, `wacom_dtus_irq`, `wacom_bpt_touch`, and so on. Understanding where these functions are called from is the key to understanding the entire chain from hardware to driver. I expect to find some interesting patterns here, which will probably give me some insight on edge cases that might be hard to reproduce. |
| 14/2 | 2026/10/18 13:05 | tool | grepper |
0mArgs:{
"Expression": "wacom_penpartner_irq|wacom_pl_irq|wacom_dtus_irq|wacom_bpt_touch",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/wacom_wac.c=111=static void wacom_notify_battery(struct wacom_wac *wacom_wac,\n--\ndrivers/hid/wacom_wac.c-125-\ndrivers/hid/wacom_wac.c:126:static int wacom_penpartner_irq(struct wacom_wac *wacom)\ndrivers/hid/wacom_wac.c-127-{\n--\ndrivers/hid/wacom_wac.c-175-\ndrivers/hid/wacom_wac.c:176:static int wacom_pl_irq(struct wacom_wac *wacom)\ndrivers/hid/wacom_wac.c-177-{\n--\ndrivers/hid/wacom_wac.c=278=static int wacom_dtu_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-313-\ndrivers/hid/wacom_wac.c:314:static int wacom_dtus_irq(struct wacom_wac *wacom)\ndrivers/hid/wacom_wac.c-315-{\n--\ndrivers/hid/wacom_wac.c=3103=void wacom_wac_report(struct hid_device *hdev, struct hid_report *report)\n--\ndrivers/hid/wacom_wac.c-3154-\ndrivers/hid/wacom_wac.c:3155:static int wacom_bpt_touch(struct wacom_wac *wacom)\ndrivers/hid/wacom_wac.c-3156-{\n--\ndrivers/hid/wacom_wac.c=3382=static int wacom_bpt_irq(struct wacom_wac *wacom, size_t len)\n--\ndrivers/hid/wacom_wac.c-3389-\telse if (len == WACOM_PKGLEN_BBTOUCH)\ndrivers/hid/wacom_wac.c:3390:\t\treturn wacom_bpt_touch(wacom);\ndrivers/hid/wacom_wac.c-3391-\telse if (len == WACOM_PKGLEN_BBTOUCH3)\n--\ndrivers/hid/wacom_wac.c=3558=void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)\n--\ndrivers/hid/wacom_wac.c-3563-\tcase PENPARTNER:\ndrivers/hid/wacom_wac.c:3564:\t\tsync = wacom_penpartner_irq(wacom_wac);\ndrivers/hid/wacom_wac.c-3565-\t\tbreak;\n--\ndrivers/hid/wacom_wac.c-3567-\tcase PL:\ndrivers/hid/wacom_wac.c:3568:\t\tsync = wacom_pl_irq(wacom_wac);\ndrivers/hid/wacom_wac.c-3569-\t\tbreak;\n--\ndrivers/hid/wacom_wac.c-3587-\tcase DTUSX:\ndrivers/hid/wacom_wac.c:3588:\t\tsync = wacom_dtus_irq(wacom_wac);\ndrivers/hid/wacom_wac.c-3589-\t\tbreak;\n"
} |
| 15/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11166 output: 33 thoughts: 40 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing the Wacom Driver's Interrupt Handling** Right, let's dive into this Wacom driver and get a handle on the interrupt handling. My immediate focus is on `wacom_wac_irq` and `wacom_raw_event`. These are the core elements. I know the general flow, but I need to see exactly what's happening at the point of interrupt processing. My first step is to trace the call graph. I need to understand where `wacom_wac_irq` is being invoked. What's the entry point? What's the context? Is it top-half, bottom-half, or threaded? Identifying the direct callers will immediately reveal the critical path of how the hardware interrupts are acknowledged and translated into actionable events. I'm looking for the immediate connection between the interrupt signal and the driver's response. From there, I can determine where `wacom_raw_event` comes into play. Is the `irq` handler responsible for preparing raw data, or does it pass that work to another function? Knowing the direct call stack will give me the information I need to proceed. |
| 16/2 | 2026/10/18 13:05 | tool | grepper |
0mArgs:{
"Expression": "wacom_wac_irq",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/wacom.h=229=extern const struct hid_device_id wacom_ids[];\ndrivers/hid/wacom.h-230-\ndrivers/hid/wacom.h:231:void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len);\ndrivers/hid/wacom.h-232-void wacom_setup_device_quirks(struct wacom *wacom);\n--\ndrivers/hid/wacom_sys.c=170=static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,\n--\ndrivers/hid/wacom_sys.c-182-\ndrivers/hid/wacom_sys.c:183:\twacom_wac_irq(\u0026wacom-\u003ewacom_wac, size);\ndrivers/hid/wacom_sys.c-184-\n--\ndrivers/hid/wacom_wac.c=3527=static int wacom_status_irq(struct wacom_wac *wacom_wac, size_t len)\n--\ndrivers/hid/wacom_wac.c-3557-\ndrivers/hid/wacom_wac.c:3558:void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)\ndrivers/hid/wacom_wac.c-3559-{\n"
} |
| 17/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11870 output: 28 thoughts: 228 Thoughts: **My Analysis of Wacom HID Event Handling** Okay, so I'm looking at the `wacom` driver and its handling of HID raw events. It seems that `wacom_raw_event` is *the* handler for `wacom` input, which makes sense. From what I can see, when an HID report comes in—whether it's from USB raw gadget, uhid, or some other source—`hid_input_report` jumps in and calls `hdev->driver->raw_event`. In our specific case, that `raw_event` handler is, predictably, `wacom_raw_event`. And *that* function, in turn, is calling `wacom_wac_irq`. Got it. But what's up with these NULL checks I'm seeing? Those always make me a little wary, so it's time to dig deeper. I need to understand *why* they were added. Let's go straight to `git log -1` to get the single commit context, or whatever problem this fix is intended to address. Ah-ha! Based on the context, this seems related to malformed USB descriptors or report descriptors being fed in via syzkaller, specifically through the USB raw gadget or uhid. The system was crashing with a NULL pointer dereference, and I'm guessing some input devices weren't getting properly allocated or registered. This could mean that either `pen_input`, `pad_input`, or `touch_input` were left as NULL pointers, leading to the crash. Now I need to see *how* these specific input devices (`pen_input`, `pad_input`, `touch_input`) are allocated and initialized. Let's head over to `wacom_sys.c` or `wacom_wac.c` and figure out where the magic happens. |
| 18/2 | 2026/10/18 13:05 | tool | grepper |
0mArgs:{
"Expression": "pen_input",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "\nFull output is too long, showing 200 out of 395 lines.\nUse more precise expression or PathPrefixes if possible.\n\nNumber of matching lines per file (7 files in total):\ndrivers/hid/hid-uclogic-core.c:3\ndrivers/hid/hid-uclogic-params.h:1\ndrivers/hid/hid-udraw-ps3.c:12\ndrivers/hid/wacom.h:1\ndrivers/hid/wacom_sys.c:16\ndrivers/hid/wacom_wac.c:70\ndrivers/hid/wacom_wac.h:1\n\ndrivers/hid/hid-uclogic-core.c=33=static void uclogic_inrange_timeout(struct timer_list *t)\n--\ndrivers/hid/hid-uclogic-core.c-36-\t\t\t\t\t\t\t inrange_timer);\ndrivers/hid/hid-uclogic-core.c:37:\tstruct input_dev *input = drvdata-\u003epen_input;\ndrivers/hid/hid-uclogic-core.c-38-\n--\ndrivers/hid/hid-uclogic-core.c=125=static int uclogic_input_configured(struct hid_device *hdev,\n--\ndrivers/hid/hid-uclogic-core.c-144-\t\t/* Remember the input device so we can simulate events */\ndrivers/hid/hid-uclogic-core.c:145:\t\tdrvdata-\u003epen_input = hi-\u003einput;\ndrivers/hid/hid-uclogic-core.c-146-\t}\n--\ndrivers/hid/hid-uclogic-core.c=547=static void uclogic_remove(struct hid_device *hdev)\n--\ndrivers/hid/hid-uclogic-core.c-557-\t * timer and makes any later re-arm a no-op, so it is provably dead\ndrivers/hid/hid-uclogic-core.c:558:\t * before hid_hw_stop() frees the input device drvdata-\u003epen_input\ndrivers/hid/hid-uclogic-core.c-559-\t * points at.\n--\ndrivers/hid/hid-uclogic-params.h=248=struct uclogic_drvdata {\n--\ndrivers/hid/hid-uclogic-params.h-258-\t/* Pen input device */\ndrivers/hid/hid-uclogic-params.h:259:\tstruct input_dev *pen_input;\ndrivers/hid/hid-uclogic-params.h-260-\t/* In-range timer */\n--\ndrivers/hid/hid-udraw-ps3.c=68=struct udraw {\n--\ndrivers/hid/hid-udraw-ps3.c-70-\tstruct input_dev *touch_input_dev;\ndrivers/hid/hid-udraw-ps3.c:71:\tstruct input_dev *pen_input_dev;\ndrivers/hid/hid-udraw-ps3.c-72-\tstruct input_dev *accel_input_dev;\n--\ndrivers/hid/hid-udraw-ps3.c=101=static int udraw_raw_event(struct hid_device *hdev, struct hid_report *report,\n--\ndrivers/hid/hid-udraw-ps3.c-235-\ndrivers/hid/hid-udraw-ps3.c:236:\t\tinput_report_key(udraw-\u003epen_input_dev, BTN_TOUCH, (level != 0));\ndrivers/hid/hid-udraw-ps3.c:237:\t\tinput_report_key(udraw-\u003epen_input_dev, BTN_TOOL_PEN, 1);\ndrivers/hid/hid-udraw-ps3.c:238:\t\tinput_report_abs(udraw-\u003epen_input_dev, ABS_PRESSURE, level);\ndrivers/hid/hid-udraw-ps3.c:239:\t\tinput_report_abs(udraw-\u003epen_input_dev, ABS_X, x);\ndrivers/hid/hid-udraw-ps3.c:240:\t\tinput_report_abs(udraw-\u003epen_input_dev, ABS_Y, y);\ndrivers/hid/hid-udraw-ps3.c-241-\t} else {\ndrivers/hid/hid-udraw-ps3.c:242:\t\tinput_report_key(udraw-\u003epen_input_dev, BTN_TOUCH, 0);\ndrivers/hid/hid-udraw-ps3.c:243:\t\tinput_report_key(udraw-\u003epen_input_dev, BTN_TOOL_PEN, 0);\ndrivers/hid/hid-udraw-ps3.c:244:\t\tinput_report_abs(udraw-\u003epen_input_dev, ABS_PRESSURE, 0);\ndrivers/hid/hid-udraw-ps3.c-245-\t}\ndrivers/hid/hid-udraw-ps3.c:246:\tinput_sync(udraw-\u003epen_input_dev);\ndrivers/hid/hid-udraw-ps3.c-247-\n--\ndrivers/hid/hid-udraw-ps3.c=329=static bool udraw_setup_pen(struct udraw *udraw,\n--\ndrivers/hid/hid-udraw-ps3.c-351-\ndrivers/hid/hid-udraw-ps3.c:352:\tudraw-\u003epen_input_dev = input_dev;\ndrivers/hid/hid-udraw-ps3.c-353-\n--\ndrivers/hid/hid-udraw-ps3.c=407=static int udraw_probe(struct hid_device *hdev, const struct hid_device_id *id)\n--\ndrivers/hid/hid-udraw-ps3.c-437-\t\tinput_register_device(udraw-\u003etouch_input_dev) ||\ndrivers/hid/hid-udraw-ps3.c:438:\t\tinput_register_device(udraw-\u003epen_input_dev) ||\ndrivers/hid/hid-udraw-ps3.c-439-\t\tinput_register_device(udraw-\u003eaccel_input_dev);\n--\ndrivers/hid/wacom.h=232=void wacom_setup_device_quirks(struct wacom *wacom);\ndrivers/hid/wacom.h:233:int wacom_setup_pen_input_capabilities(struct input_dev *input_dev,\ndrivers/hid/wacom.h-234-\t\t\t\t struct wacom_wac *wacom_wac);\n--\ndrivers/hid/wacom_sys.c=2140=static int wacom_allocate_inputs(struct wacom *wacom)\n--\ndrivers/hid/wacom_sys.c-2143-\ndrivers/hid/wacom_sys.c:2144:\twacom_wac-\u003epen_input = wacom_allocate_input(wacom);\ndrivers/hid/wacom_sys.c-2145-\twacom_wac-\u003etouch_input = wacom_allocate_input(wacom);\ndrivers/hid/wacom_sys.c-2146-\twacom_wac-\u003epad_input = wacom_allocate_input(wacom);\ndrivers/hid/wacom_sys.c:2147:\tif (!wacom_wac-\u003epen_input ||\ndrivers/hid/wacom_sys.c-2148-\t !wacom_wac-\u003etouch_input ||\n--\ndrivers/hid/wacom_sys.c-2151-\ndrivers/hid/wacom_sys.c:2152:\twacom_wac-\u003epen_input-\u003ename = wacom_wac-\u003epen_name;\ndrivers/hid/wacom_sys.c-2153-\twacom_wac-\u003etouch_input-\u003ename = wacom_wac-\u003etouch_name;\n--\ndrivers/hid/wacom_sys.c=2159=static int wacom_setup_inputs(struct wacom *wacom)\ndrivers/hid/wacom_sys.c-2160-{\ndrivers/hid/wacom_sys.c:2161:\tstruct input_dev *pen_input_dev, *touch_input_dev, *pad_input_dev;\ndrivers/hid/wacom_sys.c-2162-\tstruct wacom_wac *wacom_wac = \u0026(wacom-\u003ewacom_wac);\n--\ndrivers/hid/wacom_sys.c-2164-\ndrivers/hid/wacom_sys.c:2165:\tpen_input_dev = wacom_wac-\u003epen_input;\ndrivers/hid/wacom_sys.c-2166-\ttouch_input_dev = wacom_wac-\u003etouch_input;\n--\ndrivers/hid/wacom_sys.c-2168-\ndrivers/hid/wacom_sys.c:2169:\tif (!pen_input_dev || !touch_input_dev || !pad_input_dev)\ndrivers/hid/wacom_sys.c-2170-\t\treturn -EINVAL;\ndrivers/hid/wacom_sys.c-2171-\ndrivers/hid/wacom_sys.c:2172:\terror = wacom_setup_pen_input_capabilities(pen_input_dev, wacom_wac);\ndrivers/hid/wacom_sys.c-2173-\tif (error) {\ndrivers/hid/wacom_sys.c-2174-\t\t/* no pen in use on this interface */\ndrivers/hid/wacom_sys.c:2175:\t\tinput_free_device(pen_input_dev);\ndrivers/hid/wacom_sys.c:2176:\t\twacom_wac-\u003epen_input = NULL;\ndrivers/hid/wacom_sys.c:2177:\t\tpen_input_dev = NULL;\ndrivers/hid/wacom_sys.c-2178-\t}\n--\ndrivers/hid/wacom_sys.c=2199=static int wacom_register_inputs(struct wacom *wacom)\ndrivers/hid/wacom_sys.c-2200-{\ndrivers/hid/wacom_sys.c:2201:\tstruct input_dev *pen_input_dev, *touch_input_dev, *pad_input_dev;\ndrivers/hid/wacom_sys.c-2202-\tstruct wacom_wac *wacom_wac = \u0026(wacom-\u003ewacom_wac);\n--\ndrivers/hid/wacom_sys.c-2204-\ndrivers/hid/wacom_sys.c:2205:\tpen_input_dev = wacom_wac-\u003epen_input;\ndrivers/hid/wacom_sys.c-2206-\ttouch_input_dev = wacom_wac-\u003etouch_input;\n--\ndrivers/hid/wacom_sys.c-2208-\ndrivers/hid/wacom_sys.c:2209:\tif (pen_input_dev) {\ndrivers/hid/wacom_sys.c:2210:\t\terror = input_register_device(pen_input_dev);\ndrivers/hid/wacom_sys.c-2211-\t\tif (error)\n--\ndrivers/hid/wacom_sys.c-2231-\twacom_wac-\u003etouch_input = NULL;\ndrivers/hid/wacom_sys.c:2232:\twacom_wac-\u003epen_input = NULL;\ndrivers/hid/wacom_sys.c-2233-\treturn error;\n--\ndrivers/hid/wacom_sys.c=2360=static void wacom_release_resources(struct wacom *wacom)\n--\ndrivers/hid/wacom_sys.c-2370-\ndrivers/hid/wacom_sys.c:2371:\twacom-\u003ewacom_wac.pen_input = NULL;\ndrivers/hid/wacom_sys.c-2372-\twacom-\u003ewacom_wac.touch_input = NULL;\n--\ndrivers/hid/wacom_wac.c=41=static void wacom_force_proxout(struct wacom_wac *wacom_wac)\ndrivers/hid/wacom_wac.c-42-{\ndrivers/hid/wacom_wac.c:43:\tstruct input_dev *input = wacom_wac-\u003epen_input;\ndrivers/hid/wacom_wac.c-44-\n--\ndrivers/hid/wacom_wac.c=126=static int wacom_penpartner_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-128-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:129:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-130-\n--\ndrivers/hid/wacom_wac.c-132-\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\ndrivers/hid/wacom_wac.c:133:\t\t\t \"%s: pen_input is NULL\\n\", __func__);\ndrivers/hid/wacom_wac.c-134-\t\treturn 0;\n--\ndrivers/hid/wacom_wac.c=176=static int wacom_pl_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-179-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:180:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-181-\tint prox, pressure;\n--\ndrivers/hid/wacom_wac.c-184-\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\ndrivers/hid/wacom_wac.c:185:\t\t\t \"%s: pen_input is NULL\\n\", __func__);\ndrivers/hid/wacom_wac.c-186-\t\treturn 0;\n--\ndrivers/hid/wacom_wac.c=243=static int wacom_ptu_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-245-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:246:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-247-\n--\ndrivers/hid/wacom_wac.c-249-\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\ndrivers/hid/wacom_wac.c:250:\t\t\t \"%s: pen_input is NULL\\n\", __func__);\ndrivers/hid/wacom_wac.c-251-\t\treturn 0;\n--\ndrivers/hid/wacom_wac.c=278=static int wacom_dtu_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-280-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:281:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-282-\tint prox = data[1] \u0026 0x20;\n--\ndrivers/hid/wacom_wac.c-285-\t\tdev_warn_once(\u0026container_of(wacom, struct wacom, wacom_wac)-\u003ehdev-\u003edev,\ndrivers/hid/wacom_wac.c:286:\t\t\t \"%s: pen_input is NULL\\n\", __func__);\ndrivers/hid/wacom_wac.c-287-\t\treturn 0;\n--\ndrivers/hid/wacom_wac.c=314=static int wacom_dtus_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-317-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:318:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-319-\tunsigned short prox, pressure = 0;\n--\ndrivers/hid/wacom_wac.c=375=static int wacom_graphire_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-378-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:379:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-380-\tstruct input_dev *pad_input = wacom-\u003epad_input;\n--\ndrivers/hid/wacom_wac.c=788=static void wacom_exit_report(struct wacom_wac *wacom)\ndrivers/hid/wacom_wac.c-789-{\ndrivers/hid/wacom_wac.c:790:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-791-\tstruct wacom_features *features = \u0026wacom-\u003efeatures;\n--\ndrivers/hid/wacom_wac.c=827=static int wacom_intuos_inout(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-830-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:831:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-832-\tint idx = (features-\u003etype == INTUOS) ? (data[1] \u0026 0x01) : 0;\n--\ndrivers/hid/wacom_wac.c=903=static int wacom_intuos_general(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-906-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:907:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-908-\tint idx = (features-\u003etype == INTUOS) ? (data[1] \u0026 0x01) : 0;\n--\ndrivers/hid/wacom_wac.c=1076=static int wacom_intuos_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1078-\tunsigned char *data = wacom-\u003edata;\ndrivers/hid/wacom_wac.c:1079:\tstruct input_dev *input = wacom-\u003epen_input;\ndrivers/hid/wacom_wac.c-1080-\tint result;\n--\n\n"
} |
| 19/2 | 2026/10/18 13:05 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17381 output: 29 thoughts: 859 Thoughts: **Analyzing the WorthFuzzing Criteria for a Wacom Driver Patch** Okay, let's break this down. My initial thought is to examine this `wacom_setup_inputs` function. If the pen input device setup fails, `pen_input` gets freed and set to `NULL`. Later, the interrupt handler is going to dereference `wacom->pen_input`, which is now `NULL`. That's a classic null pointer dereference bug waiting to happen. The patch introduces `dev_warn_once` or `pr_warn_once` checks for `input` being `NULL`. So, is this a runtime assertion or purely defensive? The documentation says, under "WHEN TO RETURN WorthFuzzing=true," that "Runtime Assertions and Defensive Checks" are a positive criterion. Specifically, "Any introduction or alteration of assertions… in reachable paths." This `dev_warn_once` looks like that *exactly*. But does this alter control flow? Yes, absolutely! These checks include early returns (`return 0;`, `return;`, `return 1;`). It modifies the flow to prevent those `NULL` dereferences and provides a warning. Even with the warnings disabled, modifying control flow in a reachable driver is executable code modification in a reachable driver, so we should flag this as `WorthFuzzing=true`. Now, does Syzkaller consider HID_WACOM as "reachable"? Let's verify if Syzkaller has descriptions for USB or HID devices that bind to `hid-wacom`. I should check `wacom_ids` in `wacom_wac.c` or `wacom.h` or `wacom_sys.c` to be certain. Given that the driver is designed to handle hardware, it's extremely likely. Based on the documentation, I'm confident we have a `WorthFuzzing=true` situation here. |
| 20/2 | 2026/10/18 13:06 | tool | grepper |
0mArgs:{
"Expression": "wacom_ids",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/wacom.h=221=static inline u32 wacom_rescale(u32 value, u32 in_max, u32 out_max)\n--\ndrivers/hid/wacom.h-228-\ndrivers/hid/wacom.h:229:extern const struct hid_device_id wacom_ids[];\ndrivers/hid/wacom.h-230-\n--\ndrivers/hid/wacom_sys.c=2605=static void wacom_wireless_work(struct work_struct *work)\n--\ndrivers/hid/wacom_sys.c-2639-\t} else {\ndrivers/hid/wacom_sys.c:2640:\t\tconst struct hid_device_id *id = wacom_ids;\ndrivers/hid/wacom_sys.c-2641-\n--\ndrivers/hid/wacom_sys.c=3048=static struct hid_driver wacom_driver = {\ndrivers/hid/wacom_sys.c-3049-\t.name =\t\t\"wacom\",\ndrivers/hid/wacom_sys.c:3050:\t.id_table =\twacom_ids,\ndrivers/hid/wacom_sys.c-3051-\t.probe =\twacom_probe,\n--\ndrivers/hid/wacom_wac.c=5069=static const struct wacom_features wacom_features_0x94 =\n--\ndrivers/hid/wacom_wac.c-5091-\ndrivers/hid/wacom_wac.c:5092:const struct hid_device_id wacom_ids[] = {\ndrivers/hid/wacom_wac.c-5093-\t{ USB_DEVICE_WACOM(0x00) },\n--\ndrivers/hid/wacom_wac.c-5260-};\ndrivers/hid/wacom_wac.c:5261:MODULE_DEVICE_TABLE(hid, wacom_ids);\n"
} |
| 21/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19180 output: 48 thoughts: 719 Thoughts: **Wacom Driver Analysis for Fuzzing Potential** Okay, so I'm looking at this `wacom_ids` structure, specifically the `USB_DEVICE_WACOM(...)` and `BT_DEVICE_WACOM(...)` entries. My expert eye immediately sees the potential for Syzkaller to probe this driver via USB Raw Gadget (USB emulation) or UHID (or Bluetooth vhci). The USB raw gadget is particularly interesting because it can emulate *any* USB device with *any* vendor ID/product ID. I see Wacom's vendor ID, `USB_VENDOR_ID_WACOM` (0x056a), and my mind is already racing with fuzzing possibilities. If Syzkaller emulates a USB device with VID 0x056a, the kernel's usbhid subsystem will pick it up, match the `wacom_driver` using `wacom_ids`, then call `wacom_probe`, which routes input reports to `wacom_raw_event` and then `wacom_wac_irq`. That's the entry point! I've seen Syzkaller find bugs in `hid-wacom` this exact way before, which is a good reminder. Now, let's not overlook `uhid`. Wait, yes, `/dev/uhid` allows us to create virtual HID devices with totally arbitrary parameters. This is huge. We can specify bus type, VID, PID, report descriptors, and feed it input reports! So the driver is reachable via both USB raw gadget and `/dev/uhid`. That's two entry points! Now I'm looking at "Is WorthFuzzing?" Yes, absolutely! It mentions "Drivers accessible via virtual buses," like virtio, USB gadget, loopback, netlink, binder, sockets, and so on. This driver is *definitely* accessible via virtual buses (USB gadget/UHID). Excellent. Also, I'm noticing that the defensive checks and assertions (`dev_warn_once`, `pr_warn_once`, and NULL checks) are implemented in reachable code paths. This means it might be an interesting target for detecting control flow issues. Now, I need to list what the key symbols are. Let's quickly enumerate the functions that are modified: 1. `wacom_penpartner_irq` 2. `wacom_pl_irq` 3. `wacom_ptu_irq` 4. `wacom_dtu_irq` 5. `wacom_dtus_irq` 6. `wacom_graphire_irq` 7. `wacom_intuos_pad` 8. `wacom_intuos_bt_irq` 9. `wacom_wac_finger_count_touches` 10. `wacom_intuos_pro2_bt_touch` 11. `wacom_24hdt_irq` 12. `wacom_bpt_touch` 13. `wacom_bpt3_touch_msg` 14. `wacom_bpt3_button_msg` 15. `wacom_bamboo_pad_touch_event` 16. `wacom_report_numbered_buttons` Let's figure out what is static or not. We need to check if they are entrypoints or are called by `wacom_wac_irq`, because that will indicate the data flow. I need to check `wacom_wac_irq` and `wacom_raw_event`. In `wacom_wac.c`, I'll look at what is called from `wacom_wac_irq`, or `wacom_wac_report`, or anything that seems interesting. This will guide my fuzzing efforts. |
| 22/2 | 2026/10/18 13:06 | tool | grepper |
0mArgs:{
"Expression": "wacom_wac_irq|wacom_wac_report",
"PathPrefixes": [
"drivers/hid/wacom_wac.c"
]
}Results: {
"Output": "drivers/hid/wacom_wac.c=3075=static int wacom_wac_collection(struct hid_device *hdev, struct hid_report *report,\n--\ndrivers/hid/wacom_wac.c-3102-\ndrivers/hid/wacom_wac.c:3103:void wacom_wac_report(struct hid_device *hdev, struct hid_report *report)\ndrivers/hid/wacom_wac.c-3104-{\n--\ndrivers/hid/wacom_wac.c=3527=static int wacom_status_irq(struct wacom_wac *wacom_wac, size_t len)\n--\ndrivers/hid/wacom_wac.c-3557-\ndrivers/hid/wacom_wac.c:3558:void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)\ndrivers/hid/wacom_wac.c-3559-{\n"
} |
| 23/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21054 output: 40 thoughts: 667 Thoughts: **Analyzing Static Functions in `drivers/hid/wacom_wac.c`** Okay, let's dive into this. I'm checking if the modified functions within `drivers/hid/wacom_wac.c` are indeed static. Let me quickly go through the list: `wacom_penpartner_irq`, `wacom_pl_irq`, `wacom_ptu_irq`, `wacom_dtu_irq`, `wacom_dtus_irq`, `wacom_graphire_irq`, `wacom_intuos_pad`, `wacom_intuos_bt_irq`, `wacom_wac_finger_count_touches`, `wacom_intuos_pro2_bt_touch`, `wacom_24hdt_irq`, `wacom_bpt_touch`, `wacom_bpt3_touch_msg`, `wacom_bpt3_button_msg`, `wacom_bamboo_pad_touch_event`, and `wacom_report_numbered_buttons`. Yep, they're all declared as `static int` or `static void`. Now, the question is, can these static functions be treated as FocusSymbols? I need to be careful here, considering the nuances of static functions and coverage analysis. Let me re-read the relevant instruction. Right, it's about "- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h)". The key here is "STATIC INLINE FUNCTIONS IN HEADERS (.h)". It states that compiler-inlined static functions in headers don't have distinct symbol addresses in the vmlinux and are difficult to target directly with filters. That's not the case here, as they are not inline static functions in headers, but static functions in a .c file. In `.c` files, static functions *should* (unless inlined by the compiler, but even then, kallsyms has them if not inlined) have external linkage or normal symbols in vmlinux, so should be targetable or have callers that are targetable. The more pressing question is whether the static functions in `wacom_wac.c` are inlined or separate symbols. Let's dig deeper and check how they're used. For instance, `wacom_penpartner_irq`, `wacom_pl_irq`, `wacom_ptu_irq`, `wacom_dtu_irq`, `wacom_dtus_irq`, `wacom_graphire_irq`, `wacom_intuos_bt_irq`, and `wacom_24hdt_irq` are all called from a big `switch (features->type)` statement within the `wacom_wac_irq` function. So, `wacom_wac_irq` seems to be the central dispatcher here. Now, I need to inspect the `wacom_wac_irq` function within `drivers/hid/wacom_wac.c` to confirm. |
| 24/2 | 2026/10/18 13:06 | tool | read-file |
0mArgs:{
"File": "drivers/hid/wacom_wac.c",
"FirstLine": 3558,
"LineCount": 60
}Results: {
"Contents": "3558:\tvoid wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)\n3559:\t{\n3560:\t\tbool sync;\n3561:\t\n3562:\t\tswitch (wacom_wac-\u003efeatures.type) {\n3563:\t\tcase PENPARTNER:\n3564:\t\t\tsync = wacom_penpartner_irq(wacom_wac);\n3565:\t\t\tbreak;\n3566:\t\n3567:\t\tcase PL:\n3568:\t\t\tsync = wacom_pl_irq(wacom_wac);\n3569:\t\t\tbreak;\n3570:\t\n3571:\t\tcase WACOM_G4:\n3572:\t\tcase GRAPHIRE:\n3573:\t\tcase GRAPHIRE_BT:\n3574:\t\tcase WACOM_MO:\n3575:\t\t\tsync = wacom_graphire_irq(wacom_wac);\n3576:\t\t\tbreak;\n3577:\t\n3578:\t\tcase PTU:\n3579:\t\t\tsync = wacom_ptu_irq(wacom_wac);\n3580:\t\t\tbreak;\n3581:\t\n3582:\t\tcase DTU:\n3583:\t\t\tsync = wacom_dtu_irq(wacom_wac);\n3584:\t\t\tbreak;\n3585:\t\n3586:\t\tcase DTUS:\n3587:\t\tcase DTUSX:\n3588:\t\t\tsync = wacom_dtus_irq(wacom_wac);\n3589:\t\t\tbreak;\n3590:\t\n3591:\t\tcase INTUOS:\n3592:\t\tcase INTUOS3S:\n3593:\t\tcase INTUOS3:\n3594:\t\tcase INTUOS3L:\n3595:\t\tcase INTUOS4S:\n3596:\t\tcase INTUOS4:\n3597:\t\tcase INTUOS4L:\n3598:\t\tcase CINTIQ:\n3599:\t\tcase WACOM_BEE:\n3600:\t\tcase WACOM_13HD:\n3601:\t\tcase WACOM_21UX2:\n3602:\t\tcase WACOM_22HD:\n3603:\t\tcase WACOM_24HD:\n3604:\t\tcase WACOM_27QHD:\n3605:\t\tcase DTK:\n3606:\t\tcase CINTIQ_HYBRID:\n3607:\t\tcase CINTIQ_COMPANION_2:\n3608:\t\t\tsync = wacom_intuos_irq(wacom_wac);\n3609:\t\t\tbreak;\n3610:\t\n3611:\t\tcase INTUOS4WL:\n3612:\t\t\tsync = wacom_intuos_bt_irq(wacom_wac, len);\n3613:\t\t\tbreak;\n3614:\t\n3615:\t\tcase WACOM_24HDT:\n3616:\t\tcase WACOM_27QHDT:\n3617:\t\t\tsync = wacom_24hdt_irq(wacom_wac);\n"
} |
| 25/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23270 output: 40 thoughts: 17 Thoughts: Okay, here's my summary, presented as a stream of thought: **Diving Deeper into `wacom_wac_irq`** Right, let's take a closer look at the rest of `wacom_wac_irq`. I've got a decent grasp of the overall context, but it's time to drill down. I need to understand the nuances, the specific interactions, and how this fits within the broader interrupt handling strategy for the Wacom device. Are there any subtle edge cases or potential race conditions I should be on the lookout for? Perhaps there are areas where optimization or more robust error handling could be applied. Let's see what gems we can unearth. |
| 26/2 | 2026/10/18 13:06 | tool | read-file |
0mArgs:{
"File": "drivers/hid/wacom_wac.c",
"FirstLine": 3618,
"LineCount": 60
}Results: {
"Contents": "3618:\t\t\tbreak;\n3619:\t\n3620:\t\tcase INTUOS5S:\n3621:\t\tcase INTUOS5:\n3622:\t\tcase INTUOS5L:\n3623:\t\tcase INTUOSPS:\n3624:\t\tcase INTUOSPM:\n3625:\t\tcase INTUOSPL:\n3626:\t\t\tif (len == WACOM_PKGLEN_BBTOUCH3)\n3627:\t\t\t\tsync = wacom_bpt3_touch(wacom_wac);\n3628:\t\t\telse if (wacom_wac-\u003edata[0] == WACOM_REPORT_USB)\n3629:\t\t\t\tsync = wacom_status_irq(wacom_wac, len);\n3630:\t\t\telse\n3631:\t\t\t\tsync = wacom_intuos_irq(wacom_wac);\n3632:\t\t\tbreak;\n3633:\t\n3634:\t\tcase INTUOSP2_BT:\n3635:\t\tcase INTUOSP2S_BT:\n3636:\t\tcase INTUOSHT3_BT:\n3637:\t\t\tsync = wacom_intuos_pro2_bt_irq(wacom_wac, len);\n3638:\t\t\tbreak;\n3639:\t\n3640:\t\tcase TABLETPC:\n3641:\t\tcase TABLETPCE:\n3642:\t\tcase TABLETPC2FG:\n3643:\t\tcase MTSCREEN:\n3644:\t\tcase MTTPC:\n3645:\t\tcase MTTPC_B:\n3646:\t\t\tsync = wacom_tpc_irq(wacom_wac, len);\n3647:\t\t\tbreak;\n3648:\t\n3649:\t\tcase BAMBOO_PT:\n3650:\t\tcase BAMBOO_PEN:\n3651:\t\tcase BAMBOO_TOUCH:\n3652:\t\tcase INTUOSHT:\n3653:\t\tcase INTUOSHT2:\n3654:\t\t\tif (wacom_wac-\u003edata[0] == WACOM_REPORT_USB)\n3655:\t\t\t\tsync = wacom_status_irq(wacom_wac, len);\n3656:\t\t\telse\n3657:\t\t\t\tsync = wacom_bpt_irq(wacom_wac, len);\n3658:\t\t\tbreak;\n3659:\t\n3660:\t\tcase BAMBOO_PAD:\n3661:\t\t\tsync = wacom_bamboo_pad_irq(wacom_wac, len);\n3662:\t\t\tbreak;\n3663:\t\n3664:\t\tcase WIRELESS:\n3665:\t\t\tsync = wacom_wireless_irq(wacom_wac, len);\n3666:\t\t\tbreak;\n3667:\t\n3668:\t\tcase REMOTE:\n3669:\t\t\tsync = false;\n3670:\t\t\tif (wacom_wac-\u003edata[0] == WACOM_REPORT_DEVICE_LIST)\n3671:\t\t\t\twacom_remote_status_irq(wacom_wac, len);\n3672:\t\t\telse\n3673:\t\t\t\tsync = wacom_remote_irq(wacom_wac, len);\n3674:\t\t\tbreak;\n3675:\t\n3676:\t\tdefault:\n3677:\t\t\tsync = false;\n"
} |
| 27/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 24369 output: 33 thoughts: 320 Thoughts: **Analyzing Wacom Interrupt Handlers** Okay, let's break this down. I see a clear mapping between these Wacom product names and their corresponding interrupt request (IRQ) handlers. I'm noting the pattern here: * PENPARTNER corresponds to `wacom_penpartner_irq` * PL maps to `wacom_pl_irq` * GRAPHIRE and similar models are handled by `wacom_graphire_irq` * PTU uses `wacom_ptu_irq` * DTU gets `wacom_dtu_irq` * DTUS and DTUSX are associated with `wacom_dtus_irq` * INTUOS models trigger `wacom_intuos_irq` which then calls `wacom_intuos_pad`, which is an interesting design consideration. * INTUOS4WL uses the Bluetooth specific `wacom_intuos_bt_irq` handler * WACOM\_24HDT triggers `wacom_24hdt_irq` * INTUOSP2\_BT has its own `wacom_intuos_pro2_bt_irq`, which appears to call `wacom_intuos_pro2_bt_touch` * BAMBOO\_PT is related to `wacom_bpt_irq` which triggers several touch-related functions: `wacom_bpt_touch`, `wacom_bpt3_touch`, `wacom_bpt3_touch_msg`, and `wacom_bpt3_button_msg`. It seems like the Bamboo line has a few variations on its touch implementation. * BAMBOO\_PAD uses `wacom_bamboo_pad_irq` and then calls `wacom_bamboo_pad_touch_event` Now, I'm trying to see where the function `wacom_report_numbered_buttons` is used within this framework. Let's start with a grep to identify the calling locations. I want to see how these button reports are handled across the different models. |
| 28/2 | 2026/10/18 13:06 | tool | grepper |
0mArgs:{
"Expression": "wacom_report_numbered_buttons",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/wacom_wac.c=31=MODULE_PARM_DESC(touch_arbitration, \" on (Y) off (N)\");\ndrivers/hid/wacom_wac.c-32-\ndrivers/hid/wacom_wac.c:33:static void wacom_report_numbered_buttons(struct input_dev *input_dev,\ndrivers/hid/wacom_wac.c-34-\t\t\t\tint button_count, int mask);\n--\ndrivers/hid/wacom_wac.c=565=static int wacom_intuos_pad(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-700-\ndrivers/hid/wacom_wac.c:701:\twacom_report_numbered_buttons(input, nbuttons, buttons);\ndrivers/hid/wacom_wac.c-702-\n--\ndrivers/hid/wacom_wac.c=1548=static void wacom_intuos_pro2_bt_pad(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1565-\ndrivers/hid/wacom_wac.c:1566:\twacom_report_numbered_buttons(pad_input, nbuttons,\ndrivers/hid/wacom_wac.c-1567- expresskeys | (center \u003c\u003c (nbuttons - 1)));\n--\ndrivers/hid/wacom_wac.c=1589=static void wacom_intuos_gen3_bt_pad(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1595-\ndrivers/hid/wacom_wac.c:1596:\twacom_report_numbered_buttons(pad_input, 4, buttons);\ndrivers/hid/wacom_wac.c-1597-\n--\ndrivers/hid/wacom_wac.c=4282=static void wacom_update_led(struct wacom *wacom, int button_count, int mask,\n--\ndrivers/hid/wacom_wac.c-4323-\ndrivers/hid/wacom_wac.c:4324:static void wacom_report_numbered_buttons(struct input_dev *input_dev,\ndrivers/hid/wacom_wac.c-4325-\t\t\t\tint button_count, int mask)\n"
} |
| 29/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25809 output: 36 thoughts: 23 Thoughts: Here's my thought process, as if I were analyzing that code: **Diving into the `wacom_wac_finger_count_touches` Call** Okay, so I need to figure out the context of that function, `wacom_wac_finger_count_touches`. First things first, I need to understand where it's being used. Finding where a function is called is a fundamental debugging and analysis step. I'll need to trace its usage within the codebase. Let's start with a simple search, or if I have a more sophisticated IDE setup, I might use its "find all references" or "call graph" features. This should quickly reveal the parts of the code that are dependent on the results of that function. Once I know where it is being called, I can better assess the logic behind this function's purpose. |
| 30/2 | 2026/10/18 13:06 | tool | grepper |
0mArgs:{
"Expression": "wacom_wac_finger_count_touches",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"Output": "drivers/hid/wacom_wac.c=1260=static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)\n--\ndrivers/hid/wacom_wac.c-1311-\ndrivers/hid/wacom_wac.c:1312:static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)\ndrivers/hid/wacom_wac.c-1313-{\n--\ndrivers/hid/wacom_wac.c=1475=static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1533-\t\t\twacom-\u003enum_contacts_left = 0;\ndrivers/hid/wacom_wac.c:1534:\t\t\twacom-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom);\ndrivers/hid/wacom_wac.c-1535-\t\t\tinput_sync(touch_input);\n--\ndrivers/hid/wacom_wac.c=1652=static int wacom_24hdt_irq(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1723-\t\twacom-\u003enum_contacts_left = 0;\ndrivers/hid/wacom_wac.c:1724:\t\twacom-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom);\ndrivers/hid/wacom_wac.c-1725-\t}\n--\ndrivers/hid/wacom_wac.c=1729=static int wacom_mt_touch(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1774-\t\twacom-\u003enum_contacts_left = 0;\ndrivers/hid/wacom_wac.c:1775:\t\twacom-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom);\ndrivers/hid/wacom_wac.c-1776-\t}\n--\ndrivers/hid/wacom_wac.c=1780=static int wacom_tpc_mt_touch(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-1802-\t/* keep touch state for pen event */\ndrivers/hid/wacom_wac.c:1803:\twacom-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom);\ndrivers/hid/wacom_wac.c-1804-\n--\ndrivers/hid/wacom_wac.c=2976=static void wacom_wac_finger_report(struct hid_device *hdev,\n--\ndrivers/hid/wacom_wac.c-3002-\t/* keep touch state for pen event */\ndrivers/hid/wacom_wac.c:3003:\twacom_wac-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom_wac);\ndrivers/hid/wacom_wac.c-3004-}\n--\ndrivers/hid/wacom_wac.c=3155=static int wacom_bpt_touch(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-3196-\tinput_report_key(pad_input, BTN_RIGHT, (data[1] \u0026 0x01) != 0);\ndrivers/hid/wacom_wac.c:3197:\twacom-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom);\ndrivers/hid/wacom_wac.c-3198-\n--\ndrivers/hid/wacom_wac.c=3276=static int wacom_bpt3_touch(struct wacom_wac *wacom)\n--\ndrivers/hid/wacom_wac.c-3300-\t\tinput_mt_sync_frame(wacom-\u003etouch_input);\ndrivers/hid/wacom_wac.c:3301:\t\twacom-\u003eshared-\u003etouch_down = wacom_wac_finger_count_touches(wacom);\ndrivers/hid/wacom_wac.c-3302-\t}\n"
} |
| 31/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27170 output: 30 thoughts: 201 Thoughts: **Investigating the `wacom_wac_finger_count_touches` Function** Okay, so `wacom_wac_finger_count_touches` is getting called all over the place in these touch handlers. Right, let's figure out what's required for this to work correctly, configuration-wise. My initial hunch is that it's likely tied into the Wacom driver support. So, let's start with `drivers/hid/Kconfig`. Ah, here it is: `config HID_WACOM`. It depends on `USB_HID`, selects `POWER_SUPPLY`, `NEW_LEDS`, `LEDS_CLASS`, and `LEDS_TRIGGERS`. Seems reasonable. Now, what about `USB_HID`? Let's trace back from there. Okay, so `USB_HID` depends on `USB` and, going further down the rabbit hole, selects the base HID support. And `HID` depends on `INPUT`. Wait a minute, I need to make sure I haven't missed anything. I should check the dependencies of `HID` itself, just to be thorough. I'm going to look again in `drivers/hid/Kconfig` for the dependencies of the "HID support" menu. That's usually the best place to start. |
| 32/2 | 2026/10/18 13:06 | tool | grepper |
0mError:no matches Args: {
"Expression": "menu \"HID support\"",
"PathPrefixes": [
"drivers/hid/"
]
}Results: {
"error": "no matches"
} |
| 33/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27694 output: 32 thoughts: 15 Thoughts: Here's a summary of my thought process, as requested: **Navigating the HID Landscape** Alright, let's dive in. I need to understand the configuration options for Human Interface Device (HID) drivers within the kernel. First things first, I'm heading straight to the heart of the matter: `drivers/hid/Kconfig`. This is where the configuration decisions related to HID devices and their support are likely defined. I expect to find a comprehensive overview of the various HID-related features, driver options, and dependencies. I'm looking for the core Kconfig file to understand what elements are offered within the configuration of the HID subsystem, how they're exposed to the user, and if there are specific nuances I need to be aware of. I anticipate this file will dictate how the HID subsystem is compiled and linked into the kernel, and ultimately how I can tweak it for specific hardware or use cases. Let's see what we can find! |
| 34/2 | 2026/10/18 13:06 | tool | read-file |
0mArgs:{
"File": "drivers/hid/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# HID driver configuration\n 4:\t#\n 5:\tmenuconfig HID_SUPPORT\n 6:\t\tbool \"HID bus support\"\n 7:\t\tdefault y\n 8:\t\tdepends on INPUT\n 9:\t\thelp\n 10:\t\t This option adds core support for human interface device (HID).\n 11:\t\t You will also need drivers from the following menu to make use of it.\n 12:\t\n 13:\tif HID_SUPPORT\n 14:\t\n 15:\tconfig HID\n 16:\t\ttristate \"HID bus core support\"\n 17:\t\tdefault y\n 18:\t\tdepends on INPUT\n 19:\t\thelp\n 20:\t\t A human interface device (HID) is a type of computer device that\n 21:\t\t interacts directly with and takes input from humans. The term \"HID\"\n 22:\t\t most commonly used to refer to the USB-HID specification, but other\n 23:\t\t devices (such as, but not strictly limited to, Bluetooth) are\n 24:\t\t designed using HID specification (this involves certain keyboards,\n 25:\t\t mice, tablets, etc). This option adds the HID bus to the kernel,\n 26:\t\t together with generic HID layer code. The HID devices are added and\n 27:\t\t removed from the HID bus by the transport-layer drivers, such as\n 28:\t\t usbhid (USB_HID) and hidp (BT_HIDP).\n 29:\t\n 30:\t\t For docs and specs, see https://www.usb.org/developers/hidpage/\n 31:\t\n 32:\t\t If unsure, say Y.\n 33:\t\n 34:\tif HID\n 35:\t\n 36:\tconfig HID_BATTERY_STRENGTH\n 37:\t\tbool \"Battery level reporting for HID devices\"\n 38:\t\tselect POWER_SUPPLY\n 39:\t\tdefault n\n 40:\t\thelp\n"
} |
| 35/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 28460 output: 41 thoughts: 132 Thoughts: **My Configuration Checklist** Okay, let's break this down. To get `HID_WACOM` compiled, I know I need that, obviously. But `HID_WACOM` has dependencies, specifically `USB_HID`. And `USB_HID` in turn leans on `USB` and `HID`, which is all contingent on `HID_SUPPORT`, and ultimately `INPUT`. So, to be explicit, the core configs I'm dealing with are `HID_WACOM`, `USB_HID`, and `HID`. Now, the question is, what's the minimal set? Typically, `HID_WACOM` is the main one, and I'll enable `USB_HID` and `HID` if they're not already set by default. But I should double-check for any potential gotchas. I need to make sure I haven't missed any other dependencies. Alright, a quick scan is in order. Let me examine `wacom_wac.c` itself. Are there any `#ifdef`s in there that I'm overlooking? This is where the real nuance often lies. Let's see if there are any other configs that require attention. |
| 36/2 | 2026/10/18 13:06 | tool | grepper |
0mError:no matches Args: {
"Expression": "^#ifdef|^#if IS_ENABLED",
"PathPrefixes": [
"drivers/hid/wacom_wac.c"
]
}Results: {
"error": "no matches"
} |
| 37/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 28898 output: 38 thoughts: 31 Thoughts: Here's my take on the thought process, tailored for an expert audience and written in the first person: **Navigating Wacom Driver Code** Alright, no `#ifdef`s in `wacom_wac.c`! Good, that simplifies things, at least initially. My first instinct, given this context, is to immediately check the header file, specifically `drivers/hid/wacom.h`. That's where I'd expect to find the core data structures, any potential version or feature flags (even if they're not `#ifdef`s in the main source), and any important constants related to the Wacom protocol that are used by this specific driver. It's the logical place to start mapping the internal structures and dependencies. Let's see what we've got in there. |
| 38/2 | 2026/10/18 13:06 | tool | grepper |
0mError:no matches Args: {
"Expression": "^#ifdef|^#if IS_ENABLED",
"PathPrefixes": [
"drivers/hid/wacom.h"
]
}Results: {
"error": "no matches"
} |
| 39/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29151 output: 40 thoughts: 16 Thoughts: Here's my take on the thought process: **Diving into the Wacom System Driver** Okay, so I need to get to the bottom of this. Let's start with a look at the code. The obvious place to begin is the `drivers/hid/wacom_sys.c` file. This seems like the logical starting point for understanding how the Wacom system driver is handling things. Let's see what's going on in there and see if we can find the root cause of the issue. |
| 40/2 | 2026/10/18 13:06 | tool | grepper |
0mError:no matches Args: {
"Expression": "^#ifdef|^#if IS_ENABLED",
"PathPrefixes": [
"drivers/hid/wacom_sys.c"
]
}Results: {
"error": "no matches"
} |
| 41/2 | 2026/10/18 13:06 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29373 output: 347 thoughts: 1246 Thoughts: **Analysis of the HID-WACOM Driver Changes** Okay, first things first, no preprocessor shenanigans with `#ifdef` in `wacom_sys.c`, good. Now, let's look at the `Makefile` in `drivers/hid/`. Yep, as I expected, `obj-$(CONFIG_HID_WACOM) += wacom.o`, which means only `CONFIG_HID_WACOM` compiles `wacom.o`. And, of course, `CONFIG_HID_WACOM` depends on `USB_HID`. Solid. Now, focusing on the core task, which symbols are relevant as FocusSymbols? Let's refresh our memory on the instructions for Section 4: we need functions that specifically implement the *logic being added or altered*, or direct *API entrypoints* for the feature under review. And we want to avoid those ubiquitous lifecycle functions. Got it. Looking at the code, these functions in `drivers/hid/wacom_wac.c` are what's been touched: - `wacom_penpartner_irq` - `wacom_pl_irq` - `wacom_ptu_irq` - `wacom_dtu_irq` - `wacom_dtus_irq` - `wacom_graphire_irq` - `wacom_intuos_pad` - `wacom_intuos_bt_irq` - `wacom_wac_finger_count_touches` - `wacom_intuos_pro2_bt_touch` - `wacom_24hdt_irq` - `wacom_bpt_touch` - `wacom_bpt3_touch_msg` - `wacom_bpt3_button_msg` - `wacom_bamboo_pad_touch_event` - `wacom_report_numbered_buttons` The entrypoint is `wacom_wac_irq`, which dispatches to those functions. And `wacom_raw_event` which is in `wacom_sys.c` calls `wacom_wac_irq`. None of them are generic or used everywhere – they're all specific to the `hid-wacom` driver. Good, we're on the right track. Can we list the modified functions? Absolutely. - `wacom_penpartner_irq` - `wacom_pl_irq` - `wacom_ptu_irq` - `wacom_dtu_irq` - `wacom_dtus_irq` - `wacom_graphire_irq` - `wacom_intuos_pad` - `wacom_intuos_bt_irq` - `wacom_wac_finger_count_touches` - `wacom_intuos_pro2_bt_touch` - `wacom_24hdt_irq` - `wacom_bpt_touch` - `wacom_bpt3_touch_msg` - `wacom_bpt3_button_msg` - `wacom_bamboo_pad_touch_event` - `wacom_report_numbered_buttons` - `wacom_wac_irq` - `wacom_raw_event` Wait, let me double-check something. Let's make sure I'm not missing anything. I need to make sure all of the functions affected by this patch are in `drivers/hid/wacom_wac.c`, just to be certain. Let me verify the listing again: - `wacom_penpartner_irq` - `wacom_pl_irq` - `wacom_ptu_irq` - `wacom_dtu_irq` - `wacom_dtus_irq` - `wacom_graphire_irq` - `wacom_intuos_pad` - `wacom_intuos_bt_irq` - `wacom_wac_finger_count_touches` - `wacom_intuos_pro2_bt_touch` - `wacom_24hdt_irq` - `wacom_bpt_touch` - `wacom_bpt3_touch_msg` - `wacom_bpt3_button_msg` - `wacom_bamboo_pad_touch_event` - `wacom_report_numbered_buttons` Ah, yes, they all are |
| 42/2 | 2026/10/18 13:07 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"HID_WACOM",
"USB_HID",
"HID"
],
"FocusSymbols": [
"wacom_penpartner_irq",
"wacom_pl_irq",
"wacom_ptu_irq",
"wacom_dtu_irq",
"wacom_dtus_irq",
"wacom_graphire_irq",
"wacom_intuos_pad",
"wacom_intuos_bt_irq",
"wacom_wac_finger_count_touches",
"wacom_intuos_pro2_bt_touch",
"wacom_24hdt_irq",
"wacom_bpt_touch",
"wacom_bpt3_touch_msg",
"wacom_bpt3_button_msg",
"wacom_bamboo_pad_touch_event",
"wacom_report_numbered_buttons",
"wacom_wac_irq"
],
"Reasoning": "The patch adds defensive NULL pointer checks and dev_warn_once/pr_warn_once assertions across multiple report/event handling functions in the Wacom HID driver (drivers/hid/wacom_wac.c) to prevent dereferencing unallocated or unconfigured pen, pad, and touch input devices. The HID driver is reachable in virtualized QEMU environments via USB raw gadget or /dev/uhid emulation, so fuzzing this modified report handling logic is worthwhile.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"HID_WACOM",
"USB_HID",
"HID"
],
"FocusSymbols": [
"wacom_penpartner_irq",
"wacom_pl_irq",
"wacom_ptu_irq",
"wacom_dtu_irq",
"wacom_dtus_irq",
"wacom_graphire_irq",
"wacom_intuos_pad",
"wacom_intuos_bt_irq",
"wacom_wac_finger_count_touches",
"wacom_intuos_pro2_bt_touch",
"wacom_24hdt_irq",
"wacom_bpt_touch",
"wacom_bpt3_touch_msg",
"wacom_bpt3_button_msg",
"wacom_bamboo_pad_touch_event",
"wacom_report_numbered_buttons",
"wacom_wac_irq"
],
"Reasoning": "The patch adds defensive NULL pointer checks and dev_warn_once/pr_warn_once assertions across multiple report/event handling functions in the Wacom HID driver (drivers/hid/wacom_wac.c) to prevent dereferencing unallocated or unconfigured pen, pad, and touch input devices. The HID driver is reachable in virtualized QEMU environments via USB raw gadget or /dev/uhid emulation, so fuzzing this modified report handling logic is worthwhile.",
"WorthFuzzing": true
} |
| 43/1 | 2026/10/18 13:07 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 44/2 | 2026/10/18 13:07 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch adds NULL pointer checks for various input device pointers (pen_input, pad_input, touch_input) in several IRQ and event handlers in drivers/hid/wacom_wac.c to prevent NULL pointer dereference crashes when certain input devices are not initialized/registered.\n\nThese changes address NULL pointer dereference bugs, which are caught by standard kernel fault handling and generic debugging builds. The patch does not introduce or modify any memory allocations, data copying to user space, variable initializations, or buffer length calculations that could expose uninitialized memory. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit 2656c0fb9b853c4354ceb4138b9594e207bbacef
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Oct 18 13:05:22 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
index c4cd87b781c45..e3fff2471d431 100644
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -128,6 +128,12 @@ static int wacom_penpartner_irq(struct wacom_wac *wacom)
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
switch (data[0]) {
case 1:
if (data[5] & 0x80) {
@@ -174,6 +180,12 @@ static int wacom_pl_irq(struct wacom_wac *wacom)
struct input_dev *input = wacom->pen_input;
int prox, pressure;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
if (data[0] != WACOM_REPORT_PENABLED) {
dev_dbg(input->dev.parent,
"%s: received unknown report #%d\n", __func__, data[0]);
@@ -233,6 +245,12 @@ static int wacom_ptu_irq(struct wacom_wac *wacom)
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
if (data[0] != WACOM_REPORT_PENABLED) {
dev_dbg(input->dev.parent,
"%s: received unknown report #%d\n", __func__, data[0]);
@@ -263,6 +281,12 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)
struct input_dev *input = wacom->pen_input;
int prox = data[1] & 0x20;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pen_input is NULL\n", __func__);
+ return 0;
+ }
+
dev_dbg(input->dev.parent,
"%s: received report #%d", __func__, data[0]);
@@ -289,16 +313,26 @@ static int wacom_dtu_irq(struct wacom_wac *wacom)
static int wacom_dtus_irq(struct wacom_wac *wacom)
{
+ struct wacom_features *features = &wacom->features;
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
unsigned short prox, pressure = 0;
+ if (!input || (!wacom->pad_input && features->type != DTUSX)) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: missing input device(s)\n",
+ __func__);
+ return 0;
+ }
+
if (data[0] != WACOM_REPORT_DTUS && data[0] != WACOM_REPORT_DTUSPAD) {
dev_dbg(input->dev.parent,
"%s: received unknown report #%d", __func__, data[0]);
return 0;
} else if (data[0] == WACOM_REPORT_DTUSPAD) {
input = wacom->pad_input;
+ if (!input)
+ return 0;
input_report_key(input, BTN_0, (data[1] & 0x01));
input_report_key(input, BTN_1, (data[1] & 0x02));
input_report_key(input, BTN_2, (data[1] & 0x04));
@@ -349,6 +383,12 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
int rw = 0;
int retval = 0;
+ if (!input || (!pad_input && features->type != GRAPHIRE)) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: missing input device(s)\n", __func__);
+ return 0;
+ }
+
if (features->type == GRAPHIRE_BT) {
if (data[0] != WACOM_REPORT_PENABLED_BT) {
dev_dbg(input->dev.parent,
@@ -541,6 +581,12 @@ static int wacom_intuos_pad(struct wacom_wac *wacom)
data[0] == WACOM_REPORT_CINTIQPAD))
return 0;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pad_input is NULL\n", __func__);
+ return 1; /* consume the report to prevent fall-through */
+ }
+
if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
buttons = (data[3] << 1) | (data[2] & 0x01);
ring1 = data[1];
@@ -1217,6 +1263,13 @@ static int wacom_intuos_bt_irq(struct wacom_wac *wacom, size_t len)
int i = 1;
unsigned power_raw, battery_capacity, bat_charging, ps_connected;
+ if (!wacom->pen_input || !wacom->pad_input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: expected pen and pad input devices\n",
+ __func__);
+ return 0;
+ }
+
switch (data[0]) {
case 0x04:
if (len < 32) {
@@ -1263,6 +1316,12 @@ static int wacom_wac_finger_count_touches(struct wacom_wac *wacom)
int count = 0;
int i;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return 0;
+ }
+
if (!touch_max)
return 0;
@@ -1424,6 +1483,12 @@ static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom)
int num_contacts_left = 5;
int i, j;
+ if (!touch_input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return;
+ }
+
for (i = 0; i < finger_frames; i++) {
unsigned char *frame = &data[i*finger_frame_len + 109];
int current_num_contacts = frame[0] & 0x7F;
@@ -1595,6 +1660,12 @@ static int wacom_24hdt_irq(struct wacom_wac *wacom)
int byte_per_packet = WACOM_BYTES_PER_24HDT_PACKET;
int y_offset = 2;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return 0;
+ }
+
if (touch_is_muted(wacom) && !wacom->shared->touch_down)
return 0;
@@ -3092,6 +3163,12 @@ static int wacom_bpt_touch(struct wacom_wac *wacom)
if (data[0] != 0x02)
return 0;
+ if (!input || !pad_input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: input is NULL\n", __func__);
+ return 0;
+ }
+
for (i = 0; i < 2; i++) {
int offset = (data[1] & 0x80) ? (8 * i) : (9 * i);
bool touch = report_touch_events(wacom)
@@ -3126,8 +3203,17 @@ static void wacom_bpt3_touch_msg(struct wacom_wac *wacom, unsigned char *data)
{
struct wacom_features *features = &wacom->features;
struct input_dev *input = wacom->touch_input;
- bool touch = data[1] & 0x80;
- int slot = input_mt_get_slot_by_key(input, data[0]);
+ bool touch;
+ int slot;
+
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return;
+ }
+
+ touch = data[1] & 0x80;
+ slot = input_mt_get_slot_by_key(input, data[0]);
if (slot < 0)
return;
@@ -3170,6 +3256,12 @@ static void wacom_bpt3_button_msg(struct wacom_wac *wacom, unsigned char *data)
struct input_dev *input = wacom->pad_input;
struct wacom_features *features = &wacom->features;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: pad_input is NULL\n", __func__);
+ return;
+ }
+
if (features->type == INTUOSHT || features->type == INTUOSHT2) {
input_report_key(input, BTN_LEFT, (data[1] & 0x02) != 0);
input_report_key(input, BTN_BACK, (data[1] & 0x08) != 0);
@@ -3338,6 +3430,12 @@ static int wacom_bamboo_pad_touch_event(struct wacom_wac *wacom,
int x, y;
bool valid;
+ if (!input) {
+ dev_warn_once(&container_of(wacom, struct wacom, wacom_wac)->hdev->dev,
+ "%s: touch_input is NULL\n", __func__);
+ return 0;
+ }
+
prefix = data[0];
for (id = 0; id < wacom->features.touch_max; id++) {
@@ -4226,9 +4324,16 @@ static void wacom_update_led(struct wacom *wacom, int button_count, int mask,
static void wacom_report_numbered_buttons(struct input_dev *input_dev,
int button_count, int mask)
{
- struct wacom *wacom = input_get_drvdata(input_dev);
+ struct wacom *wacom;
int i;
+ if (!input_dev) {
+ pr_warn_once("%s: input_dev is NULL\n", __func__);
+ return;
+ }
+
+ wacom = input_get_drvdata(input_dev);
+
for (i = 0; i < wacom->led.count; i++)
wacom_update_led(wacom, button_count, mask, i);
|
| 45/3 | 2026/10/18 13:07 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5466 output: 154 thoughts: 1015 Thoughts: **KMSAN Analysis of Wacom Driver Patch** Alright, let's dive into this patch and determine if we need a dedicated KMSAN session. My initial thought is that this looks pretty straightforward. It's touching `drivers/hid/wacom_wac.c`, and the core of the change seems to be adding NULL checks – specifically for `input`, `wacom->pen_input`, `wacom->pad_input`, `wacom->touch_input`, and similar pointers within several IRQ handlers and helper functions. We're talking about guards against potential NULL-pointer dereferences here. Looking deeper, the patch implements checks in functions such as `wacom_penpartner_irq`, `wacom_pl_irq`, `wacom_ptu_irq`, all the way to `wacom_report_numbered_buttons`. It seems like these checks are aimed at handling scenarios where input devices, like pens, pads, or touch interfaces, might not have been properly allocated or registered, perhaps due to a malformed HID report descriptor or a misconfigured device. Standard stuff, really. Now, considering KMSAN's purpose – looking for reads of uninitialized memory and potential kernel-to-user memory leaks – this patch doesn't seem to trigger any of the red flags. Let me go through my mental checklist: Does this introduce or modify kernel structures that are then sent to user space? No. Does it introduce conditional logic or branching that relies on uninitialized variables? Nope, the checks are against pointers that are either within the `wacom_wac` struct or passed as arguments to the function. How about the allocation or initialization of complex data structures? Again, no. And finally, does it modify bounds checks or lengths in a way that might lead to uninitialized bytes being accessed? No, it's all about NULL checks. In essence, this patch *prevents* NULL pointer dereferences. And these are the kinds of bugs that are routinely caught by standard bug detectors, or at the very least, by KASAN when we have standard kernel oops handling. It's not trying to expose uninitialized memory, it's trying to protect us from errors! Given that, I don't see any KMSAN risks here. The patch doesn't mess with memory initialization, it's not reading or leaking uninitialized memory, it's not copying any uninitialized data to userspace, and it's not changing how buffer lengths or bounds are calculated. No need for special treatment. Let me make this clear in my KMSANReasoning: The patch adds NULL checks for `pen_input`, `pad_input`, and `touch_input` pointers across various IRQ handlers in `drivers/hid/wacom_wac.c` to *prevent* NULL pointer dereferences. These kinds of issues are caught by standard exception handling and KASAN in the standard way. This patch doesn't do anything that KMSAN is particularly good at detecting: No initialization issues, no uninitialized memory leaks, nothing sent to userspace, and no buffer issues. Alright, double-checking the tool guidelines, I'm good. `NeedsKMSAN` is false. The reasoning is solid. Let's set it. |
| 46/3 | 2026/10/18 13:07 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch adds NULL pointer checks for various input device pointers (pen_input, pad_input, touch_input) in several IRQ and event handlers in drivers/hid/wacom_wac.c to prevent NULL pointer dereference crashes when certain input devices are not initialized/registered.\n\nThese changes address NULL pointer dereference bugs, which are caught by standard kernel fault handling and generic debugging builds. The patch does not introduce or modify any memory allocations, data copying to user space, variable initializations, or buffer length calculations that could expose uninitialized memory. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch adds NULL pointer checks for various input device pointers (pen_input, pad_input, touch_input) in several IRQ and event handlers in drivers/hid/wacom_wac.c to prevent NULL pointer dereference crashes when certain input devices are not initialized/registered.\n\nThese changes address NULL pointer dereference bugs, which are caught by standard kernel fault handling and generic debugging builds. The patch does not introduce or modify any memory allocations, data copying to user space, variable initializations, or buffer length calculations that could expose uninitialized memory. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|