| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/12 07:51 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies iio_read_acpi_mount_matrix() in drivers/iio/industrialio-acpi.c to parse comma-separated values in ACPI mount matrix strings. This helper is only called during the probe phase of specific physical I2C/SPI accelerometer and IMU drivers (BMC150, KXCJK-1013, MXC4005, BMI323, and ST LSM6DSx) when a device has an associated ACPI handle defining a ROTM method. These hardware devices and their vendor-specific ACPI tables are not present or emulated in standard virtualized test environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/12 07:51 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 2cbd8f9e5f09a3110a4f90a240314d7b4b925c89\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Mon Oct 12 07:51:31 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/iio/industrialio-acpi.c b/drivers/iio/industrialio-acpi.c\nindex d67a438437998..c77926f6db621 100644\n--- a/drivers/iio/industrialio-acpi.c\n+++ b/drivers/iio/industrialio-acpi.c\n@@ -6,6 +6,7 @@\n #include \u003clinux/export.h\u003e\n #include \u003clinux/iio/iio.h\u003e\n #include \u003clinux/sprintf.h\u003e\n+#include \u003clinux/string.h\u003e\n \n /**\n * iio_read_acpi_mount_matrix() - Read accelerometer mount matrix info from ACPI\n@@ -63,6 +64,14 @@ bool iio_read_acpi_mount_matrix(struct device *dev,\n \t\t}\n \n \t\tstr = elements[i].string.pointer;\n+\t\t/*\n+\t\t * Microsoft's example separates the values with spaces, \"0 1 0\".\n+\t\t * Some BIOSes use commas instead, with or without spaces around\n+\t\t * them: \"0, 1, 0\", \"0, -1 , 0\", \"1, 0,0\". The string lives in\n+\t\t * the buffer allocated for us above, so turn the commas into\n+\t\t * spaces in place before parsing.\n+\t\t */\n+\t\tstrreplace(str, ',', ' ');\n \t\tif (sscanf(str, \"%d %d %d\", \u0026val[0], \u0026val[1], \u0026val[2]) != 3) {\n \t\t\tdev_err(dev, \"Incorrect ACPI mount matrix string format\\n\");\n \t\t\tgoto out_free_buffer;\n"
} |
| 2/1 | 2026/10/12 07:51 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies iio_read_acpi_mount_matrix() in drivers/iio/industrialio-acpi.c to parse comma-separated values in ACPI mount matrix strings. This helper is only called during the probe phase of specific physical I2C/SPI accelerometer and IMU drivers (BMC150, KXCJK-1013, MXC4005, BMI323, and ST LSM6DSx) when a device has an associated ACPI handle defining a ROTM method. These hardware devices and their vendor-specific ACPI tables are not present or emulated in standard virtualized test environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
}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 2cbd8f9e5f09a3110a4f90a240314d7b4b925c89
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Oct 12 07:51:31 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/iio/industrialio-acpi.c b/drivers/iio/industrialio-acpi.c
index d67a438437998..c77926f6db621 100644
--- a/drivers/iio/industrialio-acpi.c
+++ b/drivers/iio/industrialio-acpi.c
@@ -6,6 +6,7 @@
#include <linux/export.h>
#include <linux/iio/iio.h>
#include <linux/sprintf.h>
+#include <linux/string.h>
/**
* iio_read_acpi_mount_matrix() - Read accelerometer mount matrix info from ACPI
@@ -63,6 +64,14 @@ bool iio_read_acpi_mount_matrix(struct device *dev,
}
str = elements[i].string.pointer;
+ /*
+ * Microsoft's example separates the values with spaces, "0 1 0".
+ * Some BIOSes use commas instead, with or without spaces around
+ * them: "0, 1, 0", "0, -1 , 0", "1, 0,0". The string lives in
+ * the buffer allocated for us above, so turn the commas into
+ * spaces in place before parsing.
+ */
+ strreplace(str, ',', ' ');
if (sscanf(str, "%d %d %d", &val[0], &val[1], &val[2]) != 3) {
dev_err(dev, "Incorrect ACPI mount matrix string format\n");
goto out_free_buffer;
|
| 3/2 | 2026/10/12 07:51 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3222 output: 63 thoughts: 268 Thoughts: **Analyzing the Industrial I/O ACPI Patch** Okay, so the user wants me to evaluate this patch series, specifically focusing on commit `2cbd8f9e5f09a3110a4f90a240314d7b4b925c89` targeting amd64. My initial reaction is to dive right in. This patch modifies `drivers/iio/industrialio-acpi.c`, and the key function changed is `iio_read_acpi_mount_matrix`. It looks like the core modification is the addition of `strreplace(str, ',', ' ');`. Now, the comment explains the rationale: apparently, the format for these mount matrices in ACPI tables isn't standardized, with variations using spaces or commas (with or without surrounding spaces). This patch smartly addresses the potential format variance by converting commas to spaces *in-place* within the provided buffer before parsing. This is a good defensive programming approach, attempting to improve robustness. My next step is to get the full context. I need to understand how `iio_read_acpi_mount_matrix` is used within the driver and what other parts of the system interact with it. I'll need to figure out the callers and the overall flow. I'll reach for `grepper` (or `read-file` and a good regex) to get that information quickly. I want to see how this function's output is consumed and whether these different delimiters are causing any real-world problems. I'll also check the surrounding code for potential edge cases or unforeseen consequences related to this change. My initial impression is positive - the fix is elegantly implemented and addresses a real-world inconsistency. But, as always, thorough investigation is key before I give a final assessment. |
| 4/2 | 2026/10/12 07:51 | tool | read-file |
0mArgs:{
"File": "drivers/iio/industrialio-acpi.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0-only\n 2:\t/* IIO ACPI helper functions */\n 3:\t\n 4:\t#include \u003clinux/acpi.h\u003e\n 5:\t#include \u003clinux/device.h\u003e\n 6:\t#include \u003clinux/export.h\u003e\n 7:\t#include \u003clinux/iio/iio.h\u003e\n 8:\t#include \u003clinux/sprintf.h\u003e\n 9:\t#include \u003clinux/string.h\u003e\n 10:\t\n 11:\t/**\n 12:\t * iio_read_acpi_mount_matrix() - Read accelerometer mount matrix info from ACPI\n 13:\t * @dev:\t\tDevice structure\n 14:\t * @orientation:\tiio_mount_matrix struct to fill\n 15:\t * @acpi_method:\tACPI method name to read the matrix from, usually \"ROTM\"\n 16:\t *\n 17:\t * Try to read the mount-matrix by calling the specified method on the device's\n 18:\t * ACPI firmware-node. If the device has no ACPI firmware-node; or the method\n 19:\t * does not exist then this will fail silently. This expects the method to\n 20:\t * return data in the ACPI \"ROTM\" format defined by Microsoft:\n 21:\t * https://learn.microsoft.com/en-us/windows-hardware/drivers/sensors/sensors-acpi-entries\n 22:\t * This is a Microsoft extension and not part of the official ACPI spec.\n 23:\t * The method name is configurable because some dual-accel setups define 2 mount\n 24:\t * matrices in a single ACPI device using separate \"ROMK\" and \"ROMS\" methods.\n 25:\t *\n 26:\t * Returns: true if the matrix was successfully, false otherwise.\n 27:\t */\n 28:\tbool iio_read_acpi_mount_matrix(struct device *dev,\n 29:\t\t\t\t\tstruct iio_mount_matrix *orientation,\n 30:\t\t\t\t\tchar *acpi_method)\n 31:\t{\n 32:\t\tstruct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };\n 33:\t\tchar *str;\n 34:\t\tunion acpi_object *obj, *elements;\n 35:\t\tacpi_handle handle;\n 36:\t\tacpi_status status;\n 37:\t\tint i, j, val[3];\n 38:\t\tbool ret = false;\n 39:\t\n 40:\t\thandle = ACPI_HANDLE(dev);\n 41:\t\tif (!handle)\n 42:\t\t\treturn false;\n 43:\t\n 44:\t\tif (!acpi_has_method(handle, acpi_method))\n 45:\t\t\treturn false;\n 46:\t\n 47:\t\tstatus = acpi_evaluate_object(handle, acpi_method, NULL, \u0026buffer);\n 48:\t\tif (ACPI_FAILURE(status)) {\n 49:\t\t\tdev_err(dev, \"Failed to get ACPI mount matrix: %d\\n\", status);\n 50:\t\t\treturn false;\n 51:\t\t}\n 52:\t\n 53:\t\tobj = buffer.pointer;\n 54:\t\tif (obj-\u003etype != ACPI_TYPE_PACKAGE || obj-\u003epackage.count != 3) {\n 55:\t\t\tdev_err(dev, \"Unknown ACPI mount matrix package format\\n\");\n 56:\t\t\tgoto out_free_buffer;\n 57:\t\t}\n 58:\t\n 59:\t\telements = obj-\u003epackage.elements;\n 60:\t\tfor (i = 0; i \u003c 3; i++) {\n 61:\t\t\tif (elements[i].type != ACPI_TYPE_STRING) {\n 62:\t\t\t\tdev_err(dev, \"Unknown ACPI mount matrix element format\\n\");\n 63:\t\t\t\tgoto out_free_buffer;\n 64:\t\t\t}\n 65:\t\n 66:\t\t\tstr = elements[i].string.pointer;\n 67:\t\t\t/*\n 68:\t\t\t * Microsoft's example separates the values with spaces, \"0 1 0\".\n 69:\t\t\t * Some BIOSes use commas instead, with or without spaces around\n 70:\t\t\t * them: \"0, 1, 0\", \"0, -1 , 0\", \"1, 0,0\". The string lives in\n 71:\t\t\t * the buffer allocated for us above, so turn the commas into\n 72:\t\t\t * spaces in place before parsing.\n 73:\t\t\t */\n 74:\t\t\tstrreplace(str, ',', ' ');\n 75:\t\t\tif (sscanf(str, \"%d %d %d\", \u0026val[0], \u0026val[1], \u0026val[2]) != 3) {\n 76:\t\t\t\tdev_err(dev, \"Incorrect ACPI mount matrix string format\\n\");\n 77:\t\t\t\tgoto out_free_buffer;\n 78:\t\t\t}\n 79:\t\n 80:\t\t\tfor (j = 0; j \u003c 3; j++) {\n"
} |
| 5/2 | 2026/10/12 07:51 | tool | grepper |
0mArgs:{
"Expression": "iio_read_acpi_mount_matrix"
}Results: {
"Output": "drivers/iio/accel/bmc150-accel-core.c=380=static bool bmc150_apply_bosc0200_acpi_orientation(struct device *dev,\n--\ndrivers/iio/accel/bmc150-accel-core.c-403-\ndrivers/iio/accel/bmc150-accel-core.c:404:\treturn iio_read_acpi_mount_matrix(dev, orientation, name);\ndrivers/iio/accel/bmc150-accel-core.c-405-}\n--\ndrivers/iio/accel/kxcjk-1013.c=1382=static int kxcjk1013_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/kxcjk-1013.c-1407-\ndrivers/iio/accel/kxcjk-1013.c:1408:\t\tif (!iio_read_acpi_mount_matrix(\u0026client-\u003edev, \u0026data-\u003eorientation, \"ROTM\")) {\ndrivers/iio/accel/kxcjk-1013.c-1409-\t\t\tret = iio_read_mount_matrix(\u0026client-\u003edev, \u0026data-\u003eorientation);\n--\ndrivers/iio/accel/mxc4005.c=427=static int mxc4005_probe(struct i2c_client *client)\n--\ndrivers/iio/accel/mxc4005.c-456-\ndrivers/iio/accel/mxc4005.c:457:\tif (!iio_read_acpi_mount_matrix(\u0026client-\u003edev, \u0026data-\u003eorientation, \"ROTM\")) {\ndrivers/iio/accel/mxc4005.c-458-\t\tret = iio_read_mount_matrix(\u0026client-\u003edev, \u0026data-\u003eorientation);\n--\ndrivers/iio/imu/bmi323/bmi323_core.c=2100=int bmi323_core_probe(struct device *dev)\n--\ndrivers/iio/imu/bmi323/bmi323_core.c-2135-\ndrivers/iio/imu/bmi323/bmi323_core.c:2136:\tif (!iio_read_acpi_mount_matrix(dev, \u0026data-\u003eorientation, \"ROTM\")) {\ndrivers/iio/imu/bmi323/bmi323_core.c-2137-\t\tret = iio_read_mount_matrix(dev, \u0026data-\u003eorientation);\n--\ndrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c=2917=int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id,\n--\ndrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c-2995-\ndrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c:2996:\tif (!iio_read_acpi_mount_matrix(hw-\u003edev, \u0026hw-\u003eorientation, \"ROTM\")) {\ndrivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c-2997-\t\terr = iio_read_mount_matrix(hw-\u003edev, \u0026hw-\u003eorientation);\n--\ndrivers/iio/industrialio-acpi.c-11-/**\ndrivers/iio/industrialio-acpi.c:12: * iio_read_acpi_mount_matrix() - Read accelerometer mount matrix info from ACPI\ndrivers/iio/industrialio-acpi.c-13- * @dev:\t\tDevice structure\n--\ndrivers/iio/industrialio-acpi.c-27- */\ndrivers/iio/industrialio-acpi.c:28:bool iio_read_acpi_mount_matrix(struct device *dev,\ndrivers/iio/industrialio-acpi.c-29-\t\t\t\tstruct iio_mount_matrix *orientation,\n--\ndrivers/iio/industrialio-acpi.c-98-}\ndrivers/iio/industrialio-acpi.c:99:EXPORT_SYMBOL_GPL(iio_read_acpi_mount_matrix);\ndrivers/iio/industrialio-acpi.c-100-\n--\ninclude/linux/iio/iio.h=1032=int iio_device_resume_triggering(struct iio_dev *indio_dev);\n--\ninclude/linux/iio/iio.h-1034-#ifdef CONFIG_ACPI\ninclude/linux/iio/iio.h:1035:bool iio_read_acpi_mount_matrix(struct device *dev,\ninclude/linux/iio/iio.h-1036-\t\t\t\tstruct iio_mount_matrix *orientation,\n--\ninclude/linux/iio/iio.h=1038=const char *iio_get_acpi_device_name_and_data(struct device *dev, const void **data);\ninclude/linux/iio/iio.h-1039-#else\ninclude/linux/iio/iio.h:1040:static inline bool iio_read_acpi_mount_matrix(struct device *dev,\ninclude/linux/iio/iio.h-1041-\t\t\t\t\t struct iio_mount_matrix *orientation,\n"
} |
| 6/2 | 2026/10/12 07:51 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6606 output: 47 thoughts: 1385 Thoughts: **Analyzing Reachability of `iio_read_acpi_mount_matrix`** Okay, so I'm digging into `iio_read_acpi_mount_matrix`. The first thing I did was identify its callers, and it turns out they are all probe functions within I2C or SPI accelerometer/IMU drivers: `bmc150_apply_bosc0200_acpi_orientation`, `kxcjk1013_probe`, `mxc4005_probe`, `bmi323_core_probe`, and `st_lsm6dsx_probe`. Interesting – this function appears to be intimately tied to sensor initialization. Now, what does the function actually *do*? It's calling `ACPI_HANDLE(dev)`, checking for an ACPI method (likely "ROTM"), and evaluating this method to parse an ACPI package returned by the BIOS. So, it's reading orientation data from the firmware, which is key to how the sensor reports data. The big question now is reachability. Can this code be triggered by syzkaller or even in a standard QEMU environment? Let's break it down: 1. **Physical Hardware:** Are these *specific* I2C sensors emulated in QEMU or GCE? Probably not, given my knowledge of their emulated hardware. QEMU doesn't typically simulate the ACPI tables of these particular devices with ROTM methods. That's a huge blocker. 2. **Userspace Instantiation:** Okay, what about instantiating I2C devices from userspace, via `/sys/bus/i2c/devices/i2c-X/new_device`? Even if that *did* work, the device instantiated through sysfs wouldn't have an ACPI handle. `ACPI_HANDLE(dev)` would return NULL, so it wouldn't even *attempt* to call `iio_read_acpi_mount_matrix`. This path is likely a dead end. 3. **ACPI Table Loading:** Could we load a custom ACPI SSDT table at runtime, perhaps using `CONFIG_ACPI_TABLE_UPGRADE` or `configfs/acpi/table`? That *might* work, *if* the ACPI table included an I2C device with the requisite ROTM method. But... does syzkaller even *fuzz* ACPI table loading? Is that part of its standard workflow? Does the ACPI configfs feature get used in syzkaller? I need to check. Okay, let's step back and remember the *core triage philosophy*. The patch fuzzing goal is to find crashes, regressions, exposed latent bugs, and newly triggered assertions, but reachability is *the* primary gate! If the modified code is structurally unreachable in standard virtualized environments, it's a no-go for fuzzing. This code falls under "structurally unreachable hardware" – specific I2C sensors and ACPI firmware. Since I am a expert, I am going to remind myself of the core principles: * Non-kernel and non-executable changes * Structurally unreachable hardware * Unreachable execution paths So, given these guidelines, this seems very unlikely to be reachable. To be extra thorough, let me grep the entire repo for `iio_read_acpi_mount_matrix` just to double check that there aren't *any* other calls, or maybe some sort of mocking driver that might be relevant. It's the same ones I already found: `bmc150-accel-core.c`, `kxcjk-1013.c`, `mxc4005.c`, `bmi323_core.c`, and `st_lsm6dsx_core.c`. Looks like it is just these guys. Looks like I'll have to investigate each of these callers! Time to inspect `bmc150-accel-core.c`. |
| 7/2 | 2026/10/12 07:51 | tool | read-file |
0mArgs:{
"File": "drivers/iio/accel/bmc150-accel-core.c",
"FirstLine": 380,
"LineCount": 35
}Results: {
"Contents": " 380:\tstatic bool bmc150_apply_bosc0200_acpi_orientation(struct device *dev,\n 381:\t\t\t\t\t\t\t struct iio_mount_matrix *orientation)\n 382:\t{\n 383:\t\tstruct iio_dev *indio_dev = dev_get_drvdata(dev);\n 384:\t\tacpi_handle handle = ACPI_HANDLE(dev);\n 385:\t\tchar *name, *alt_name, *label;\n 386:\t\n 387:\t\tif (strcmp(dev_name(dev), \"i2c-BOSC0200:base\") == 0) {\n 388:\t\t\talt_name = \"ROMK\";\n 389:\t\t\tlabel = \"accel-base\";\n 390:\t\t} else {\n 391:\t\t\talt_name = \"ROMS\";\n 392:\t\t\tlabel = \"accel-display\";\n 393:\t\t}\n 394:\t\n 395:\t\tif (acpi_has_method(handle, \"ROTM\")) {\n 396:\t\t\tname = \"ROTM\";\n 397:\t\t} else if (acpi_has_method(handle, alt_name)) {\n 398:\t\t\tname = alt_name;\n 399:\t\t\tindio_dev-\u003elabel = label;\n 400:\t\t} else {\n 401:\t\t\treturn false;\n 402:\t\t}\n 403:\t\n 404:\t\treturn iio_read_acpi_mount_matrix(dev, orientation, name);\n 405:\t}\n 406:\t\n 407:\tstatic bool bmc150_apply_dual250e_acpi_orientation(struct device *dev,\n 408:\t\t\t\t\t\t\t struct iio_mount_matrix *orientation)\n 409:\t{\n 410:\t\tstruct iio_dev *indio_dev = dev_get_drvdata(dev);\n 411:\t\n 412:\t\tif (strcmp(dev_name(dev), \"i2c-DUAL250E:base\") == 0)\n 413:\t\t\tindio_dev-\u003elabel = \"accel-base\";\n 414:\t\telse\n"
} |
| 8/2 | 2026/10/12 07:51 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9508 output: 58 thoughts: 52 Thoughts: Here's my take on the thought process, as requested: **Deconstructing bmc150_apply_bosc0200_acpi_orientation** Okay, so I need to understand the execution context of `bmc150_apply_bosc0200_acpi_orientation`. It looks like I need to figure out the conditions under which that function actually gets invoked. My initial thought is to identify all the potential entry points. I'm going to track down the callers of `bmc150_apply_bosc0200_acpi_orientation` and understand the logic that leads to those calls. From there, I can analyze the upstream code. This will tell me *exactly* when and why this specific function is utilized. |
| 9/2 | 2026/10/12 07:51 | tool | grepper |
0mArgs:{
"Expression": "bmc150_apply_bosc0200_acpi_orientation",
"PathPrefixes": [
"drivers/iio/accel/bmc150-accel-core.c"
]
}Results: {
"Output": "drivers/iio/accel/bmc150-accel-core.c=348=static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)\n--\ndrivers/iio/accel/bmc150-accel-core.c-379- */\ndrivers/iio/accel/bmc150-accel-core.c:380:static bool bmc150_apply_bosc0200_acpi_orientation(struct device *dev,\ndrivers/iio/accel/bmc150-accel-core.c-381-\t\t\t\t\t\t struct iio_mount_matrix *orientation)\n--\ndrivers/iio/accel/bmc150-accel-core.c=420=static bool bmc150_apply_acpi_orientation(struct device *dev,\n--\ndrivers/iio/accel/bmc150-accel-core.c-425-\tif (adev \u0026\u0026 acpi_dev_hid_uid_match(adev, \"BOSC0200\", NULL))\ndrivers/iio/accel/bmc150-accel-core.c:426:\t\treturn bmc150_apply_bosc0200_acpi_orientation(dev, orientation);\ndrivers/iio/accel/bmc150-accel-core.c-427-\n"
} |
| 10/2 | 2026/10/12 07:51 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10151 output: 25 thoughts: 1089 Thoughts: **Analyzing the ACPI-Based IIO Accelerometer Driver Interaction** Okay, let's break this down. That `adev && acpi_dev_hid_uid_match(adev, "BOSC0200", NULL)` call immediately piqued my interest. I see this is related to ACPI and HID matching, likely dealing with those accelerometer chips found in laptops and tablets, things like the Lenovo Yoga or Asus Zenbook, using sensors like BOSC0200. The key thing here is the need for `ACPI_HANDLE(dev)`, which tells me we're looking for an ACPI handle associated with a device node. That ACPI device, in turn, needs to have an ACPI method like "ROTM" that evaluates to a package of strings - like "0, 1, 0". I'm thinking about the possibility of probing these drivers within QEMU. Can a dummy or mock IIO driver be made to call this function? A quick check confirms a `grepper` search for `iio_read_acpi_mount_matrix` across the codebase reveals it's used in drivers for Bosch and Kionix accelerometers, MEMSIC accelerometers, and Bosch and STMicroelectronics IMUs. And looking deeper at how the function is used, and declared in `include/linux/iio/iio.h` and defined in `drivers/iio/industrialio-acpi.c`. None of these look like virtual or mock drivers. Even if the driver module *is* loaded, the probe function is only invoked when the right hardware is found on the bus (I2C/SPI), and this function explicitly requires an ACPI firmware node with a "ROTM" method returning an ACPI package. Standard QEMU/GCE setups don't have this, their standard BIOS/OVMF DSDT tables don't define these specific accelerometer/IMU ACPI devices with the required "ROTM" methods. Even if QEMU had an I2C bus, it's not emulating those chips or providing the "ROTM" methods. Could `syzkaller` somehow instantiate these devices via USB, though? No, these aren't USB drivers. They're all I2C or SPI based. I verified: `bmc150`, `kxcjk-1013`, `mxc4005`, `bmi323`, and `st_lsm6dsx`, all use I2C or SPI. Could an I2C device be created via i2c-dev? If an I2C client were instantiated using something like `echo kxcjk1013 0x0f > /sys/bus/i2c/devices/i2c-0/new_device`, `ACPI_HANDLE(&client->dev)` would be NULL, because sysfs-instantiated I2C devices don't have an associated ACPI companion node. And that makes the function immediately return `false`. What about ACPI configfs? Could configfs be used to create an ACPI device with a "ROTM" method? We need to look into whether ACPI configfs exists, and if `syzkaller` can use it. |
| 11/2 | 2026/10/12 07:52 | tool | grepper |
0mArgs:{
"Expression": "configfs.*acpi|acpi_configfs"
}Results: {
"Output": "MAINTAINERS=285=T:\tgit git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm\nMAINTAINERS:286:F:\tDocumentation/ABI/testing/configfs-acpi\nMAINTAINERS-287-F:\tDocumentation/ABI/testing/sysfs-bus-acpi\n--\ndrivers/acpi/Makefile=122=obj-$(CONFIG_ACPI_EXTLOG)\t+= acpi_extlog.o\ndrivers/acpi/Makefile-123-\ndrivers/acpi/Makefile:124:obj-$(CONFIG_ACPI_CONFIGFS)\t+= acpi_configfs.o\ndrivers/acpi/Makefile-125-\n--\ndrivers/acpi/acpi_configfs.c=92=CONFIGFS_BIN_ATTR(acpi_table_, aml, NULL, MAX_ACPI_TABLE_SIZE);\ndrivers/acpi/acpi_configfs.c-93-\ndrivers/acpi/acpi_configfs.c:94:static struct configfs_bin_attribute *acpi_table_bin_attrs[] = {\ndrivers/acpi/acpi_configfs.c-95-\t\u0026acpi_table_attr_aml,\n--\ndrivers/acpi/acpi_configfs.c=188=CONFIGFS_ATTR_RO(acpi_table_, asl_compiler_revision);\ndrivers/acpi/acpi_configfs.c-189-\ndrivers/acpi/acpi_configfs.c:190:static struct configfs_attribute *acpi_table_attrs[] = {\ndrivers/acpi/acpi_configfs.c-191-\t\u0026acpi_table_attr_signature,\n--\ndrivers/acpi/acpi_configfs.c=221=static void acpi_table_drop_item(struct config_group *group,\n--\ndrivers/acpi/acpi_configfs.c-230-\ndrivers/acpi/acpi_configfs.c:231:static struct configfs_group_operations acpi_table_group_ops = {\ndrivers/acpi/acpi_configfs.c-232-\t.make_item = acpi_table_make_item,\n--\ndrivers/acpi/acpi_configfs.c=241=static const struct config_item_type acpi_root_group_type = {\n--\ndrivers/acpi/acpi_configfs.c-244-\ndrivers/acpi/acpi_configfs.c:245:static struct configfs_subsystem acpi_configfs = {\ndrivers/acpi/acpi_configfs.c-246-\t.su_group = {\n--\ndrivers/acpi/acpi_configfs.c-251-\t},\ndrivers/acpi/acpi_configfs.c:252:\t.su_mutex = __MUTEX_INITIALIZER(acpi_configfs.su_mutex),\ndrivers/acpi/acpi_configfs.c-253-};\ndrivers/acpi/acpi_configfs.c-254-\ndrivers/acpi/acpi_configfs.c:255:static int __init acpi_configfs_init(void)\ndrivers/acpi/acpi_configfs.c-256-{\ndrivers/acpi/acpi_configfs.c-257-\tint ret;\ndrivers/acpi/acpi_configfs.c:258:\tstruct config_group *root = \u0026acpi_configfs.su_group;\ndrivers/acpi/acpi_configfs.c-259-\n--\ndrivers/acpi/acpi_configfs.c-261-\ndrivers/acpi/acpi_configfs.c:262:\tret = configfs_register_subsystem(\u0026acpi_configfs);\ndrivers/acpi/acpi_configfs.c-263-\tif (ret)\n--\ndrivers/acpi/acpi_configfs.c-268-\tif (IS_ERR(acpi_table_group)) {\ndrivers/acpi/acpi_configfs.c:269:\t\tconfigfs_unregister_subsystem(\u0026acpi_configfs);\ndrivers/acpi/acpi_configfs.c-270-\t\treturn PTR_ERR(acpi_table_group);\n--\ndrivers/acpi/acpi_configfs.c-274-}\ndrivers/acpi/acpi_configfs.c:275:module_init(acpi_configfs_init);\ndrivers/acpi/acpi_configfs.c-276-\ndrivers/acpi/acpi_configfs.c:277:static void __exit acpi_configfs_exit(void)\ndrivers/acpi/acpi_configfs.c-278-{\ndrivers/acpi/acpi_configfs.c:279:\tconfigfs_unregister_default_group(acpi_table_group);\ndrivers/acpi/acpi_configfs.c:280:\tconfigfs_unregister_subsystem(\u0026acpi_configfs);\ndrivers/acpi/acpi_configfs.c-281-}\ndrivers/acpi/acpi_configfs.c:282:module_exit(acpi_configfs_exit);\ndrivers/acpi/acpi_configfs.c-283-\n"
} |
| 12/2 | 2026/10/12 07:52 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 13292 output: 180 thoughts: 1658 Thoughts: **Analysis of Industrial I/O ACPI Code for Fuzzing Suitability**
Okay, let's see, the initial thought is to check for ACPI configfs descriptions within syzkaller, but hold on, there's that critical instruction to avoid "long syz_" pseudo-syscalls. Right, and the tools mentioned for that purpose ("read-syz-spec" and "syz-grepper") don't appear available, so we'll have to proceed with caution. Let's not get sidetracked there.
Now, let's re-examine the triage guidelines. We're looking for reasons *not* to fuzz. Specifically, anything that's "Structurally unreachable hardware" is a no-go. The code in question is within `drivers/iio/industrialio-acpi.c`, particularly the `iio_read_acpi_mount_matrix()` function. This helper is all about reading accelerometer mount matrix information via ACPI methods. It's expecting data in a specific "ROTM" format defined by Microsoft.
Thinking through it, this function is *only* called by specific physical I2C/SPI accelerometer drivers during device probing. I'm talking about Bosch, Kionix, MEMSIC, and ST sensors. For execution to even get *into* this function, we need a physical device present and enumerated via ACPI, with its specific ACPI handle and, crucially, a BIOS DSDT table that defines the "ROTM" method.
Standard QEMU or GCE VMs used by syzkaller *don't* emulate these physical accelerometers, nor do they provide the proprietary ACPI ROTM methods. They don't even have the accelerometer on the bus. That's a key point. This fits the "Structurally unreachable hardware" category in the triage guidelines—specifically vendor-specific hardware requiring physical cards not emulated in standard environments.
Let's do a double-check to be absolutely sure. Are there *any* virtual or software IIO devices that might call this function? I'll search the entire kernel source tree. Nope, just those five accelerometer drivers. No direct syscalls or sysfs interfaces. And, of course, QEMU won't emulate the hardware or the ACPI.
Given this analysis, `WorthFuzzing` should definitely be `false`.
Now, time to set the results. We need the `WorthFuzzing` to be `false`, explain the reasoning clearly, an empty list for `FocusSymbols`, and another empty list for `EnableConfigs`. The reasoning must be accurate, concise, and clear. Okay, let's formulate this concisely: The patch modifies `iio_read_acpi_mount_matrix()`. This function is only invoked during the probe routines of specific physical I2C/SPI accelerometer and IMU drivers (BMC150, KXCJK-1013, MXC4005, BMI323, ST LSM6DSx) when an ACPI companion device is present and defines a Microsoft-proprietary ACPI ROTM/ROMK/ROMS method. Standard virtualized environments (QEMU/GCE) do not emulate these physical accelerometer hardware devices or their vendor ACPI tables, making the modified code structurally unreachable during fuzzing.
Good. That should be a clear and correct justification. Time to call `set-results`.
|
| 13/2 | 2026/10/12 07:52 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies iio_read_acpi_mount_matrix() in drivers/iio/industrialio-acpi.c to parse comma-separated values in ACPI mount matrix strings. This helper is only called during the probe phase of specific physical I2C/SPI accelerometer and IMU drivers (BMC150, KXCJK-1013, MXC4005, BMI323, and ST LSM6DSx) when a device has an associated ACPI handle defining a ROTM method. These hardware devices and their vendor-specific ACPI tables are not present or emulated in standard virtualized test environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies iio_read_acpi_mount_matrix() in drivers/iio/industrialio-acpi.c to parse comma-separated values in ACPI mount matrix strings. This helper is only called during the probe phase of specific physical I2C/SPI accelerometer and IMU drivers (BMC150, KXCJK-1013, MXC4005, BMI323, and ST LSM6DSx) when a device has an associated ACPI handle defining a ROTM method. These hardware devices and their vendor-specific ACPI tables are not present or emulated in standard virtualized test environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 14/1 | 2026/10/12 07:52 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|