| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/23 11:28 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies coalesce handling and XDP transmit logic in the STMicroelectronics/Synopsys DesignWare Ethernet (stmmac) driver. This driver targets physical SoC IP cores and vendor-specific PCIe devices that are not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/23 11:28 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 402f718670c173380bd5aa6a518e26cb83807ba6\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Sep 23 11:28:48 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c\nindex 1be5310ca766c..daec9cf9eba16 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c\n@@ -837,6 +837,8 @@ static int __stmmac_set_coalesce(struct net_device *dev,\n \tstruct stmmac_priv *priv = netdev_priv(dev);\n \tbool all_queues = false;\n \tunsigned int rx_riwt;\n+\tbool has_rx;\n+\tbool has_tx;\n \tu32 max_cnt;\n \tu32 rx_cnt;\n \tu32 tx_cnt;\n@@ -850,7 +852,20 @@ static int __stmmac_set_coalesce(struct net_device *dev,\n \telse if (queue \u003e= max_cnt)\n \t\treturn -EINVAL;\n \n-\tif (priv-\u003euse_riwt) {\n+\thas_rx = all_queues || queue \u003c rx_cnt;\n+\thas_tx = all_queues || queue \u003c tx_cnt;\n+\n+\t/* An index can be RX-only or TX-only; ignore the missing side. */\n+\tif (has_tx \u0026\u0026\n+\t ec-\u003etx_coalesce_usecs == 0 \u0026\u0026 ec-\u003etx_max_coalesced_frames == 0)\n+\t\treturn -EINVAL;\n+\n+\tif (has_tx \u0026\u0026\n+\t (ec-\u003etx_coalesce_usecs \u003e STMMAC_MAX_COAL_TX_TICK ||\n+\t ec-\u003etx_max_coalesced_frames \u003e STMMAC_TX_MAX_FRAMES))\n+\t\treturn -EINVAL;\n+\n+\tif (has_rx \u0026\u0026 priv-\u003euse_riwt) {\n \t\trx_riwt = stmmac_usec2riwt(ec-\u003erx_coalesce_usecs, priv);\n \n \t\tif ((rx_riwt \u003e MAX_DMA_RIWT) || (rx_riwt \u003c MIN_DMA_RIWT))\n@@ -866,7 +881,7 @@ static int __stmmac_set_coalesce(struct net_device *dev,\n \t\t\t\tpriv-\u003erx_coal_frames[i] =\n \t\t\t\t\tec-\u003erx_max_coalesced_frames;\n \t\t\t}\n-\t\t} else if (queue \u003c rx_cnt) {\n+\t\t} else {\n \t\t\tpriv-\u003erx_riwt[queue] = rx_riwt;\n \t\t\tstmmac_rx_watchdog(priv, priv-\u003eioaddr,\n \t\t\t\t\t rx_riwt, queue);\n@@ -875,14 +890,6 @@ static int __stmmac_set_coalesce(struct net_device *dev,\n \t\t}\n \t}\n \n-\tif ((ec-\u003etx_coalesce_usecs == 0) \u0026\u0026\n-\t (ec-\u003etx_max_coalesced_frames == 0))\n-\t\treturn -EINVAL;\n-\n-\tif ((ec-\u003etx_coalesce_usecs \u003e STMMAC_MAX_COAL_TX_TICK) ||\n-\t (ec-\u003etx_max_coalesced_frames \u003e STMMAC_TX_MAX_FRAMES))\n-\t\treturn -EINVAL;\n-\n \tif (all_queues) {\n \t\tint i;\n \n@@ -892,7 +899,7 @@ static int __stmmac_set_coalesce(struct net_device *dev,\n \t\t\tpriv-\u003etx_coal_timer[i] =\n \t\t\t\tec-\u003etx_coalesce_usecs;\n \t\t}\n-\t} else if (queue \u003c tx_cnt) {\n+\t} else if (has_tx) {\n \t\tpriv-\u003etx_coal_frames[queue] =\n \t\t\tec-\u003etx_max_coalesced_frames;\n \t\tpriv-\u003etx_coal_timer[queue] =\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\nindex d5a984ad864f2..5900b9d08af8e 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n@@ -5255,7 +5255,9 @@ static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,\n \n \ttx_q-\u003etx_count_frames++;\n \n-\tif (tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue] == 0)\n+\tif (!priv-\u003etx_coal_frames[queue])\n+\t\tset_ic = false;\n+\telse if (tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue] == 0)\n \t\tset_ic = true;\n \telse\n \t\tset_ic = false;\n"
} |
| 2/1 | 2026/09/23 11:28 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies coalesce handling and XDP transmit logic in the STMicroelectronics/Synopsys DesignWare Ethernet (stmmac) driver. This driver targets physical SoC IP cores and vendor-specific PCIe devices that are not emulated in standard virtualized fuzzing 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 402f718670c173380bd5aa6a518e26cb83807ba6
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Sep 23 11:28:48 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 1be5310ca766c..daec9cf9eba16 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -837,6 +837,8 @@ static int __stmmac_set_coalesce(struct net_device *dev,
struct stmmac_priv *priv = netdev_priv(dev);
bool all_queues = false;
unsigned int rx_riwt;
+ bool has_rx;
+ bool has_tx;
u32 max_cnt;
u32 rx_cnt;
u32 tx_cnt;
@@ -850,7 +852,20 @@ static int __stmmac_set_coalesce(struct net_device *dev,
else if (queue >= max_cnt)
return -EINVAL;
- if (priv->use_riwt) {
+ has_rx = all_queues || queue < rx_cnt;
+ has_tx = all_queues || queue < tx_cnt;
+
+ /* An index can be RX-only or TX-only; ignore the missing side. */
+ if (has_tx &&
+ ec->tx_coalesce_usecs == 0 && ec->tx_max_coalesced_frames == 0)
+ return -EINVAL;
+
+ if (has_tx &&
+ (ec->tx_coalesce_usecs > STMMAC_MAX_COAL_TX_TICK ||
+ ec->tx_max_coalesced_frames > STMMAC_TX_MAX_FRAMES))
+ return -EINVAL;
+
+ if (has_rx && priv->use_riwt) {
rx_riwt = stmmac_usec2riwt(ec->rx_coalesce_usecs, priv);
if ((rx_riwt > MAX_DMA_RIWT) || (rx_riwt < MIN_DMA_RIWT))
@@ -866,7 +881,7 @@ static int __stmmac_set_coalesce(struct net_device *dev,
priv->rx_coal_frames[i] =
ec->rx_max_coalesced_frames;
}
- } else if (queue < rx_cnt) {
+ } else {
priv->rx_riwt[queue] = rx_riwt;
stmmac_rx_watchdog(priv, priv->ioaddr,
rx_riwt, queue);
@@ -875,14 +890,6 @@ static int __stmmac_set_coalesce(struct net_device *dev,
}
}
- if ((ec->tx_coalesce_usecs == 0) &&
- (ec->tx_max_coalesced_frames == 0))
- return -EINVAL;
-
- if ((ec->tx_coalesce_usecs > STMMAC_MAX_COAL_TX_TICK) ||
- (ec->tx_max_coalesced_frames > STMMAC_TX_MAX_FRAMES))
- return -EINVAL;
-
if (all_queues) {
int i;
@@ -892,7 +899,7 @@ static int __stmmac_set_coalesce(struct net_device *dev,
priv->tx_coal_timer[i] =
ec->tx_coalesce_usecs;
}
- } else if (queue < tx_cnt) {
+ } else if (has_tx) {
priv->tx_coal_frames[queue] =
ec->tx_max_coalesced_frames;
priv->tx_coal_timer[queue] =
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index d5a984ad864f2..5900b9d08af8e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5255,7 +5255,9 @@ static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
tx_q->tx_count_frames++;
- if (tx_q->tx_count_frames % priv->tx_coal_frames[queue] == 0)
+ if (!priv->tx_coal_frames[queue])
+ set_ic = false;
+ else if (tx_q->tx_count_frames % priv->tx_coal_frames[queue] == 0)
set_ic = true;
else
set_ic = false;
|
| 3/2 | 2026/09/23 11:28 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4017 output: 37 thoughts: 421 Thoughts: **Fuzzing Triage for a Kernel Patch** Okay, so I've been asked to assess this patch for fuzzing suitability with syzkaller. First, let's do a quick risk assessment. This seems straightforward; it's a software evaluation for Linux kernel fuzzing triage. Basically, a benign developer or QA task. No malware concerns, nothing dual-use or related to exploit generation. Purely code analysis and testing strategy. It's a "fulfill directly" situation, great. Now, let's look at the actual patch. It touches `drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c` and `drivers/net/ethernet/stmicro/stmmac/stmmac_main.c`. Hmm, right away I need to check something important. Can I even *reach* this driver in the standard virtualized environments, like GCE or QEMU? We need to remember the "structurally unreachable hardware" caveats. Does it depend on a specific device that is not emulated in the standard environments? Let me quickly consult that section 2 of instructions: checking for things like PCI switches, SmartNICs, GPU drivers requiring physical cards, and code paths specific to non-target architectures. Right. *stmmac*. Okay, that's the STMicroelectronics 10/100/1000 Ethernet driver. Specifically, it uses the Synopsys DesignWare Ethernet QoS/GMAC. So, it's an ethernet driver. Now, the key question: can `stmmac` be emulated, or at least probed, in QEMU or other virt environments? Or is it a PCI device, platform device, something like that which might be problematic? Let me search for `stmmac PCI / platform / emulation` to see what I can find. |
| 4/2 | 2026/09/23 11:29 | tool | grepper |
0mArgs:{
"Expression": "STMMAC",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 2188 lines.\nUse more precise expression if possible.\n\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:2:config STMMAC_ETH\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-3-\ttristate \"STMicroelectronics Multi-Gigabit Ethernet driver\"\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-17-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:18:if STMMAC_ETH\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-19-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:20:config STMMAC_SELFTESTS\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:21:\tbool \"Support for STMMAC Selftests\"\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-22-\tdepends on INET\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-24-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:25:\t This adds support for STMMAC Selftests using ethtool. Enable this\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-26-\t feature if you are facing problems with your HW and submit the test\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-28-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:29:config STMMAC_PLATFORM\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:30:\ttristate \"STMMAC Platform bus support\"\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-31-\tselect MFD_SYSCON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-41-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:42:if STMMAC_PLATFORM\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-43-\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=52=config DWMAC_GENERIC\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-53-\ttristate \"Generic driver for DWMAC\"\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:54:\tdefault STMMAC_PLATFORM\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-55-\thelp\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=364=config DWMAC_VISCONTI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-370-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:371:endif # STMMAC_PLATFORM\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-372-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:373:config STMMAC_LIBPCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-374-\ttristate\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=388=config DWMAC_LOONGSON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-392-\tdepends on COMMON_CLK\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:393:\tselect STMMAC_LIBPCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-394-\thelp\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=398=config DWMAC_MOTORCOMM\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-401-\tselect MOTORCOMM_PHY\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:402:\tselect STMMAC_LIBPCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-403-\thelp\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-406-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:407:config STMMAC_PCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:408:\ttristate \"STMMAC PCI bus support\"\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-409-\tdepends on PCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-410-\tdepends on COMMON_CLK\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:411:\tselect STMMAC_LIBPCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-412-\thelp\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-419-\t If unsure, say N.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:420:endif # STMMAC_ETH\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile-1-# SPDX-License-Identifier: GPL-2.0\ndrivers/net/ethernet/stmicro/stmmac/Makefile:2:obj-$(CONFIG_STMMAC_ETH) += stmmac.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-3-stmmac-objs:= stmmac_main.o stmmac_ethtool.o stmmac_mdio.o ring_mode.o\t\\\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile-11-\ndrivers/net/ethernet/stmicro/stmmac/Makefile:12:stmmac-$(CONFIG_STMMAC_SELFTESTS) += stmmac_selftests.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-13-\ndrivers/net/ethernet/stmicro/stmmac/Makefile-14-# Ordering matters. Generic driver must be last.\ndrivers/net/ethernet/stmicro/stmmac/Makefile:15:obj-$(CONFIG_STMMAC_PLATFORM)\t+= stmmac-platform.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-16-obj-$(CONFIG_DWMAC_ANARION)\t+= dwmac-anarion.o\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile=47=dwmac-altr-socfpga-objs := dwmac-socfpga.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-48-\ndrivers/net/ethernet/stmicro/stmmac/Makefile:49:obj-$(CONFIG_STMMAC_LIBPCI)\t+= stmmac_libpci.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:50:obj-$(CONFIG_STMMAC_PCI)\t+= stmmac-pci.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-51-obj-$(CONFIG_DWMAC_INTEL)\t+= dwmac-intel.o\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c=17=static int jumbo_frm(struct stmmac_tx_queue *tx_q, struct sk_buff *skb,\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-45-\t/* do not close the descriptor and do not set own bit */\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:46:\tstmmac_prepare_tx_desc(priv, desc, 1, buf_len, csum, STMMAC_CHAIN_MODE,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-47-\t\t\t0, false, skb-\u003elen);\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-50-\t\ttx_q-\u003etx_skbuff[entry] = NULL;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:51:\t\tentry = STMMAC_NEXT_ENTRY(entry, priv-\u003edma_conf.dma_tx_size);\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-52-\t\tdesc = tx_q-\u003edma_tx + entry;\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-63-\t\t\tstmmac_prepare_tx_desc(priv, desc, 0, bmax, csum,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:64:\t\t\t\t\tSTMMAC_CHAIN_MODE, 1, false, skb-\u003elen);\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-65-\t\t\tlen -= bmax;\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-77-\t\t\tstmmac_prepare_tx_desc(priv, desc, 0, len, csum,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:78:\t\t\t\t\tSTMMAC_CHAIN_MODE, 1, true, skb-\u003elen);\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-79-\t\t\tlen = 0;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-2-/*******************************************************************************\ndrivers/net/ethernet/stmicro/stmmac/common.h:3: STMMAC Common Header File\ndrivers/net/ethernet/stmicro/stmmac/common.h-4-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-20-#if IS_ENABLED(CONFIG_VLAN_8021Q)\ndrivers/net/ethernet/stmicro/stmmac/common.h:21:#define STMMAC_VLAN_TAG_USED\ndrivers/net/ethernet/stmicro/stmmac/common.h-22-#include \u003clinux/if_vlan.h\u003e\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=49=static inline bool dwmac_is_xmac(enum dwmac_core_type core_type)\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-53-\ndrivers/net/ethernet/stmicro/stmmac/common.h:54:#define STMMAC_CHAN0\t0\t/* Always supported and default for all chips */\ndrivers/net/ethernet/stmicro/stmmac/common.h-55-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-65-#define DMA_DEFAULT_RX_SIZE\t512\ndrivers/net/ethernet/stmicro/stmmac/common.h:66:#define STMMAC_NEXT_ENTRY(x, size)\t((x + 1) \u0026 (size - 1))\ndrivers/net/ethernet/stmicro/stmmac/common.h-67-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=248=struct stmmac_safety_stats {\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-255-/* Number of fields in Safety Stats */\ndrivers/net/ethernet/stmicro/stmmac/common.h:256:#define STMMAC_SAFETY_FEAT_SIZE\t\\\ndrivers/net/ethernet/stmicro/stmmac/common.h-257-\t(sizeof(struct stmmac_safety_stats) / sizeof(unsigned long))\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-328-/* MSI defines */\ndrivers/net/ethernet/stmicro/stmmac/common.h:329:#define STMMAC_MSI_VEC_MAX\t32\ndrivers/net/ethernet/stmicro/stmmac/common.h-330-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-340-/* Tx coalesce parameters */\ndrivers/net/ethernet/stmicro/stmmac/common.h:341:#define STMMAC_COAL_TX_TIMER\t5000\ndrivers/net/ethernet/stmicro/stmmac/common.h:342:#define STMMAC_MAX_COAL_TX_TICK\t100000\ndrivers/net/ethernet/stmicro/stmmac/common.h:343:#define STMMAC_TX_MAX_FRAMES\t256\ndrivers/net/ethernet/stmicro/stmmac/common.h:344:#define STMMAC_TX_FRAMES\t25\ndrivers/net/ethernet/stmicro/stmmac/common.h:345:#define STMMAC_RX_FRAMES\t0\ndrivers/net/ethernet/stmicro/stmmac/common.h-346-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=416=struct dma_features {\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-535-/* Default LPI timers */\ndrivers/net/ethernet/stmicro/stmmac/common.h:536:#define STMMAC_DEFAULT_LIT_LS\t0x3E8\ndrivers/net/ethernet/stmicro/stmmac/common.h:537:#define STMMAC_DEFAULT_TWT_LS\t0x1E\ndrivers/net/ethernet/stmicro/stmmac/common.h:538:#define STMMAC_ET_MAX\t\t0xFFFFF\ndrivers/net/ethernet/stmicro/stmmac/common.h-539-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=565=void stmmac_axi_blen_to_mask(u32 *regval, const u32 *blen, size_t len);\ndrivers/net/ethernet/stmicro/stmmac/common.h-566-\ndrivers/net/ethernet/stmicro/stmmac/common.h:567:#define STMMAC_CHAIN_MODE\t0x1\ndrivers/net/ethernet/stmicro/stmmac/common.h:568:#define STMMAC_RING_MODE\t0x2\ndrivers/net/ethernet/stmicro/stmmac/common.h-569-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-572-/* Receive Side Scaling */\ndrivers/net/ethernet/stmicro/stmmac/common.h:573:#define STMMAC_RSS_HASH_KEY_SIZE\t40\ndrivers/net/ethernet/stmicro/stmmac/common.h:574:#define STMMAC_RSS_MAX_TABLE_SIZE\t256\ndrivers/net/ethernet/stmicro/stmmac/common.h-575-\ndrivers/net/ethernet/stmicro/stmmac/common.h-576-/* VLAN */\ndrivers/net/ethernet/stmicro/stmmac/common.h:577:#define STMMAC_VLAN_NONE\t0x0\ndrivers/net/ethernet/stmicro/stmmac/common.h:578:#define STMMAC_VLAN_REMOVE\t0x1\ndrivers/net/ethernet/stmicro/stmmac/common.h:579:#define STMMAC_VLAN_INSERT\t0x2\ndrivers/net/ethernet/stmicro/stmmac/common.h:580:#define STMMAC_VLAN_REPLACE\t0x3\ndrivers/net/ethernet/stmicro/stmmac/common.h-581-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=36=static int dwc_eth_dwmac_config_dt(struct platform_device *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-89-\tplat_dat-\u003edma_cfg-\u003eaal = 1;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:90:\tplat_dat-\u003eflags |= STMMAC_FLAG_TSO_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-91-\tplat_dat-\u003epmt = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=186=static int tegra_eqos_probe(struct platform_device *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-239-\tplat_dat-\u003ebsp_priv = eqos;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:240:\tplat_dat-\u003eflags |= STMMAC_FLAG_SPH_DISABLE |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:241:\t\t\t STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:242:\t\t\t STMMAC_FLAG_USE_PHY_WOL;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-243-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c=69=static struct platform_driver dwmac_generic_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c-71-\t.driver = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c:72:\t\t.name = STMMAC_RESOURCE_NAME,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c-73-\t\t.pm\t\t= \u0026stmmac_pltfr_pm_ops,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c=361=static struct imx_dwmac_ops imx8mp_dwmac_data = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c-364-\t.set_intf_mode = imx8mp_set_intf_mode,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c:365:\t.flags = STMMAC_FLAG_EEE_DISABLE |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c:366:\t\t STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c:367:\t\t STMMAC_FLAG_KEEP_PREAMBLE_BEFORE_SFD,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c-368-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=358=static int intel_crosststamp(ktime_t *device,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-379-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:380:\tif (priv-\u003eplat-\u003eflags \u0026 STMMAC_FLAG_EXT_SNAPSHOT_EN)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-381-\t\treturn -EBUSY;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-382-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:383:\tpriv-\u003eplat-\u003eflags |= STMMAC_FLAG_INT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-384-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-403-\t\tmutex_unlock(\u0026priv-\u003eaux_ts_lock);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:404:\t\tpriv-\u003eplat-\u003eflags \u0026= ~STMMAC_FLAG_INT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-405-\t\treturn -EINVAL;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-429-\t\t\t\t\t HZ / 100)) {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:430:\t\tpriv-\u003eplat-\u003eflags \u0026= ~STMMAC_FLAG_INT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-431-\t\treturn -ETIMEDOUT;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-455-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:456:\tpriv-\u003eplat-\u003eflags \u0026= ~STMMAC_FLAG_INT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-457-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=596=static void common_default_data(struct plat_stmmacenet_data *plat)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-598-\t/* clk_csr_i = 20-35MHz \u0026 MDC = clk_csr_i/16 */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:599:\tplat-\u003eclk_csr = STMMAC_CSR_20_35M;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-600-\tplat-\u003ecore_type = DWMAC_CORE_GMAC;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=616=static int intel_mgbe_common_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-625-\tplat-\u003ephy_addr = -1;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:626:\tplat-\u003eclk_csr = STMMAC_CSR_250_300M;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-627-\tplat-\u003ecore_type = DWMAC_CORE_GMAC4;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-628-\tplat-\u003eforce_sf_dma_mode = 0;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:629:\tplat-\u003eflags |= (STMMAC_FLAG_TSO_EN | STMMAC_FLAG_SPH_DISABLE);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-630-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-707-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:708:\tplat-\u003eflags |= STMMAC_FLAG_VLAN_FAIL_Q_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-709-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-747-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:748:\tplat-\u003eflags \u0026= ~STMMAC_FLAG_INT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-749-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=760=static int ehl_common_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-766-\tplat-\u003etx_queues_to_use = 8;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:767:\tplat-\u003eflags |= STMMAC_FLAG_USE_PHY_WOL;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:768:\tplat-\u003eflags |= STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-769-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1149=static int stmmac_config_single_msi(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1163-\tres-\u003ewol_irq = res-\u003eirq;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1164:\tplat-\u003eflags \u0026= ~STMMAC_FLAG_MULTI_MSI_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1165-\tdev_info(\u0026pdev-\u003edev, \"%s: Single IRQ enablement successful\\n\",\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1171=static int stmmac_config_multi_msi(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1177-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1178:\tif (plat-\u003emsi_rx_base_vec \u003e= STMMAC_MSI_VEC_MAX ||\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1179:\t plat-\u003emsi_tx_base_vec \u003e= STMMAC_MSI_VEC_MAX) {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1180-\t\tdev_info(\u0026pdev-\u003edev, \"%s: Invalid RX \u0026 TX vector defined\\n\",\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1184-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1185:\tret = pci_alloc_irq_vectors(pdev, 2, STMMAC_MSI_VEC_MAX,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1186-\t\t\t\t PCI_IRQ_MSI | PCI_IRQ_MSIX);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1204-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1205:\tif (plat-\u003emsi_mac_vec \u003c STMMAC_MSI_VEC_MAX)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1206-\t\tres-\u003eirq = pci_irq_vector(pdev, plat-\u003emsi_mac_vec);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1207:\tif (plat-\u003emsi_wol_vec \u003c STMMAC_MSI_VEC_MAX)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1208-\t\tres-\u003ewol_irq = pci_irq_vector(pdev, plat-\u003emsi_wol_vec);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1209:\tif (plat-\u003emsi_sfty_ce_vec \u003c STMMAC_MSI_VEC_MAX)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1210-\t\tres-\u003esfty_ce_irq = pci_irq_vector(pdev, plat-\u003emsi_sfty_ce_vec);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1211:\tif (plat-\u003emsi_sfty_ue_vec \u003c STMMAC_MSI_VEC_MAX)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1212-\t\tres-\u003esfty_ue_irq = pci_irq_vector(pdev, plat-\u003emsi_sfty_ue_vec);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1213-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1214:\tplat-\u003eflags |= STMMAC_FLAG_MULTI_MSI_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1215-\tdev_info(\u0026pdev-\u003edev, \"%s: multi MSI enablement successful\\n\", __func__);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1263=static int intel_eth_pci_probe(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1314-\t * according to platform data settings below.\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1315:\t * Note: MSI vector takes value from 0 upto 31 (STMMAC_MSI_VEC_MAX)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1316-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1317:\tplat-\u003emsi_mac_vec = STMMAC_MSI_VEC_MAX;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1318:\tplat-\u003emsi_wol_vec = STMMAC_MSI_VEC_MAX;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1319:\tplat-\u003emsi_sfty_ce_vec = STMMAC_MSI_VEC_MAX;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1320:\tplat-\u003emsi_sfty_ue_vec = STMMAC_MSI_VEC_MAX;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1321:\tplat-\u003emsi_rx_base_vec = STMMAC_MSI_VEC_MAX;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1322:\tplat-\u003emsi_tx_base_vec = STMMAC_MSI_VEC_MAX;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1323-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=86=static void loongson_default_data(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-94-\t/* clk_csr_i = 100-150MHz \u0026 MDC = clk_csr_i/62 */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:95:\tplat-\u003eclk_csr = STMMAC_CSR_100_150M;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-96-\tplat-\u003ecore_type = DWMAC_CORE_GMAC;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=377=static int loongson_dwmac_msi_config(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-401-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:402:\tplat-\u003eflags |= STMMAC_FLAG_MULTI_MSI_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-403-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c=556=static int mediatek_dwmac_common_data(struct platform_device *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c-563-\tif (priv_plat-\u003emac_wol)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c:564:\t\tplat-\u003eflags \u0026= ~STMMAC_FLAG_USE_PHY_WOL;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c-565-\telse\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c:566:\t\tplat-\u003eflags |= STMMAC_FLAG_USE_PHY_WOL;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c-567-\tplat-\u003eriwt_off = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=208=motorcomm_default_plat_data(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-243-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:244:\tplat-\u003eclk_csr\t\t= STMMAC_CSR_20_35M;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-245-\tplat-\u003etx_coe\t\t= 1;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-250-\tplat-\u003eresume\t\t= motorcomm_resume;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:251:\tplat-\u003eflags\t\t= STMMAC_FLAG_TSO_EN |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:252:\t\t\t\t STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-253-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=264=static int motorcomm_setup_irq(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-275-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:276:\t\tplat-\u003eflags |= STMMAC_FLAG_MULTI_MSI_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-277-\t} else {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c=684=static int qcom_ethqos_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c-771-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c:772:\tplat_dat-\u003eclk_csr = STMMAC_CSR_60_100M;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c-773-\tplat_dat-\u003ebsp_priv = ethqos;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c-781-\tif (of_property_read_bool(np, \"snps,tso\"))\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c:782:\t\tplat_dat-\u003eflags |= STMMAC_FLAG_TSO_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c-783-\tif (of_device_is_compatible(np, \"qcom,qcs404-ethqos\"))\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c:784:\t\tplat_dat-\u003eflags |= STMMAC_FLAG_RX_CLK_RUNS_IN_LPI;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c-785-\tif (data-\u003edma_addr_width)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c=131=static int renesas_gbeth_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-188-\tplat_dat-\u003eexit = renesas_gbeth_exit;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c:189:\tplat_dat-\u003eflags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-190-\t\t\t gbeth-\u003eof_data-\u003estmmac_flags;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c=200=static const struct renesas_gbeth_of_data renesas_gbeth_of_data = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-204-\t.set_clk_tx_rate = true,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c:205:\t.stmmac_flags = STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY |\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c:206:\t\t\tSTMMAC_FLAG_SPH_DISABLE,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-207-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c=209=static const struct renesas_gbeth_of_data renesas_gmac_of_data = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-211-\t.num_clks = ARRAY_SIZE(renesas_gmac_clks),\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c:212:\t.stmmac_flags = STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-213-\t.has_pcs = true,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c=113=static void s32_gmac_setup_multi_irq(struct device *dev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-134-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c:135:\tplat-\u003eflags |= STMMAC_FLAG_MULTI_MSI_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-136-\tdev_info(dev, \"Multi-IRQ mode (per queue IRQs) selected\\n\");\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-139-mac_irq_mode:\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c:140:\tplat-\u003eflags \u0026= ~STMMAC_FLAG_MULTI_MSI_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-141-\tdev_info(dev, \"MAC IRQ mode selected\\n\");\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c=144=static int s32_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-197-\tplat-\u003epmt = true;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c:198:\tplat-\u003eflags |= STMMAC_FLAG_SPH_DISABLE;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-199-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c=294=static int smtg_crosststamp(ktime_t *device, struct system_counterval_t *system,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c-309-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:310:\tif (priv-\u003eplat-\u003eflags \u0026 STMMAC_FLAG_EXT_SNAPSHOT_EN)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c-311-\t\treturn -EBUSY;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c=569=static void socfpga_agilex5_setup_plat_dat(struct socfpga_dwmac *dwmac)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c-575-\t/* Enable TSO */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:576:\tplat_dat-\u003eflags |= STMMAC_FLAG_TSO_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c-577-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c=19=static int sophgo_sg2044_dwmac_init(struct platform_device *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c-27-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c:28:\tplat_dat-\u003eflags |= STMMAC_FLAG_SPH_DISABLE;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c-29-\tplat_dat-\u003eset_clk_tx_rate = stmmac_set_clk_tx_rate;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c=90=static int starfive_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c-149-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:150:\tplat_dat-\u003eflags |= (STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP | STMMAC_FLAG_SPH_DISABLE);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c-151-\tplat_dat-\u003edma_cfg-\u003edche = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c=525=static int stm32_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c-559-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:560:\tplat_dat-\u003eflags |= STMMAC_FLAG_EN_TX_LPI_CLK_PHY_CAP;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c-561-\tplat_dat-\u003ebsp_priv = dwmac;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c=105=static int sun55i_gmac200_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c-121-\t/* BSP disables it */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c:122:\tplat_dat-\u003eflags |= STMMAC_FLAG_SPH_DISABLE;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c-123-\tplat_dat-\u003ehost_dma_width = 32;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c=1105=static int sun8i_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1180-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c:1181:\tplat_dat-\u003erx_coe = STMMAC_RX_COE_TYPE2;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1182-\tplat_dat-\u003etx_coe = true;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c:1183:\tplat_dat-\u003eflags |= STMMAC_FLAG_HAS_SUN8I;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1184-\tplat_dat-\u003ebsp_priv = gmac;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c=214=static int tegra_mgbe_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c-326-\tplat-\u003ecore_type = DWMAC_CORE_XGMAC;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c:327:\tplat-\u003eflags |= STMMAC_FLAG_TSO_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c-328-\tplat-\u003epmt = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c-373-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c:374:\tplat-\u003eflags |= STMMAC_FLAG_SERDES_UP_AFTER_PHY_LINKUP;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c-375-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c=40=static void dwmac1000_core_init(struct mac_device_info *hw,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-59-\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:60:#ifdef STMMAC_VLAN_TAG_USED\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-61-\t/* Tag detection without filtering */\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c=124=static void dwmac1000_set_mchash(void __iomem *ioaddr, u32 *mcfilterbits,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-140-\tdefault:\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:141:\t\tpr_debug(\"STMMAC: err in setting multicast filter\\n\");\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-142-\t\treturn;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c=318=static int dwmac1000_set_lpi_mode(struct mac_device_info *hw,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-324-\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:325:\tif (mode == STMMAC_LPI_TIMER)\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-326-\t\treturn -EOPNOTSUPP;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-328-\tvalue = readl(ioaddr + LPI_CTRL_STATUS);\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:329:\tif (mode == STMMAC_LPI_FORCED)\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-330-\t\tvalue |= LPI_CTRL_STATUS_LPIEN | LPI_CTRL_STATUS_LPITXA;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c=523=void dwmac1000_timestamp_interrupt(struct stmmac_priv *priv)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-533-\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:534:\tif (!(priv-\u003eplat-\u003eflags \u0026 STMMAC_FLAG_EXT_SNAPSHOT_EN))\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-535-\t\treturn;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c=567=int dwmac1000_ptp_enable(struct ptp_clock_info *ptp,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-583-\t\t\ttcr_val |= GMAC_PTP_TCR_ATSFC;\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:584:\t\t\tpriv-\u003eplat-\u003eflags |= STMMAC_FLAG_EXT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-585-\t\t} else {\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-586-\t\t\ttcr_val \u0026= ~GMAC_PTP_TCR_ATSEN0;\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c:587:\t\t\tpriv-\u003eplat-\u003eflags \u0026= ~STMMAC_FLAG_EXT_SNAPSHOT_EN;\ndrivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c-588-\t\t}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac100_core.c=22=static void dwmac100_core_init(struct mac_device_info *hw,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac100_core.c-31-\ndrivers/net/ethernet/stmicro/stmmac/dwmac100_core.c:32:#ifdef STMMAC_VLAN_TAG_USED\ndrivers/net/ethernet/stmicro/stmmac/dwmac100_core.c-33-\twritel(ETH_P_8021Q, ioaddr + MAC_VLAN1);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c=386=static int dwmac4_set_lpi_mode(struct mac_device_info *hw,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c-392-\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:393:\tif (mode == STMMAC_LPI_DISABLE) {\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c-394-\t\tvalue = 0;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c-397-\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:398:\t\tif (mode == STMMAC_LPI_TIMER) {\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c-399-\t\t\t/* Return ERANGE if the timer is larger than the\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c-401-\t\t\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:402:\t\t\tif (et \u003e STMMAC_ET_MAX)\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_core.c-403-\t\t\t\treturn -ERANGE;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c=199=void stmmac_dwmac4_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c-208-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c:209:\tdata |= FIELD_PREP(GMAC_HI_DCS, STMMAC_CHAN0);\ndrivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c-210-\twritel(data | GMAC_HI_REG_AE, ioaddr + high);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h-6-\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h:7:#ifndef __STMMAC_DWXGMAC2_H__\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h:8:#define __STMMAC_DWXGMAC2_H__\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h-9-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h=468=extern const struct stmmac_desc_ops dwxgmac210_desc_ops;\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h-469-\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2.h:470:#endif /* __STMMAC_DWXGMAC2_H__ */\n--\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c=428=static int dwxgmac2_set_lpi_mode(struct mac_device_info *hw,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c-434-\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c:435:\tif (mode == STMMAC_LPI_TIMER)\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c-436-\t\treturn -EOPNOTSUPP;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c-438-\tvalue = readl(ioaddr + XGMAC_LPI_CTRL);\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c:439:\tif (mode == STMMAC_LPI_FORCED) {\ndrivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c-440-\t\tvalue |= LPI_CTRL_STATUS_LPIEN | LPI_CTRL_STATUS_LPITXA;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwxlgmac2.h-6-\ndrivers/net/ethernet/stmicro/stmmac/dwxlgmac2.h:7:#ifndef __STMMAC_DWXLGMAC2_H__\n\n"
} |
| 5/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19580 output: 42 thoughts: 764 Thoughts: **My Assessment of the `stmmac` Driver's Fuzzing Potential** Okay, let's break this down. I'm looking at `stmmac`, the Ethernet MAC driver for STMicroelectronics and Synopsys DesignWare hardware. The key question in my mind is: can I effectively fuzz this driver in a standard environment, specifically QEMU? Does QEMU even *emulate* `stmmac` or a similar DWMAC device? I need to focus on the target architecture, which in this case is `amd64`. I start by considering the device emulation within QEMU. Does QEMU offer a virtual PCI device or some other virtual device that's compatible with `stmmac` on `amd64`? I see there are PCI drivers associated with it, `DWMAC_INTEL`, with `intel_eth_pci_probe`, and `STMMAC_PCI` from `stmmac-pci.c`, but does the standard QEMU setup that I'm familiar with – e1000, e1000e, igb, rtl8139, virtio-net, vmxnet3, pcnet, ne2k_pci, etc. – provide that? No, it doesn't. Now, I consider syzkaller. Does syzkaller include any fuzzing for `stmmac`? That's another avenue to explore. Then, I need to revisit the provided criteria. Section 2 dictates when I should *not* fuzz. I need to be sure any modifications don't fall strictly into one of the "NEGATIVE CRITERIA": * Non-kernel changes (documentation, comments, user-space tools). * Structurally unreachable hardware: PCIe switches, SmartNICs, GPU drivers (e.g., mlxsw, pds\_core, qed, ionic, amdgpu) that aren't emulated in standard QEMU. * Unreachable execution paths (driver teardown callbacks, code exclusive to different architectures). Section 1 is the primary gate: reachability. Fuzzing is only useful if the code is executable in standard virtualized environments. If the code is unreachable, forget it, even if it has added assertions or complexity. So, can `stmmac` even be probed or instantiated without physical hardware? Maybe through a platform device or device tree? Or, does QEMU emulate *any* `stmmac` device on x86\_64? To answer this, I'll need to check the drivers themselves. I need to go back and examine `stmmac-pci.c` and `dwmac-intel.c`. I need to figure out what PCI devices are supported by `stmmac`. The whole question hinges on whether the device is reachable in the emulated environment. |
| 6/2 | 2026/09/23 11:29 | tool | grepper |
0mArgs:{
"Expression": "MODULE_DEVICE_TABLE\\(pci",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1395=static const struct pci_device_id intel_eth_pci_id_table[] = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1414-};\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1415:MODULE_DEVICE_TABLE(pci, intel_eth_pci_id_table);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1416-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=596=static const struct pci_device_id loongson_dwmac_id_table[] = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-601-};\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:602:MODULE_DEVICE_TABLE(pci, loongson_dwmac_id_table);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-603-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=367=static const struct pci_device_id dwmac_motorcomm_pci_id_table[] = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-370-};\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:371:MODULE_DEVICE_TABLE(pci, dwmac_motorcomm_pci_id_table);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-372-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=203=static const struct pci_device_id stmmac_id_table[] = {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-209-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:210:MODULE_DEVICE_TABLE(pci, stmmac_id_table);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-211-\n"
} |
| 7/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21636 output: 50 thoughts: 14 Thoughts: Here's a summary of my thought process, as requested: **Diving into `stmmac_pci.c`** Okay, time to get to the heart of the matter. I need to understand what's happening with this `stmmac` driver in the context of a PCI interface. So, my initial focus is going to be on the `stmmac_pci.c` file. This is where the PCI-specific initialization, resource allocation, and likely interrupt handling for the Synopsys Ethernet MAC should reside. I expect to find the crucial glue code that connects the generic `stmmac` driver to the PCI bus. I'm looking for how they are handling PCI device probe and removal and where they are getting the memory-mapped I/O base addresses and interrupt numbers. This file should be a key access point to understand the interaction between the driver and the PCI bus. Let's see what we can find. |
| 8/2 | 2026/09/23 11:29 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c",
"FirstLine": 195,
"LineCount": 40
}Results: {
"Contents": " 195:\t}\n 196:\t\n 197:\t/* synthetic ID, no official vendor */\n 198:\t#define PCI_VENDOR_ID_STMMAC\t\t0x0700\n 199:\t\n 200:\t#define PCI_DEVICE_ID_STMMAC_STMMAC\t\t0x1108\n 201:\t#define PCI_DEVICE_ID_SYNOPSYS_GMAC5_ID\t\t0x7102\n 202:\t\n 203:\tstatic const struct pci_device_id stmmac_id_table[] = {\n 204:\t\t{ PCI_DEVICE_DATA(STMMAC, STMMAC, \u0026stmmac_pci_info) },\n 205:\t\t{ PCI_DEVICE_DATA(STMICRO, MAC, \u0026stmmac_pci_info) },\n 206:\t\t{ PCI_DEVICE_DATA(SYNOPSYS, GMAC5_ID, \u0026snps_gmac5_pci_info) },\n 207:\t\t{}\n 208:\t};\n 209:\t\n 210:\tMODULE_DEVICE_TABLE(pci, stmmac_id_table);\n 211:\t\n 212:\tstatic struct pci_driver stmmac_pci_driver = {\n 213:\t\t.name = STMMAC_RESOURCE_NAME,\n 214:\t\t.id_table = stmmac_id_table,\n 215:\t\t.probe = stmmac_pci_probe,\n 216:\t\t.remove = stmmac_pci_remove,\n 217:\t\t.driver = {\n 218:\t\t\t.pm = \u0026stmmac_simple_pm_ops,\n 219:\t\t},\n 220:\t};\n 221:\t\n 222:\tmodule_pci_driver(stmmac_pci_driver);\n 223:\t\n 224:\tMODULE_DESCRIPTION(\"STMMAC 10/100/1000 Ethernet PCI driver\");\n 225:\tMODULE_AUTHOR(\"Rayagond Kokatanur \u003crayagond.kokatanur@vayavyalabs.com\u003e\");\n 226:\tMODULE_AUTHOR(\"Giuseppe Cavallaro \u003cpeppe.cavallaro@st.com\u003e\");\n 227:\tMODULE_LICENSE(\"GPL\");\n"
} |
| 9/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22517 output: 49 thoughts: 39 Thoughts: Here's a summary of my thought process, as requested: **Investigating the Intel Ethernet PCI ID Table** Okay, so I need to track down how this Intel Ethernet device is being identified and handled within the kernel. My initial thought is to zero in on the `intel_eth_pci_id_table` data structure. Given the context of a STMicroelectronics Ethernet driver, `stmmac`, it makes sense to start looking within the `drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c` file. This is where I would expect to find the specific PCI device IDs that this driver recognizes for Intel Ethernet controllers, which in turn informs the driver’s initialization and attachment procedures. Let's see what's in there. |
| 10/2 | 2026/09/23 11:29 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c",
"FirstLine": 1395,
"LineCount": 40
}Results: {
"Contents": "1395:\tstatic const struct pci_device_id intel_eth_pci_id_table[] = {\n1396:\t\t{ PCI_DEVICE_DATA(INTEL, QUARK, \u0026quark_info) },\n1397:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_RGMII1G, \u0026ehl_rgmii1g_info) },\n1398:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_SGMII1G, \u0026ehl_sgmii1g_info) },\n1399:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_SGMII2G5, \u0026ehl_sgmii1g_info) },\n1400:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_RGMII1G, \u0026ehl_pse0_rgmii1g_info) },\n1401:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII1G, \u0026ehl_pse0_sgmii1g_info) },\n1402:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII2G5, \u0026ehl_pse0_sgmii1g_info) },\n1403:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_RGMII1G, \u0026ehl_pse1_rgmii1g_info) },\n1404:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII1G, \u0026ehl_pse1_sgmii1g_info) },\n1405:\t\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII2G5, \u0026ehl_pse1_sgmii1g_info) },\n1406:\t\t{ PCI_DEVICE_DATA(INTEL, TGL_SGMII1G, \u0026tgl_sgmii1g_phy0_info) },\n1407:\t\t{ PCI_DEVICE_DATA(INTEL, TGLH_SGMII1G_0, \u0026tgl_sgmii1g_phy0_info) },\n1408:\t\t{ PCI_DEVICE_DATA(INTEL, TGLH_SGMII1G_1, \u0026tgl_sgmii1g_phy1_info) },\n1409:\t\t{ PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_0, \u0026adls_sgmii1g_phy0_info) },\n1410:\t\t{ PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_1, \u0026adls_sgmii1g_phy1_info) },\n1411:\t\t{ PCI_DEVICE_DATA(INTEL, ADLN_SGMII1G, \u0026adln_sgmii1g_phy0_info) },\n1412:\t\t{ PCI_DEVICE_DATA(INTEL, RPLP_SGMII1G, \u0026adln_sgmii1g_phy0_info) },\n1413:\t\t{}\n1414:\t};\n1415:\tMODULE_DEVICE_TABLE(pci, intel_eth_pci_id_table);\n1416:\t\n1417:\tstatic struct pci_driver intel_eth_pci_driver = {\n1418:\t\t.name = \"intel-eth-pci\",\n1419:\t\t.id_table = intel_eth_pci_id_table,\n1420:\t\t.probe = intel_eth_pci_probe,\n1421:\t\t.remove = intel_eth_pci_remove,\n1422:\t\t.driver = {\n1423:\t\t\t.pm = \u0026stmmac_simple_pm_ops,\n1424:\t\t},\n1425:\t};\n1426:\t\n1427:\tmodule_pci_driver(intel_eth_pci_driver);\n1428:\t\n1429:\tMODULE_DESCRIPTION(\"INTEL 10/100/1000 Ethernet PCI driver\");\n1430:\tMODULE_AUTHOR(\"Voon Weifeng \u003cweifeng.voon@intel.com\u003e\");\n1431:\tMODULE_LICENSE(\"GPL v2\");\n"
} |
| 11/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23816 output: 36 thoughts: 903 Thoughts: **Analyzing QEMU Emulation and Syzkaller Coverage** Okay, so I'm trying to figure out if specific hardware, specifically ethernet controllers like stmmac or dwmac (found on Intel Elkhart Lake, Tiger Lake, and Quark), are emulated within QEMU. I know QEMU emulates dwmac/stmmac for some ARM boards, but I need to see about x86. I'm wondering if something like the `allwinner-a10` has this, even though it's ARM. Time to check the QEMU source, specifically `hw/net/`. Okay, scanning through that directory confirms my suspicion: QEMU *doesn't* appear to have stmmac or dwmac emulation for x86. Now, let's step back and consider the context of fuzzing this. The target architecture is amd64, and I need to determine if any changes would be *worth* fuzzing according to the document. The document lists some criteria for when it's *not* worth fuzzing, specifically structurally unreachable hardware. That includes vendor-specific devices or drivers that require specific hardware not emulated in QEMU. Given that stmmac and dwmac aren't in QEMU, the question now becomes: is stmmac/dwmac *structurally unreachable* in the context of fuzzing? Can syzkaller reach it? So, how does syzkaller create network devices? It has several methods: tun, tap, veth, dummy, nlmon, netdevsim, macvlan, ipvlan, vxlan, wireguard, etc., USB net devices, and PCI devices emulated by QEMU. Can syzkaller instantiate stmmac? I need to figure out if stmmac supports any of these syzkaller instantiation methods. Since stmmac is Ethernet MAC for SoC/PCI, I'm thinking about whether it has USB, dummy, or virtual drivers or platform devices that can be created from user space. And I don't think that's the case. It is probably not possible to create platform devices from user space *unless* it supports configfs or something similar. So, I need to check to see if stmmac has any kind of user-space instantiation. |
| 12/2 | 2026/09/23 11:29 | tool | grepper |
0mError:no matches Args: {
"Expression": "configfs",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"error": "no matches"
} |
| 13/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25257 output: 23 thoughts: 35 Thoughts: Okay, let's see. My first thought is: **Can stmmac be used virtually?** I need to quickly figure out if the stmmac driver can be loaded as a module or probed without any actual hardware present. I'm wondering if there are any virtual or mock implementations out there that would allow me to work with it in a more flexible environment. I need to investigate this further. I'm going to start digging to see if there are any obvious virtual stmmac drivers or perhaps mock driver implementations available. |
| 14/2 | 2026/09/23 11:29 | tool | grepper |
0mError:no matches Args: {
"Expression": "platform_device_register.*stmmac"
}Results: {
"error": "no matches"
} |
| 15/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25440 output: 38 thoughts: 91 Thoughts: Okay, here's my thought process on this, distilled into a first-person summary as you requested, geared towards someone who's already familiar with the inner workings of syzkaller and kernel fuzzing: **Investigating stmmac and its Fuzzing Potential** Alright, my first instinct is always to assess the current state of play. Before diving too deep, I need to know if syzkaller has *ever* touched `stmmac` or if we're dealing with something fundamentally challenging. My initial concerns are: Is this a driver that's been overlooked, or does it require some specialized hardware interaction? Specifically, is `stmmac` so tightly coupled with vendor-specific NIC ASICs or PCIe hardware that QEMU, in its standard configuration, simply can't emulate it effectively? If that's the case, we're talking about a significant hurdle. Before running any scripts, let's establish a baseline using Git. The log is a far better starting point than searching blind. So, let's pivot and start with `git log` specifically for the `stmmac` driver. Maybe someone’s already done some work and I can find a relevant patch. Let's start with a focused search, focusing on recent commits, specifically in `drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c`. That should give me a quick sense of recent activity and potential areas of interest within the driver itself. This will establish if we are potentially on a hot trail, or if it is a dead end. |
| 16/2 | 2026/09/23 11:29 | tool | grepper |
0mError:no matches Args: {
"Expression": "Reported-by: syzbot",
"PathPrefix": "drivers/net/ethernet/stmicro/"
}Results: {
"error": "no matches"
} |
| 17/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25917 output: 46 thoughts: 178 Thoughts: Here's my analysis of the situation: **Investigating the Absence of Reported `stmmac` Bugs** Okay, so I see there are zero bug reports from syzbot in the `drivers/net/ethernet/stmicro/` directory. That's... interesting. First things first, I need to check if there's any relevant `stmmac`-related information in syzkaller's syzlang descriptions. But I have to remember that crucial warning about the tool: I *cannot* rely on it for anything involving syzkaller's descriptions – you know, files like `dev_*.txt` or `socket_*.txt` or anything with "long syz_". Those are pseudo-syscalls and aren't in the actual kernel. Not helpful in this specific search. Right, so that's a dead end, given the tool's limitations. Now, let's switch gears and actually look into the code itself. I'll need to figure out what's going on in this part of the driver. My next step will be to examine the HEAD commit log, or maybe the surrounding commits in `drivers/net/ethernet/stmicro/stmmac/`. I need to understand what this recent code changes were about (if there were any). A look at the commit message, if it exists, would be the starting point. Or, I can backtrack and see what the *previous* commit did. That should offer some hints, as well. Let's see what the code history has to say. |
| 18/2 | 2026/09/23 11:29 | tool | grepper |
0mArgs:{
"Expression": "stmmac_xdp_xmit_xdpf",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/stmmac_main.c=5168=static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5202-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5203:static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5204-\t\t\t\tstruct xdp_frame *xdpf, bool dma_map)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=5295=static int stmmac_xdp_xmit_back(struct stmmac_priv *priv,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5315-\t/* For zero copy XDP_TX action, dma_map is true */\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5316:\tres = stmmac_xdp_xmit_xdpf(priv, queue, xdpf, zc);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5317-\tif (res == STMMAC_XDP_TX) {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=6977=static int stmmac_xdp_xmit(struct net_device *dev, int num_frames,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-7001-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7002:\t\tres = stmmac_xdp_xmit_xdpf(priv, queue, frames[i], true);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-7003-\t\tif (res == STMMAC_XDP_CONSUMED)\n"
} |
| 19/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 27041 output: 50 thoughts: 67 Thoughts: Here's my summary, as though I'm thinking through this myself: **Investigating STMMAC Driver Functionality** Okay, I need to dive into some STMMAC code. I'm focusing specifically on the driver's core logic and its ethtool implementation. My initial target is `drivers/net/ethernet/stmicro/stmmac/stmmac_main.c` around line 5255. I suspect that section will contain the core driver functionality; I'll start there to get the big picture. I'm hoping to understand how it handles a specific functionality. I also need to investigate `drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c` around line 837. This is the ethtool interface, so that's likely where I'll find the relevant configuration options or reporting mechanisms. By examining these two sections in tandem, I should be able to cross-reference the driver’s actions with ethtool's interaction with the user, providing a complete overview. |
| 20/2 | 2026/09/23 11:29 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/stmmac_main.c",
"FirstLine": 5245,
"LineCount": 40
}Results: {
"Contents": "5245:\t\t\t\t\tfalse);\n5246:\t\tstmmac_set_tx_dma_last_segment(tx_q, entry);\n5247:\t\n5248:\t\ttx_q-\u003exdpf[entry] = xdpf;\n5249:\t\n5250:\t\tstmmac_set_desc_addr(priv, tx_desc, dma_addr);\n5251:\t\n5252:\t\tstmmac_prepare_tx_desc(priv, tx_desc, 1, xdpf-\u003elen,\n5253:\t\t\t\t csum, priv-\u003edescriptor_mode, true, true,\n5254:\t\t\t\t xdpf-\u003elen);\n5255:\t\n5256:\t\ttx_q-\u003etx_count_frames++;\n5257:\t\n5258:\t\tif (!priv-\u003etx_coal_frames[queue])\n5259:\t\t\tset_ic = false;\n5260:\t\telse if (tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue] == 0)\n5261:\t\t\tset_ic = true;\n5262:\t\telse\n5263:\t\t\tset_ic = false;\n5264:\t\n5265:\t\tif (set_ic) {\n5266:\t\t\ttx_q-\u003etx_count_frames = 0;\n5267:\t\t\tstmmac_set_tx_ic(priv, tx_desc);\n5268:\t\t\tu64_stats_update_begin(\u0026txq_stats-\u003eq_syncp);\n5269:\t\t\tu64_stats_inc(\u0026txq_stats-\u003eq.tx_set_ic_bit);\n5270:\t\t\tu64_stats_update_end(\u0026txq_stats-\u003eq_syncp);\n5271:\t\t}\n5272:\t\n5273:\t\tstmmac_enable_dma_transmission(priv, priv-\u003eioaddr, queue);\n5274:\t\n5275:\t\tentry = STMMAC_NEXT_ENTRY(entry, priv-\u003edma_conf.dma_tx_size);\n5276:\t\ttx_q-\u003ecur_tx = entry;\n5277:\t\n5278:\t\treturn STMMAC_XDP_TX;\n5279:\t}\n5280:\t\n5281:\tstatic int stmmac_xdp_get_tx_queue(struct stmmac_priv *priv,\n5282:\t\t\t\t\t int cpu)\n5283:\t{\n5284:\t\tint index = cpu;\n"
} |
| 21/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 28054 output: 51 thoughts: 16 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing the `stmmac_ethtool.c` Implementation** Right, let's dive into the `stmmac_ethtool.c` file. My initial focus is always on the fundamental interaction points with the ethtool framework. I need to quickly grasp how the driver integrates with ethtool, specifically: * **Initialization:** How does it register its ethtool operations? What's the entry point? I expect a well-defined `struct ethtool_ops` or a similar structure being populated and registered with the core network device code. I'll be looking for things like `set_*, get_*` functions defined for various ethtool features. * **Function Handlers:** I'll be scrutinizing the actual implementations of those `set_*` and `get_*` functions. Are they well-structured? Do they handle errors gracefully? Are there any obvious race conditions or locking issues? I'm particularly interested in how they interact with the hardware registers and internal driver data structures. The level of abstraction used here is going to be important; are they using the MAC/DMA layer directly, or do they go through some intermediary API? * **Feature Support:** What ethtool features are supported? I'm looking for things like speed/duplex configuration, statistics retrieval, link status queries, and maybe even advanced features like VLAN configuration or flow control management. The completeness of the support gives a good overview of how well developed this section of the driver is. * **Error Handling:** Proper error handling within these functions is a must-have. What happens if a setting is invalid? What if the hardware is unresponsive? Are errors propagated correctly back to the user space? * **Concurrency:** Given the likely multithreaded environment in which the networking stack operates, how is concurrency handled? Are there any explicit locks being used? Are those locks appropriately scoped and released? Is there a spinlock at a low level that the function is utilizing? Are there any potential deadlocks? |
| 22/2 | 2026/09/23 11:29 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c",
"FirstLine": 835,
"LineCount": 80
}Results: {
"Contents": " 835:\t\t\t\t\t int queue)\n 836:\t{\n 837:\t\tstruct stmmac_priv *priv = netdev_priv(dev);\n 838:\t\tbool all_queues = false;\n 839:\t\tunsigned int rx_riwt;\n 840:\t\tbool has_rx;\n 841:\t\tbool has_tx;\n 842:\t\tu32 max_cnt;\n 843:\t\tu32 rx_cnt;\n 844:\t\tu32 tx_cnt;\n 845:\t\n 846:\t\trx_cnt = priv-\u003eplat-\u003erx_queues_to_use;\n 847:\t\ttx_cnt = priv-\u003eplat-\u003etx_queues_to_use;\n 848:\t\tmax_cnt = max(rx_cnt, tx_cnt);\n 849:\t\n 850:\t\tif (queue \u003c 0)\n 851:\t\t\tall_queues = true;\n 852:\t\telse if (queue \u003e= max_cnt)\n 853:\t\t\treturn -EINVAL;\n 854:\t\n 855:\t\thas_rx = all_queues || queue \u003c rx_cnt;\n 856:\t\thas_tx = all_queues || queue \u003c tx_cnt;\n 857:\t\n 858:\t\t/* An index can be RX-only or TX-only; ignore the missing side. */\n 859:\t\tif (has_tx \u0026\u0026\n 860:\t\t ec-\u003etx_coalesce_usecs == 0 \u0026\u0026 ec-\u003etx_max_coalesced_frames == 0)\n 861:\t\t\treturn -EINVAL;\n 862:\t\n 863:\t\tif (has_tx \u0026\u0026\n 864:\t\t (ec-\u003etx_coalesce_usecs \u003e STMMAC_MAX_COAL_TX_TICK ||\n 865:\t\t ec-\u003etx_max_coalesced_frames \u003e STMMAC_TX_MAX_FRAMES))\n 866:\t\t\treturn -EINVAL;\n 867:\t\n 868:\t\tif (has_rx \u0026\u0026 priv-\u003euse_riwt) {\n 869:\t\t\trx_riwt = stmmac_usec2riwt(ec-\u003erx_coalesce_usecs, priv);\n 870:\t\n 871:\t\t\tif ((rx_riwt \u003e MAX_DMA_RIWT) || (rx_riwt \u003c MIN_DMA_RIWT))\n 872:\t\t\t\treturn -EINVAL;\n 873:\t\n 874:\t\t\tif (all_queues) {\n 875:\t\t\t\tint i;\n 876:\t\n 877:\t\t\t\tfor (i = 0; i \u003c rx_cnt; i++) {\n 878:\t\t\t\t\tpriv-\u003erx_riwt[i] = rx_riwt;\n 879:\t\t\t\t\tstmmac_rx_watchdog(priv, priv-\u003eioaddr,\n 880:\t\t\t\t\t\t\t rx_riwt, i);\n 881:\t\t\t\t\tpriv-\u003erx_coal_frames[i] =\n 882:\t\t\t\t\t\tec-\u003erx_max_coalesced_frames;\n 883:\t\t\t\t}\n 884:\t\t\t} else {\n 885:\t\t\t\tpriv-\u003erx_riwt[queue] = rx_riwt;\n 886:\t\t\t\tstmmac_rx_watchdog(priv, priv-\u003eioaddr,\n 887:\t\t\t\t\t\t rx_riwt, queue);\n 888:\t\t\t\tpriv-\u003erx_coal_frames[queue] =\n 889:\t\t\t\t\tec-\u003erx_max_coalesced_frames;\n 890:\t\t\t}\n 891:\t\t}\n 892:\t\n 893:\t\tif (all_queues) {\n 894:\t\t\tint i;\n 895:\t\n 896:\t\t\tfor (i = 0; i \u003c tx_cnt; i++) {\n 897:\t\t\t\tpriv-\u003etx_coal_frames[i] =\n 898:\t\t\t\t\tec-\u003etx_max_coalesced_frames;\n 899:\t\t\t\tpriv-\u003etx_coal_timer[i] =\n 900:\t\t\t\t\tec-\u003etx_coalesce_usecs;\n 901:\t\t\t}\n 902:\t\t} else if (has_tx) {\n 903:\t\t\tpriv-\u003etx_coal_frames[queue] =\n 904:\t\t\t\tec-\u003etx_max_coalesced_frames;\n 905:\t\t\tpriv-\u003etx_coal_timer[queue] =\n 906:\t\t\t\tec-\u003etx_coalesce_usecs;\n 907:\t\t}\n 908:\t\n 909:\t\treturn 0;\n 910:\t}\n 911:\t\n 912:\tstatic int stmmac_set_coalesce(struct net_device *dev,\n 913:\t\t\t\t struct ethtool_coalesce *ec,\n 914:\t\t\t\t struct kernel_ethtool_coalesce *kernel_coal,\n"
} |
| 23/2 | 2026/09/23 11:29 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29844 output: 39 thoughts: 330 Thoughts: **Analyzing a Kernel Bug Fix** Okay, let's break this down. I'm looking at a fix in the `__stmmac_set_coalesce` function. The code seems to be addressing a potential division-by-zero error, and I need to figure out the root cause. Specifically, the problematic line is: `if (has_tx && ec->tx_coalesce_usecs == 0 && ec->tx_max_coalesced_frames == 0)` My initial thought is, "Aha! If `ec->tx_max_coalesced_frames` is zero, or if it's an RX-only queue, `priv->tx_coal_frames[queue]` *could* be zero!" That's the key. This variable, `priv->tx_coal_frames[queue]`, is used for coalescing frames, and if it's zero, we have a problem. The code in `stmmac_xdp_xmit_xdpf` is where the error surfaces: `if (tx_q->tx_count_frames % priv->tx_coal_frames[queue] == 0)` And there it is! Division by zero if `priv->tx_coal_frames[queue]` is zero, which means a kernel crash. The fix, therefore, is crucial. The patch now checks for that zero value: ```c if (!priv->tx_coal_frames[queue]) set_ic = false; else if (tx_q->tx_count_frames % priv->tx_coal_frames[queue] == 0) set_ic = true; else set_ic = false; ``` It's a straightforward conditional check. If the coalescing frame count is zero, then we don't attempt the modulo operation. The original fix also addressed the cases where a queue might be RX-only or TX-only using `has_rx` and `has_tx`. Makes sense. Now, I'm going to dig deeper. I want to understand *why* this bug emerged. What was the trigger? What conditions led to `priv->tx_coal_frames[queue]` being incorrectly set to zero? I'll search the Git commit logs for "tx_coal_frames" or related keywords to see if there's any discussion or context behind this change. |
| 24/2 | 2026/09/23 11:30 | tool | grepper |
0mArgs:{
"Expression": "tx_coal_frames",
"PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/stmmac.h=261=struct stmmac_priv {\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-262-\t/* Frequently used values are kept adjacent for cache effect */\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:263:\tu32 tx_coal_frames[MTL_MAX_TX_QUEUES];\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-264-\tu32 tx_coal_timer[MTL_MAX_TX_QUEUES];\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c=781=static int __stmmac_get_coalesce(struct net_device *dev,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-800-\t\tec-\u003etx_coalesce_usecs = priv-\u003etx_coal_timer[queue];\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:801:\t\tec-\u003etx_max_coalesced_frames = priv-\u003etx_coal_frames[queue];\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-802-\t} else {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c=833=static int __stmmac_set_coalesce(struct net_device *dev,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-896-\t\tfor (i = 0; i \u003c tx_cnt; i++) {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:897:\t\t\tpriv-\u003etx_coal_frames[i] =\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-898-\t\t\t\tec-\u003etx_max_coalesced_frames;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-902-\t} else if (has_tx) {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:903:\t\tpriv-\u003etx_coal_frames[queue] =\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-904-\t\t\tec-\u003etx_max_coalesced_frames;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=2681=static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-2743-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2744:\t\tif (!priv-\u003etx_coal_frames[queue])\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-2745-\t\t\tset_ic = false;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:2746:\t\telse if (tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue] == 0)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-2747-\t\t\tset_ic = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=3382=static void stmmac_init_coalesce(struct stmmac_priv *priv)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-3390-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:3391:\t\tpriv-\u003etx_coal_frames[chan] = STMMAC_TX_FRAMES;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-3392-\t\tpriv-\u003etx_coal_timer[chan] = STMMAC_COAL_TX_TIMER;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=4516=static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4645-\t\tset_ic = true;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4646:\telse if (!priv-\u003etx_coal_frames[queue])\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4647-\t\tset_ic = false;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4649-\t\tset_ic = true;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4650:\telse if (tx_packets \u003e priv-\u003etx_coal_frames[queue])\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4651-\t\tset_ic = true;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4652-\telse if ((tx_q-\u003etx_count_frames %\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4653:\t\t priv-\u003etx_coal_frames[queue]) \u003c tx_packets)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4654-\t\tset_ic = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=4786=static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4942-\t\tset_ic = true;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4943:\telse if (!priv-\u003etx_coal_frames[queue])\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4944-\t\tset_ic = false;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4946-\t\tset_ic = true;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4947:\telse if (tx_packets \u003e priv-\u003etx_coal_frames[queue])\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4948-\t\tset_ic = true;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4949-\telse if ((tx_q-\u003etx_count_frames %\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:4950:\t\t priv-\u003etx_coal_frames[queue]) \u003c tx_packets)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-4951-\t\tset_ic = true;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=5203=static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5257-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5258:\tif (!priv-\u003etx_coal_frames[queue])\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5259-\t\tset_ic = false;\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5260:\telse if (tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue] == 0)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-5261-\t\tset_ic = true;\n"
} |
| 25/2 | 2026/09/23 11:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 32923 output: 31 thoughts: 594 Thoughts: **My Assessment of STMMAC Reachability for Fuzzing** Okay, let's break this down. I see that the code has already checked `!priv->tx_coal_frames[queue]` in `stmmac_xdp_xmit_zc`, `stmmac_tso_xmit`, and `stmmac_xmit`. The only missing check was in `stmmac_xdp_xmit_xdpf`, and that was allowed due to `__stmmac_set_coalesce` allowing it when the queue was RX-only. Noted. Now, the critical question: is `stmmac` even *reachable* in a standard virtualized environment like GCE or QEMU using software-emulated devices like USB gadgets, netdev, or tun/tap? That's the real blocker here. I need to be sure before I invest any more time. The guidelines are clear: "Reachability is the primary gate." If the code's structurally unreachable in these environments, it's a no-go for fuzzing, no matter what it does. And according to the guidelines, we're talking about hardware that isn't emulated in standard QEMU. That is what I need to check. Let's look at what STMMAC drives. It's the STMicroelectronics Synopsys DesignWare Ethernet Quality-of-Service (DWC Ether QoS) / GMAC / XGMAC. This is an embedded IP core, found in SoCs like STM32, Allwinner, Rockchip, Tegra, i.MX, Loongson, and certain Intel SoCs. And that is likely the problem. Can I instantiate this within a standard amd64 QEMU VM? No. QEMU for x86_64 doesn't emulate the Synopsys DWMAC or STMMAC or Intel Elkhart Lake GMAC. Can I get around this by USB? No. What about virtual buses? No, and certainly not via dummy/tun/tap/veth either. So, the next and final question: Is there *any* way for the STMMAC driver to load and register a `net_device` in a standard QEMU/GCE VM? Let me check the directory… I'll look into `drivers/net/ethernet/stmicro/stmmac/` to see if there's some kind of virtual bus or software fallback that allows this driver to operate. |
| 26/2 | 2026/09/23 11:30 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/net/ethernet/stmicro/stmmac"
}Results: {
"Files": [
"chain_mode.c",
"common.h",
"descs.h",
"descs_com.h",
"dwmac-anarion.c",
"dwmac-dwc-qos-eth.c",
"dwmac-eic7700.c",
"dwmac-generic.c",
"dwmac-imx.c",
"dwmac-ingenic.c",
"dwmac-intel-plat.c",
"dwmac-intel.c",
"dwmac-intel.h",
"dwmac-ipq806x.c",
"dwmac-loongson.c",
"dwmac-loongson1.c",
"dwmac-lpc18xx.c",
"dwmac-mediatek.c",
"dwmac-meson.c",
"dwmac-meson8b.c",
"dwmac-motorcomm.c",
"dwmac-nuvoton.c",
"dwmac-qcom-ethqos.c",
"dwmac-renesas-gbeth.c",
"dwmac-rk.c",
"dwmac-rzn1.c",
"dwmac-s32.c",
"dwmac-socfpga.c",
"dwmac-sophgo.c",
"dwmac-spacemit.c",
"dwmac-starfive.c",
"dwmac-sti.c",
"dwmac-stm32.c",
"dwmac-sun55i.c",
"dwmac-sun8i.c",
"dwmac-sunxi.c",
"dwmac-tegra.c",
"dwmac-thead.c",
"dwmac-visconti.c",
"dwmac100.h",
"dwmac1000.h",
"dwmac1000_core.c",
"dwmac1000_dma.c",
"dwmac100_core.c",
"dwmac100_dma.c",
"dwmac4.h",
"dwmac4_core.c",
"dwmac4_descs.c",
"dwmac4_descs.h",
"dwmac4_dma.c",
"dwmac4_dma.h",
"dwmac4_lib.c",
"dwmac5.c",
"dwmac5.h",
"dwmac_dma.h",
"dwmac_lib.c",
"dwxgmac2.h",
"dwxgmac2_core.c",
"dwxgmac2_descs.c",
"dwxgmac2_dma.c",
"dwxlgmac2.h",
"enh_desc.c",
"hwif.c",
"hwif.h",
"mmc.h",
"mmc_core.c",
"norm_desc.c",
"ring_mode.c",
"stmmac.h",
"stmmac_est.c",
"stmmac_est.h",
"stmmac_ethtool.c",
"stmmac_fpe.c",
"stmmac_fpe.h",
"stmmac_hwtstamp.c",
"stmmac_libpci.c",
"stmmac_libpci.h",
"stmmac_main.c",
"stmmac_mdio.c",
"stmmac_pci.c",
"stmmac_pcs.c",
"stmmac_pcs.h",
"stmmac_platform.c",
"stmmac_platform.h",
"stmmac_ptp.c",
"stmmac_ptp.h",
"stmmac_selftests.c",
"stmmac_tc.c",
"stmmac_vlan.c",
"stmmac_vlan.h",
"stmmac_xdp.c",
"stmmac_xdp.h"
],
"Subdirs": null
} |
| 27/2 | 2026/09/23 11:30 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 35046 output: 99 thoughts: 762 Thoughts: **Analysis of Stmmac Driver Fuzzing Feasibility**
Alright, let's break this down. My initial scan of the `dwmac-*.c` files immediately flagged them as platform drivers for specific hardware—ARM, RISC-V, MIPS, and other SoCs—or PCI drivers. Crucially, none of those PCI IDs or devices are present in standard QEMU virtualized environments or GCE VMs. This means the `probe` function, whether it's the PCI version or the platform-specific version, won't ever be called, and consequently, no `net_device` will be registered. This then means `__stmmac_set_coalesce` or `stmmac_xdp_xmit_xdpf` can never be executed.
Now, let's corroborate this with the documentation. Section 2, "Structurally unreachable hardware," lines up perfectly. We're talking about vendor-specific hardware like PCIe switches or NIC drivers requiring physical ASICs or PCIe cards that QEMU doesn't emulate. Section 3, in contrast, talks about reachable drivers and protocols, the stuff accessible via virtual buses like virtio or USB. That's not the case here.
The `stmmac` Ethernet driver, in particular, is a vendor-specific NIC driver designed for hardware like Intel Elkhart Lake GMAC, Loongson GMAC, Motorcomm GMAC, or Synopsys GMAC5 which relies on specific SoCs or PCIe cards that are not standard QEMU fare. Therefore, it's inherently un-probeable and un-executable within these virtualized settings.
This aligns perfectly with Section 1, which states that "REACHABILITY IS THE PRIMARY GATE." If the code is structurally unreachable (as defined in Section 2), it MUST NOT be fuzzed. And this definitely meets that criteria. We are looking for Section 2: "Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- 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."
So, after double-checking everything, the verdict is clear:
* **WorthFuzzing: false**
* **EnableConfigs: \[ ]**
* **FocusSymbols: \[ ]**
* **Reasoning:** The `stmmac` driver is an Ethernet MAC driver specifically for STMicroelectronics / Synopsys DesignWare Ethernet hardware or PCIe devices, none of which are emulated in standard QEMU/virtualized environments. This makes the driver structurally unreachable.
We need to make sure we've covered the required elements, but the pieces look good. We now need to call `set-results` with the appropriate parameters.
|
| 28/2 | 2026/09/23 11:30 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies coalesce handling and XDP transmit logic in the STMicroelectronics/Synopsys DesignWare Ethernet (stmmac) driver. This driver targets physical SoC IP cores and vendor-specific PCIe devices that are not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies coalesce handling and XDP transmit logic in the STMicroelectronics/Synopsys DesignWare Ethernet (stmmac) driver. This driver targets physical SoC IP cores and vendor-specific PCIe devices that are not emulated in standard virtualized fuzzing environments (QEMU/GCE), making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 29/1 | 2026/09/23 11:30 | 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) |
|---|