| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/23 13:38 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies `__mtk_ppe_check_skb` in `drivers/net/ethernet/mediatek/mtk_ppe.c`, part of the MediaTek SoC Gigabit Ethernet driver (`CONFIG_NET_MEDIATEK_SOC`). This is a platform driver for MediaTek ARM/MIPS SoCs that requires specific hardware (the MediaTek Packet Processing Engine) and device-tree bindings that are not present or emulated in standard QEMU/amd64 virtualized environments. As such, the code is structurally unreachable on amd64 and not worth fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/23 13:38 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 558bb2b22a1d23f26ac36b186d9246cf84da56b8\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Oct 23 13:38:56 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/mediatek/mtk_ppe.c b/drivers/net/ethernet/mediatek/mtk_ppe.c\nindex 8451dc3fd00aa..5fd1828401b47 100644\n--- a/drivers/net/ethernet/mediatek/mtk_ppe.c\n+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c\n@@ -764,7 +764,7 @@ void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)\n \t\t}\n \n \t\tif (found || !mtk_flow_entry_match(ppe-\u003eeth, entry, hwe)) {\n-\t\t\tif (entry-\u003ehash != 0xffff)\n+\t\t\tif (entry-\u003ehash == hash)\n \t\t\t\tentry-\u003ehash = 0xffff;\n \t\t\tcontinue;\n \t\t}\n"
} |
| 2/1 | 2026/10/23 13:38 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies `__mtk_ppe_check_skb` in `drivers/net/ethernet/mediatek/mtk_ppe.c`, part of the MediaTek SoC Gigabit Ethernet driver (`CONFIG_NET_MEDIATEK_SOC`). This is a platform driver for MediaTek ARM/MIPS SoCs that requires specific hardware (the MediaTek Packet Processing Engine) and device-tree bindings that are not present or emulated in standard QEMU/amd64 virtualized environments. As such, the code is structurally unreachable on amd64 and not worth fuzzing.",
"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 558bb2b22a1d23f26ac36b186d9246cf84da56b8
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Oct 23 13:38:56 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe.c b/drivers/net/ethernet/mediatek/mtk_ppe.c
index 8451dc3fd00aa..5fd1828401b47 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
@@ -764,7 +764,7 @@ void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)
}
if (found || !mtk_flow_entry_match(ppe->eth, entry, hwe)) {
- if (entry->hash != 0xffff)
+ if (entry->hash == hash)
entry->hash = 0xffff;
continue;
}
|
| 3/2 | 2026/10/23 13:38 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3039 output: 38 thoughts: 107 Thoughts: Okay, let's break this down. **Initial Assessment: Fuzzing Potential of a Mediatek Ethernet Driver Patch** Alright, I see a patch and the first thing I want to do is figure out if it's worth the effort of fuzzing. The changed file is `drivers/net/ethernet/mediatek/mtk_ppe.c`. So, I'll start by taking a close look at this `mtk_ppe.c` file and, more broadly, the Mediatek Ethernet driver. My immediate questions are about the hardware this driver interfaces with. Is this an SoC (System-on-a-Chip) Ethernet controller, or is it a PCI, USB, or maybe even a virtual network interface? Understanding the hardware context is crucial. I need to know the target; it shapes the attack surface significantly. I'm going to quickly use some grepping or file reading tools to get the lay of the land and understand the hardware context as quickly as possible. This information is key to deciding whether to proceed with a deeper dive for potential fuzzing targets. |
| 4/2 | 2026/10/23 13:39 | tool | grepper |
0mArgs:{
"Expression": "CONFIG_NET_MEDIATEK",
"PathPrefixes": [
"drivers/net/ethernet/mediatek/"
]
}Results: {
"Output": "drivers/net/ethernet/mediatek/Makefile-5-\ndrivers/net/ethernet/mediatek/Makefile:6:obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth.o\ndrivers/net/ethernet/mediatek/Makefile-7-mtk_eth-y := mtk_eth_soc.o mtk_eth_path.o mtk_ppe.o mtk_ppe_debugfs.o mtk_ppe_offload.o\ndrivers/net/ethernet/mediatek/Makefile:8:mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed.o mtk_wed_mcu.o mtk_wed_wo.o\ndrivers/net/ethernet/mediatek/Makefile-9-ifdef CONFIG_DEBUG_FS\ndrivers/net/ethernet/mediatek/Makefile:10:mtk_eth-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_debugfs.o\ndrivers/net/ethernet/mediatek/Makefile-11-endif\ndrivers/net/ethernet/mediatek/Makefile:12:obj-$(CONFIG_NET_MEDIATEK_SOC_WED) += mtk_wed_ops.o\ndrivers/net/ethernet/mediatek/Makefile:13:obj-$(CONFIG_NET_MEDIATEK_STAR_EMAC) += mtk_star_emac.o\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c=92=mtk_flow_get_wdma_info(struct net_device *dev, const u8 *addr, struct mtk_wdma_info *info)\n--\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-103-\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c:104:\tif (!IS_ENABLED(CONFIG_NET_MEDIATEK_SOC_WED))\ndrivers/net/ethernet/mediatek/mtk_ppe_offload.c-105-\t\treturn -1;\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h=56=struct mtk_wdma_info {\n--\ndrivers/net/ethernet/mediatek/mtk_wed.h-63-\ndrivers/net/ethernet/mediatek/mtk_wed.h:64:#ifdef CONFIG_NET_MEDIATEK_SOC_WED\ndrivers/net/ethernet/mediatek/mtk_wed.h-65-static inline bool mtk_wed_is_v1(struct mtk_wed_hw *hw)\n"
} |
| 5/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4053 output: 39 thoughts: 17 Thoughts: Okay, here's my summary, presented as a stream of thought: **Checking the Mediatek SOC Configuration** Right, let's dive in. First order of business is to make sure the Mediatek SOC configuration is set up correctly. Specifically, I need to check the `Kconfig` file for `NET_MEDIATEK_SOC`. This is where all the underlying options and dependencies are defined for this specific SOC platform related to networking. I expect to find the base configurations and then follow those to the specific drivers. I need to get a clear picture of what's enabled, disabled, and what other settings it relies on. I want to understand if anything is amiss with this initial platform support before proceeding. I’ll be looking for things like: base device support, clock configuration, DMA settings, and any specific hardware features that are enabled by default, or that I might need to consider for my project. Time to get my hands dirty and ensure the foundation is solid. |
| 6/2 | 2026/10/23 13:39 | tool | grepper |
0mArgs:{
"Expression": "config NET_MEDIATEK_SOC",
"PathPrefixes": [
"drivers/net/ethernet/mediatek/"
]
}Results: {
"Output": "drivers/net/ethernet/mediatek/Kconfig=8=if NET_VENDOR_MEDIATEK\ndrivers/net/ethernet/mediatek/Kconfig-9-\ndrivers/net/ethernet/mediatek/Kconfig:10:config NET_MEDIATEK_SOC_WED\ndrivers/net/ethernet/mediatek/Kconfig-11-\tdepends on ARCH_MEDIATEK || COMPILE_TEST\n--\ndrivers/net/ethernet/mediatek/Kconfig-13-\ndrivers/net/ethernet/mediatek/Kconfig:14:config NET_MEDIATEK_SOC\ndrivers/net/ethernet/mediatek/Kconfig-15-\ttristate \"MediaTek SoC Gigabit Ethernet support\"\n"
} |
| 7/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4496 output: 38 thoughts: 18 Thoughts: Here's a first-person summary, tailored for an expert in the field: **Diving into the Mediatek Ethernet Configuration** Okay, time to get my hands dirty. Let's start by digging into the `drivers/net/ethernet/mediatek/Kconfig` file. I'm going to want to understand the Mediatek Ethernet driver's configuration options. This Kconfig file is the key to that. I'm expecting to find the usual suspects: options for enabling/disabling the driver itself, perhaps individual MAC controllers, PHY options, any specific Mediatek-related features, maybe even power management controls. Hopefully, it's well-structured and uses clear dependencies, so I can quickly identify the important bits and how they relate to the overall Ethernet subsystem. I'll be looking for any hints on how these configuration options interact with other parts of the kernel. Let's see what Mediatek has provided for configuration. Hopefully they've done a solid job. |
| 8/2 | 2026/10/23 13:39 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mediatek/Kconfig",
"FirstLine": 1,
"LineCount": 60
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig NET_VENDOR_MEDIATEK\n 3:\t\tbool \"MediaTek devices\"\n 4:\t\tdepends on ARCH_MEDIATEK || ARCH_AIROHA || SOC_MT7621 || SOC_MT7620 || COMPILE_TEST\n 5:\t\thelp\n 6:\t\t If you have a Mediatek SoC with ethernet, say Y.\n 7:\t\n 8:\tif NET_VENDOR_MEDIATEK\n 9:\t\n 10:\tconfig NET_MEDIATEK_SOC_WED\n 11:\t\tdepends on ARCH_MEDIATEK || COMPILE_TEST\n 12:\t\tdef_bool NET_MEDIATEK_SOC != n\n 13:\t\n 14:\tconfig NET_MEDIATEK_SOC\n 15:\t\ttristate \"MediaTek SoC Gigabit Ethernet support\"\n 16:\t\tdepends on NET_DSA || !NET_DSA\n 17:\t\tselect PINCTRL\n 18:\t\tselect PHYLINK\n 19:\t\tselect DIMLIB\n 20:\t\tselect GENERIC_ALLOCATOR\n 21:\t\tselect PAGE_POOL\n 22:\t\tselect PAGE_POOL_STATS\n 23:\t\tselect PCS_MTK_LYNXI\n 24:\t\tselect REGMAP_MMIO\n 25:\t\thelp\n 26:\t\t This driver supports the gigabit ethernet MACs in the\n 27:\t\t MediaTek SoC family.\n 28:\t\n 29:\tconfig NET_MEDIATEK_STAR_EMAC\n 30:\t\ttristate \"MediaTek STAR Ethernet MAC support\"\n 31:\t\tselect PHYLIB\n 32:\t\tselect REGMAP_MMIO\n 33:\t\thelp\n 34:\t\t This driver supports the ethernet MAC IP first used on\n 35:\t\t MediaTek MT85** SoCs.\n 36:\t\n 37:\tendif #NET_VENDOR_MEDIATEK\n"
} |
| 9/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5261 output: 42 thoughts: 32 Thoughts: Here's my thought process, as if I were considering this myself: **Diving into the Driver Probe Implementation** Okay, so I need to understand the driver probe implementation. My first instinct is to determine its type; is it a platform driver, or something else entirely? Knowing this will significantly narrow down the code paths to examine. I'll need to confirm that. Alright, let's start by looking at `mtk_eth_soc.c`. That seems like a logical place to begin, given the context. I'll get the the specifics on what they did there. Let's see what we can find. |
| 10/2 | 2026/10/23 13:39 | tool | grepper |
0mArgs:{
"Expression": "module_platform_driver|platform_driver_register",
"PathPrefixes": [
"drivers/net/ethernet/mediatek/"
]
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=5696=static struct platform_driver mtk_driver = {\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5704-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5705:module_platform_driver(mtk_driver);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5706-\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c=1749=static struct platform_driver mtk_star_driver = {\n--\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1756-};\ndrivers/net/ethernet/mediatek/mtk_star_emac.c:1757:module_platform_driver(mtk_star_driver);\ndrivers/net/ethernet/mediatek/mtk_star_emac.c-1758-\n"
} |
| 11/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5740 output: 36 thoughts: 126 Thoughts: **Investigating the `mtk_driver` on an amd64 Architecture** Okay, so I'm looking at this `mtk_driver`. It's a platform driver specifically for MediaTek SoCs – I know that architecture well. But wait a minute… the target is `amd64`. That's unexpected. My immediate thought is, can this even probe correctly on an amd64 environment in QEMU? I need to figure out how this driver is initialized and if it relies on any MediaTek-specific hardware features that might not be present on this architecture. Right, I need to check the `of_device_id` configuration within the `mtk_eth_soc.c` file or, more generally, how the device is probed. I'll need to dig into the code and see how this driver is actually loaded. Let's go ahead and examine `drivers/net/ethernet/mediatek/mtk_eth_soc.c`. That should give me the information I'm looking for. Let's see what's what! |
| 12/2 | 2026/10/23 13:39 | tool | grepper |
0mArgs:{
"Expression": "mtk_driver =",
"PathPrefixes": [
"drivers/net/ethernet/mediatek/"
]
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=5694=MODULE_DEVICE_TABLE(of, of_mtk_match);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5695-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5696:static struct platform_driver mtk_driver = {\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5697-\t.probe = mtk_probe,\n"
} |
| 13/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6278 output: 36 thoughts: 157 Thoughts: **My Immediate Assessment** Okay, so I'm looking at this and the initial clue is the `MODULE_DEVICE_TABLE(of, of_mtk_match)`. That screams "Open Firmware (Device Tree) platform driver, specifically for a MediaTek ARM/MIPS SoC." Which, on its own, is pretty straightforward. But then the wheels start turning... My gut reaction is, "Hang on, can you even *have* an Open Firmware driver probing on an amd64 system?" That doesn't fit! amd64 is all about ACPI and x86 PC platforms, definitely not Device Tree or, especially, MediaTek SoCs. That's a huge red flag. Then I quickly think, "Could someone be trying to be clever with device tree overlays or fake platform devices on amd64?" Even if they managed to cobble together a DT overlay through sysfs or configfs, without the proper SoC-specific MMIO registers, resets, clocks, phy, power domains, etc., it simply *wouldn't* probe. It wouldn't work. It would be fundamentally missing the hardware it needs to interact with. Okay, deep breath, let's step back and look at what `mtk_probe` itself is actually doing. Maybe it's not what I think it is and I missed something. |
| 14/2 | 2026/10/23 13:39 | tool | grepper |
0mArgs:{
"Expression": "mtk_probe\\(",
"PathPrefixes": [
"drivers/net/ethernet/mediatek/"
]
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=5095=static int mtk_setup_legacy_sram(struct mtk_eth *eth, struct resource *res)\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5115-\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:5116:static int mtk_probe(struct platform_device *pdev)\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-5117-{\n"
} |
| 15/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6915 output: 47 thoughts: 17 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing Resource Requirements within `mtk_probe`** Alright, let's dive into this `mtk_probe` function. I need to understand its resource footprint. My immediate focus is to pinpoint *exactly* what hardware or software resources it's requesting and initializing. I'm thinking: memory maps, I/O ports, interrupt lines, specific DMA channels, perhaps even access to configuration registers on some attached peripheral. Is it touching shared memory regions? What about potential conflicts with other modules or drivers? I'll be looking for any indications of resource contention and dependencies. Let's see if this probe is straightforward, or if there is a complex dependency graph in place. |
| 16/2 | 2026/10/23 13:39 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/mediatek/mtk_eth_soc.c",
"FirstLine": 5116,
"LineCount": 80
}Results: {
"Contents": "5116:\tstatic int mtk_probe(struct platform_device *pdev)\n5117:\t{\n5118:\t\tstruct resource *res = NULL;\n5119:\t\tstruct device_node *mac_np;\n5120:\t\tstruct mtk_eth *eth;\n5121:\t\tint err, i;\n5122:\t\n5123:\t\teth = devm_kzalloc(\u0026pdev-\u003edev, sizeof(*eth), GFP_KERNEL);\n5124:\t\tif (!eth)\n5125:\t\t\treturn -ENOMEM;\n5126:\t\n5127:\t\teth-\u003esoc = of_device_get_match_data(\u0026pdev-\u003edev);\n5128:\t\n5129:\t\teth-\u003edev = \u0026pdev-\u003edev;\n5130:\t\teth-\u003edma_dev = \u0026pdev-\u003edev;\n5131:\t\teth-\u003ebase = devm_platform_ioremap_resource(pdev, 0);\n5132:\t\tif (IS_ERR(eth-\u003ebase))\n5133:\t\t\treturn PTR_ERR(eth-\u003ebase);\n5134:\t\n5135:\t\tif (MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_SOC_MT7628))\n5136:\t\t\teth-\u003eip_align = NET_IP_ALIGN;\n5137:\t\n5138:\t\tif (MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_36BIT_DMA)) {\n5139:\t\t\terr = dma_set_mask(\u0026pdev-\u003edev, DMA_BIT_MASK(36));\n5140:\t\t\tif (!err)\n5141:\t\t\t\terr = dma_set_coherent_mask(\u0026pdev-\u003edev, DMA_BIT_MASK(32));\n5142:\t\n5143:\t\t\tif (err) {\n5144:\t\t\t\tdev_err(\u0026pdev-\u003edev, \"Wrong DMA config\\n\");\n5145:\t\t\t\treturn -EINVAL;\n5146:\t\t\t}\n5147:\t\t}\n5148:\t\n5149:\t\tspin_lock_init(\u0026eth-\u003epage_lock);\n5150:\t\tspin_lock_init(\u0026eth-\u003etx_irq_lock);\n5151:\t\tspin_lock_init(\u0026eth-\u003erx_irq_lock);\n5152:\t\tspin_lock_init(\u0026eth-\u003edim_lock);\n5153:\t\n5154:\t\teth-\u003erx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;\n5155:\t\tINIT_WORK(\u0026eth-\u003erx_dim.work, mtk_dim_rx);\n5156:\t\tINIT_DELAYED_WORK(\u0026eth-\u003ereset.monitor_work, mtk_hw_reset_monitor_work);\n5157:\t\n5158:\t\teth-\u003etx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;\n5159:\t\tINIT_WORK(\u0026eth-\u003etx_dim.work, mtk_dim_tx);\n5160:\t\n5161:\t\tif (!MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_SOC_MT7628)) {\n5162:\t\t\teth-\u003eethsys = syscon_regmap_lookup_by_phandle(pdev-\u003edev.of_node,\n5163:\t\t\t\t\t\t\t\t \"mediatek,ethsys\");\n5164:\t\t\tif (IS_ERR(eth-\u003eethsys)) {\n5165:\t\t\t\tdev_err(\u0026pdev-\u003edev, \"no ethsys regmap found\\n\");\n5166:\t\t\t\treturn PTR_ERR(eth-\u003eethsys);\n5167:\t\t\t}\n5168:\t\t}\n5169:\t\n5170:\t\tif (MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_INFRA)) {\n5171:\t\t\teth-\u003einfra = syscon_regmap_lookup_by_phandle(pdev-\u003edev.of_node,\n5172:\t\t\t\t\t\t\t\t \"mediatek,infracfg\");\n5173:\t\t\tif (IS_ERR(eth-\u003einfra)) {\n5174:\t\t\t\tdev_err(\u0026pdev-\u003edev, \"no infracfg regmap found\\n\");\n5175:\t\t\t\treturn PTR_ERR(eth-\u003einfra);\n5176:\t\t\t}\n5177:\t\t}\n5178:\t\n5179:\t\tif (of_dma_is_coherent(pdev-\u003edev.of_node)) {\n5180:\t\t\tstruct regmap *cci;\n5181:\t\n5182:\t\t\tcci = syscon_regmap_lookup_by_phandle(pdev-\u003edev.of_node,\n5183:\t\t\t\t\t\t\t \"cci-control-port\");\n5184:\t\t\t/* enable CPU/bus coherency */\n5185:\t\t\tif (!IS_ERR(cci))\n5186:\t\t\t\tregmap_write(cci, 0, 3);\n5187:\t\t}\n5188:\t\n5189:\t\tif (MTK_HAS_CAPS(eth-\u003esoc-\u003ecaps, MTK_SGMII)) {\n5190:\t\t\terr = mtk_sgmii_init(eth);\n5191:\t\n5192:\t\t\tif (err)\n5193:\t\t\t\treturn err;\n5194:\t\t}\n5195:\t\n"
} |
| 17/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8519 output: 34 thoughts: 318 Thoughts: **My Initial Assessment of the Code Path** Okay, so I'm looking at this new code, and my first thoughts are immediately around resource access and initialization. I see references to `devm_platform_ioremap_resource` and `syscon_regmap_lookup_by_phandle`, so it looks like we're dealing with hardware interaction. That's a key starting point. I also need to make sure I'm following the instructions and seeing whether this is reachable for fuzzing. Now, let's go back and check Section 2 of the instructions. The primary gate is "reachability". Fuzzing is only useful if the code can actually execute in standard virtualized environments. If it's structurally unreachable, then forget it, no matter how much logic or assertions are added. That makes sense, but I need to be diligent about identifying these situations. This includes things like: vendor-specific hardware requiring physical cards that aren't emulated and drivers that are only used during device teardown, physical PCI hot-unplug, or on architectures other than the target architecture. Wait a second, let's apply the rule to the current code. I need to make sure this code is reachable. The primary code is either `mtk_ppe` or `__mtk_ppe_check_skb`. So I'll go check whether either of them is called anywhere *outside* of `drivers/net/ethernet/mediatek`. If they are, that's a good sign. I'll start by looking at the callers of `__mtk_ppe_check_skb` to understand how the code is used. I need to be sure the function is reachable before I proceed. |
| 18/2 | 2026/10/23 13:39 | tool | grepper |
0mArgs:{
"Expression": "__mtk_ppe_check_skb|mtk_ppe_check_skb"
}Results: {
"Output": "drivers/net/ethernet/mediatek/mtk_eth_soc.c=2201=static int mtk_poll_rx(struct napi_struct *napi, int budget,\n--\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-2384-\t\tif (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c:2385:\t\t\tmtk_ppe_check_skb(eth-\u003eppe[ppe_idx], skb, hash);\ndrivers/net/ethernet/mediatek/mtk_eth_soc.c-2386-\n--\ndrivers/net/ethernet/mediatek/mtk_ppe.c=698=mtk_foe_entry_commit_subflow(struct mtk_ppe *ppe, struct mtk_flow_entry *entry,\n--\ndrivers/net/ethernet/mediatek/mtk_ppe.c-737-\ndrivers/net/ethernet/mediatek/mtk_ppe.c:738:void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)\ndrivers/net/ethernet/mediatek/mtk_ppe.c-739-{\n--\ndrivers/net/ethernet/mediatek/mtk_ppe.h=352=int mtk_ppe_prepare_reset(struct mtk_ppe *ppe);\ndrivers/net/ethernet/mediatek/mtk_ppe.h-353-\ndrivers/net/ethernet/mediatek/mtk_ppe.h:354:void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash);\ndrivers/net/ethernet/mediatek/mtk_ppe.h-355-\ndrivers/net/ethernet/mediatek/mtk_ppe.h=356=static inline void\ndrivers/net/ethernet/mediatek/mtk_ppe.h:357:mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)\ndrivers/net/ethernet/mediatek/mtk_ppe.h-358-{\n--\ndrivers/net/ethernet/mediatek/mtk_ppe.h-372-\tppe-\u003efoe_check_time[hash] = now;\ndrivers/net/ethernet/mediatek/mtk_ppe.h:373:\t__mtk_ppe_check_skb(ppe, skb, hash);\ndrivers/net/ethernet/mediatek/mtk_ppe.h-374-}\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c=1959=mtk_wed_ppe_check(struct mtk_wed_device *dev, struct sk_buff *skb,\n--\ndrivers/net/ethernet/mediatek/mtk_wed.c-1973-\tskb-\u003eprotocol = eh-\u003eh_proto;\ndrivers/net/ethernet/mediatek/mtk_wed.c:1974:\tmtk_ppe_check_skb(eth-\u003eppe[dev-\u003ehw-\u003eindex], skb, hash);\ndrivers/net/ethernet/mediatek/mtk_wed.c-1975-}\n"
} |
| 19/2 | 2026/10/23 13:39 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10077 output: 154 thoughts: 801 Thoughts: **Unreachability Assessment: MediaTek Ethernet PPE on amd64** Okay, let's break this down. My initial assessment is that `__mtk_ppe_check_skb` is only called within the MediaTek SoC ethernet driver, specifically within `mtk_poll_rx` and `mtk_wed_ppe_check`. That's all happening within the `drivers/net/ethernet/mediatek/` directory. The explicit target architecture is amd64. So, the question is, can this code even *run* on amd64, especially in a standard virtualized environment? Let's look at the `NET_VENDOR_MEDIATEK` Kconfig. It's dependent on `ARCH_MEDIATEK`, `ARCH_AIROHA`, `SOC_MT7621`, `SOC_MT7620`, *or* `COMPILE_TEST`. But, on amd64, it can *only* be enabled if `COMPILE_TEST` is active. Even if it *is* compiled with `COMPILE_TEST=y`, this still means it relies on physical MediaTek SoC hardware - the Open Firmware device tree nodes, the regmaps, that kind of thing. And this is the key: standard QEMU (like `qemu-system-x86_64`) *doesn't* emulate the MediaTek Ethernet MAC or the Packet Processing Engine (PPE). That's a fundamental hardware limitation. Now, let's refer to those instructions. Section 1 emphasizes that fuzzing should only target code that's reachable in standard virtualized environments. Section 2 then clarifies the "structurally unreachable" cases. Specifically, it mentions vendor-specific hardware like PCIe switches, SmartNICs, GPU drivers (e.g., mlxsw, qed, amdgpu) which require physical hardware, not QEMU emulation. And it mentions unreachable execution paths that execute *only* during physical hardware interactions. The MediaTek SoC ethernet controller with PPE is clearly physical hardware, designed for specific MediaTek ARM and MIPS SoCs, like MT7621, MT7622, MT7986, etc. It can't be emulated in standard QEMU on amd64, and there's no virtual interface to interact with it. Therefore, given the architecture limitation, there's no way this code is reachable in a standard virtualized environment on the target architecture (amd64). I'm confident in concluding that this code is structurally unreachable. This code is not worth fuzzing. Let's confirm the results: * WorthFuzzing: false * EnableConfigs: \[ ] * FocusSymbols: \[ ] * Reasoning: Concise explanation of the verdict. "The patch modifies `__mtk_ppe_check_skb` in `drivers/net/ethernet/mediatek/mtk_ppe.c`, which is part of the MediaTek SoC Gigabit Ethernet driver (`CONFIG_NET_MEDIATEK_SOC`). This driver targets MediaTek ARM and MIPS SoCs and requires physical SoC hardware (such as the MediaTek Packet Processing Engine / PPE) that is not emulated in standard QEMU / amd64 virtualized environments. Because the modified code is structurally unreachable on the target architecture amd64, it is not worth fuzzing." Yes, everything checks out and supports the decision. |
| 20/2 | 2026/10/23 13:40 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies `__mtk_ppe_check_skb` in `drivers/net/ethernet/mediatek/mtk_ppe.c`, part of the MediaTek SoC Gigabit Ethernet driver (`CONFIG_NET_MEDIATEK_SOC`). This is a platform driver for MediaTek ARM/MIPS SoCs that requires specific hardware (the MediaTek Packet Processing Engine) and device-tree bindings that are not present or emulated in standard QEMU/amd64 virtualized environments. As such, the code is structurally unreachable on amd64 and not worth fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies `__mtk_ppe_check_skb` in `drivers/net/ethernet/mediatek/mtk_ppe.c`, part of the MediaTek SoC Gigabit Ethernet driver (`CONFIG_NET_MEDIATEK_SOC`). This is a platform driver for MediaTek ARM/MIPS SoCs that requires specific hardware (the MediaTek Packet Processing Engine) and device-tree bindings that are not present or emulated in standard QEMU/amd64 virtualized environments. As such, the code is structurally unreachable on amd64 and not worth fuzzing.",
"WorthFuzzing": false
} |
| 21/1 | 2026/10/23 13:40 | 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) |
|---|