AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/25 15:04 flow patch-triage
0m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "KMSANReasoning": "",
  "NeedsKMSAN": false,
  "Reasoning": "The patch modifies stmmac_xdp_xmit_xdpf() in the STMMAC (STMicroelectronics / Synopsys DesignWare Ethernet MAC) driver. On the amd64 target architecture, this driver requires physical PCI devices or SoC platform hardware that is not emulated in standard QEMU or GCE virtual environments. Consequently, the modified code is structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

1/1 2026/09/25 15:04 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 2684a9cb6b8aa8bd14e0e7cb610be346be12939c\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Fri Sep 25 15:04:19 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\nindex bf9e7e4cb1c31..41ccde6371ecd 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n@@ -5239,77 +5239,114 @@ static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,\n static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,\n \t\t\t\tstruct xdp_frame *xdpf, bool dma_map)\n {\n-\tstruct stmmac_txq_stats *txq_stats = \u0026priv-\u003exstats.txq_stats[queue];\n+\tstruct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf);\n \tstruct stmmac_tx_queue *tx_q = \u0026priv-\u003edma_conf.tx_queue[queue];\n \tbool csum = !priv-\u003eplat-\u003etx_queues_cfg[queue].coe_unsupported;\n+\tunsigned int first_entry = tx_q-\u003ecur_tx;\n \tunsigned int entry = tx_q-\u003ecur_tx;\n-\tenum stmmac_txbuf_type buf_type;\n-\tstruct dma_desc *tx_desc;\n-\tdma_addr_t dma_addr;\n-\tbool set_ic;\n+\tint i = 0, num_frames = 1;\n+\tstruct dma_desc *desc;\n \n-\tif (stmmac_tx_avail(priv, queue) \u003c STMMAC_TX_THRESH(priv))\n+\tif (unlikely(xdp_frame_has_frags(xdpf)))\n+\t\tnum_frames += sinfo-\u003enr_frags;\n+\n+\tif (stmmac_tx_avail(priv, queue) \u003c num_frames)\n \t\treturn STMMAC_XDP_CONSUMED;\n \n \tif (priv-\u003eest \u0026\u0026 priv-\u003eest-\u003eenable \u0026\u0026\n \t    priv-\u003eest-\u003emax_sdu[queue] \u0026\u0026\n-\t    xdpf-\u003elen \u003e priv-\u003eest-\u003emax_sdu[queue]) {\n+\t    xdp_get_frame_len(xdpf) \u003e priv-\u003eest-\u003emax_sdu[queue]) {\n \t\tpriv-\u003exstats.max_sdu_txq_drop[queue]++;\n \t\treturn STMMAC_XDP_CONSUMED;\n \t}\n \n-\ttx_desc = stmmac_get_tx_desc(priv, tx_q, entry);\n-\tif (dma_map) {\n-\t\tdma_addr = dma_map_single(priv-\u003edevice, xdpf-\u003edata,\n-\t\t\t\t\t  xdpf-\u003elen, DMA_TO_DEVICE);\n-\t\tif (dma_mapping_error(priv-\u003edevice, dma_addr))\n-\t\t\treturn STMMAC_XDP_CONSUMED;\n-\n-\t\tbuf_type = STMMAC_TXBUF_T_XDP_NDO;\n-\t} else {\n-\t\tstruct page *page = virt_to_page(xdpf-\u003edata);\n-\n-\t\tdma_addr = page_pool_get_dma_addr(page) + sizeof(*xdpf) +\n-\t\t\t   xdpf-\u003eheadroom;\n-\t\tdma_sync_single_for_device(priv-\u003edevice, dma_addr,\n-\t\t\t\t\t   xdpf-\u003elen, DMA_BIDIRECTIONAL);\n+\twhile (true) {\n+\t\tskb_frag_t *frag = i ? \u0026sinfo-\u003efrags[i - 1] : NULL;\n+\t\tint len = frag ? skb_frag_size(frag) : xdpf-\u003elen;\n+\t\tbool last_frame = i == num_frames - 1;\n+\t\tenum stmmac_txbuf_type buf_type;\n+\t\tdma_addr_t dma_addr;\n \n-\t\tbuf_type = STMMAC_TXBUF_T_XDP_TX;\n-\t}\n+\t\tdesc = stmmac_get_tx_desc(priv, tx_q, entry);\n+\t\tif (dma_map) {\n+\t\t\tif (frag)\n+\t\t\t\tdma_addr = skb_frag_dma_map(priv-\u003edevice,\n+\t\t\t\t\t\t\t    frag, 0, len,\n+\t\t\t\t\t\t\t    DMA_TO_DEVICE);\n+\t\t\telse\n+\t\t\t\tdma_addr = dma_map_single(priv-\u003edevice,\n+\t\t\t\t\t\t\t  xdpf-\u003edata, len,\n+\t\t\t\t\t\t\t  DMA_TO_DEVICE);\n+\t\t\tif (dma_mapping_error(priv-\u003edevice, dma_addr))\n+\t\t\t\tgoto error_dma_unmap;\n \n-\tstmmac_set_tx_dma_entry(tx_q, entry, buf_type, dma_addr, xdpf-\u003elen,\n-\t\t\t\tfalse);\n-\tstmmac_set_tx_dma_last_segment(tx_q, entry);\n+\t\t\tbuf_type = STMMAC_TXBUF_T_XDP_NDO;\n+\t\t} else {\n+\t\t\tstruct page *page;\n \n-\ttx_q-\u003exdpf[entry] = xdpf;\n+\t\t\tpage = frag ? skb_frag_page(frag)\n+\t\t\t\t    : virt_to_page(xdpf-\u003edata);\n+\t\t\tdma_addr = page_pool_get_dma_addr(page);\n+\t\t\tif (frag)\n+\t\t\t\tdma_addr += skb_frag_off(frag);\n+\t\t\telse\n+\t\t\t\tdma_addr += sizeof(*xdpf) + xdpf-\u003eheadroom;\n+\t\t\tdma_sync_single_for_device(priv-\u003edevice, dma_addr,\n+\t\t\t\t\t\t   len, DMA_BIDIRECTIONAL);\n+\t\t\tbuf_type = STMMAC_TXBUF_T_XDP_TX;\n+\t\t}\n \n-\tstmmac_set_desc_addr(priv, tx_desc, dma_addr);\n+\t\tstmmac_set_tx_dma_entry(tx_q, entry, buf_type, dma_addr, len,\n+\t\t\t\t\tdma_map \u0026\u0026 frag);\n+\t\tstmmac_set_desc_addr(priv, desc, dma_addr);\n+\t\tstmmac_prepare_tx_desc(priv, desc, !i, len, csum,\n+\t\t\t\t       priv-\u003edescriptor_mode, !!i, last_frame,\n+\t\t\t\t       xdp_get_frame_len(xdpf));\n+\t\ttx_q-\u003exdpf[entry] = last_frame ? xdpf : NULL;\n+\t\tif (last_frame) {\n+\t\t\tstmmac_set_tx_dma_last_segment(tx_q, entry);\n+\t\t\tbreak;\n+\t\t}\n \n-\tstmmac_prepare_tx_desc(priv, tx_desc, 1, xdpf-\u003elen,\n-\t\t\t       csum, priv-\u003edescriptor_mode, true, true,\n-\t\t\t       xdpf-\u003elen);\n+\t\tentry = STMMAC_NEXT_ENTRY(entry, priv-\u003edma_conf.dma_tx_size);\n+\t\ti++;\n+\t}\n+\ttx_q-\u003etx_count_frames += num_frames;\n \n-\ttx_q-\u003etx_count_frames++;\n+\tif (!(tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue])) {\n+\t\tstruct stmmac_txq_stats *txq_stats;\n \n-\tif (tx_q-\u003etx_count_frames % priv-\u003etx_coal_frames[queue] == 0)\n-\t\tset_ic = true;\n-\telse\n-\t\tset_ic = false;\n-\n-\tif (set_ic) {\n+\t\tdesc = stmmac_get_tx_desc(priv, tx_q, entry);\n+\t\tstmmac_set_tx_ic(priv, desc);\n \t\ttx_q-\u003etx_count_frames = 0;\n-\t\tstmmac_set_tx_ic(priv, tx_desc);\n+\n+\t\ttxq_stats = \u0026priv-\u003exstats.txq_stats[queue];\n \t\tu64_stats_update_begin(\u0026txq_stats-\u003eq_syncp);\n \t\tu64_stats_inc(\u0026txq_stats-\u003eq.tx_set_ic_bit);\n \t\tu64_stats_update_end(\u0026txq_stats-\u003eq_syncp);\n \t}\n \n+\t/* Set the OWN bit on the first descriptor now that all descriptors\n+\t * for this skb are populated.\n+\t */\n+\tdesc = stmmac_get_tx_desc(priv, tx_q, first_entry);\n+\tstmmac_set_tx_owner(priv, desc);\n+\ttx_q-\u003ecur_tx = STMMAC_NEXT_ENTRY(entry, priv-\u003edma_conf.dma_tx_size);\n \tstmmac_enable_dma_transmission(priv, priv-\u003eioaddr, queue);\n \n-\tentry = STMMAC_NEXT_ENTRY(entry, priv-\u003edma_conf.dma_tx_size);\n-\ttx_q-\u003ecur_tx = entry;\n-\n \treturn STMMAC_XDP_TX;\n+\n+error_dma_unmap:\n+\twhile (first_entry != entry) {\n+\t\tdesc = stmmac_get_tx_desc(priv, tx_q, first_entry);\n+\t\tstmmac_release_tx_desc(priv, desc, priv-\u003edescriptor_mode);\n+\t\tstmmac_free_tx_buffer(priv, \u0026priv-\u003edma_conf, queue,\n+\t\t\t\t      first_entry);\n+\t\tfirst_entry = STMMAC_NEXT_ENTRY(first_entry,\n+\t\t\t\t\t\tpriv-\u003edma_conf.dma_tx_size);\n+\t}\n+\n+\treturn STMMAC_XDP_CONSUMED;\n }\n \n static int stmmac_xdp_get_tx_queue(struct stmmac_priv *priv,\n"
}

2/1 2026/09/25 15:04 agent patch-evaluator
0m Model:
core

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies stmmac_xdp_xmit_xdpf() in the STMMAC (STMicroelectronics / Synopsys DesignWare Ethernet MAC) driver. On the amd64 target architecture, this driver requires physical PCI devices or SoC platform hardware that is not emulated in standard QEMU or GCE virtual environments. Consequently, the modified code is structurally unreachable for 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 2684a9cb6b8aa8bd14e0e7cb610be346be12939c
Author: syz-cluster <triage@syzkaller.com>
Date:   Fri Sep 25 15:04:19 2026 +0000

    syz-cluster: applied patch under review

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index bf9e7e4cb1c31..41ccde6371ecd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -5239,77 +5239,114 @@ static unsigned int stmmac_rx_buf2_len(struct stmmac_priv *priv,
 static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
 				struct xdp_frame *xdpf, bool dma_map)
 {
-	struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[queue];
+	struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf);
 	struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
 	bool csum = !priv->plat->tx_queues_cfg[queue].coe_unsupported;
+	unsigned int first_entry = tx_q->cur_tx;
 	unsigned int entry = tx_q->cur_tx;
-	enum stmmac_txbuf_type buf_type;
-	struct dma_desc *tx_desc;
-	dma_addr_t dma_addr;
-	bool set_ic;
+	int i = 0, num_frames = 1;
+	struct dma_desc *desc;
 
-	if (stmmac_tx_avail(priv, queue) < STMMAC_TX_THRESH(priv))
+	if (unlikely(xdp_frame_has_frags(xdpf)))
+		num_frames += sinfo->nr_frags;
+
+	if (stmmac_tx_avail(priv, queue) < num_frames)
 		return STMMAC_XDP_CONSUMED;
 
 	if (priv->est && priv->est->enable &&
 	    priv->est->max_sdu[queue] &&
-	    xdpf->len > priv->est->max_sdu[queue]) {
+	    xdp_get_frame_len(xdpf) > priv->est->max_sdu[queue]) {
 		priv->xstats.max_sdu_txq_drop[queue]++;
 		return STMMAC_XDP_CONSUMED;
 	}
 
-	tx_desc = stmmac_get_tx_desc(priv, tx_q, entry);
-	if (dma_map) {
-		dma_addr = dma_map_single(priv->device, xdpf->data,
-					  xdpf->len, DMA_TO_DEVICE);
-		if (dma_mapping_error(priv->device, dma_addr))
-			return STMMAC_XDP_CONSUMED;
-
-		buf_type = STMMAC_TXBUF_T_XDP_NDO;
-	} else {
-		struct page *page = virt_to_page(xdpf->data);
-
-		dma_addr = page_pool_get_dma_addr(page) + sizeof(*xdpf) +
-			   xdpf->headroom;
-		dma_sync_single_for_device(priv->device, dma_addr,
-					   xdpf->len, DMA_BIDIRECTIONAL);
+	while (true) {
+		skb_frag_t *frag = i ? &sinfo->frags[i - 1] : NULL;
+		int len = frag ? skb_frag_size(frag) : xdpf->len;
+		bool last_frame = i == num_frames - 1;
+		enum stmmac_txbuf_type buf_type;
+		dma_addr_t dma_addr;
 
-		buf_type = STMMAC_TXBUF_T_XDP_TX;
-	}
+		desc = stmmac_get_tx_desc(priv, tx_q, entry);
+		if (dma_map) {
+			if (frag)
+				dma_addr = skb_frag_dma_map(priv->device,
+							    frag, 0, len,
+							    DMA_TO_DEVICE);
+			else
+				dma_addr = dma_map_single(priv->device,
+							  xdpf->data, len,
+							  DMA_TO_DEVICE);
+			if (dma_mapping_error(priv->device, dma_addr))
+				goto error_dma_unmap;
 
-	stmmac_set_tx_dma_entry(tx_q, entry, buf_type, dma_addr, xdpf->len,
-				false);
-	stmmac_set_tx_dma_last_segment(tx_q, entry);
+			buf_type = STMMAC_TXBUF_T_XDP_NDO;
+		} else {
+			struct page *page;
 
-	tx_q->xdpf[entry] = xdpf;
+			page = frag ? skb_frag_page(frag)
+				    : virt_to_page(xdpf->data);
+			dma_addr = page_pool_get_dma_addr(page);
+			if (frag)
+				dma_addr += skb_frag_off(frag);
+			else
+				dma_addr += sizeof(*xdpf) + xdpf->headroom;
+			dma_sync_single_for_device(priv->device, dma_addr,
+						   len, DMA_BIDIRECTIONAL);
+			buf_type = STMMAC_TXBUF_T_XDP_TX;
+		}
 
-	stmmac_set_desc_addr(priv, tx_desc, dma_addr);
+		stmmac_set_tx_dma_entry(tx_q, entry, buf_type, dma_addr, len,
+					dma_map && frag);
+		stmmac_set_desc_addr(priv, desc, dma_addr);
+		stmmac_prepare_tx_desc(priv, desc, !i, len, csum,
+				       priv->descriptor_mode, !!i, last_frame,
+				       xdp_get_frame_len(xdpf));
+		tx_q->xdpf[entry] = last_frame ? xdpf : NULL;
+		if (last_frame) {
+			stmmac_set_tx_dma_last_segment(tx_q, entry);
+			break;
+		}
 
-	stmmac_prepare_tx_desc(priv, tx_desc, 1, xdpf->len,
-			       csum, priv->descriptor_mode, true, true,
-			       xdpf->len);
+		entry = STMMAC_NEXT_ENTRY(entry, priv->dma_conf.dma_tx_size);
+		i++;
+	}
+	tx_q->tx_count_frames += num_frames;
 
-	tx_q->tx_count_frames++;
+	if (!(tx_q->tx_count_frames % priv->tx_coal_frames[queue])) {
+		struct stmmac_txq_stats *txq_stats;
 
-	if (tx_q->tx_count_frames % priv->tx_coal_frames[queue] == 0)
-		set_ic = true;
-	else
-		set_ic = false;
-
-	if (set_ic) {
+		desc = stmmac_get_tx_desc(priv, tx_q, entry);
+		stmmac_set_tx_ic(priv, desc);
 		tx_q->tx_count_frames = 0;
-		stmmac_set_tx_ic(priv, tx_desc);
+
+		txq_stats = &priv->xstats.txq_stats[queue];
 		u64_stats_update_begin(&txq_stats->q_syncp);
 		u64_stats_inc(&txq_stats->q.tx_set_ic_bit);
 		u64_stats_update_end(&txq_stats->q_syncp);
 	}
 
+	/* Set the OWN bit on the first descriptor now that all descriptors
+	 * for this skb are populated.
+	 */
+	desc = stmmac_get_tx_desc(priv, tx_q, first_entry);
+	stmmac_set_tx_owner(priv, desc);
+	tx_q->cur_tx = STMMAC_NEXT_ENTRY(entry, priv->dma_conf.dma_tx_size);
 	stmmac_enable_dma_transmission(priv, priv->ioaddr, queue);
 
-	entry = STMMAC_NEXT_ENTRY(entry, priv->dma_conf.dma_tx_size);
-	tx_q->cur_tx = entry;
-
 	return STMMAC_XDP_TX;
+
+error_dma_unmap:
+	while (first_entry != entry) {
+		desc = stmmac_get_tx_desc(priv, tx_q, first_entry);
+		stmmac_release_tx_desc(priv, desc, priv->descriptor_mode);
+		stmmac_free_tx_buffer(priv, &priv->dma_conf, queue,
+				      first_entry);
+		first_entry = STMMAC_NEXT_ENTRY(first_entry,
+						priv->dma_conf.dma_tx_size);
+	}
+
+	return STMMAC_XDP_CONSUMED;
 }
 
 static int stmmac_xdp_get_tx_queue(struct stmmac_priv *priv,

3/2 2026/09/25 15:04 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 5162
							output: 38
							thoughts: 216
						

Thoughts:
**Fuzzing Evaluation: stmmac Patch**

Okay, so I've been asked to assess if this patch series is a good candidate for syzkaller fuzzing. Let's dig in. The core modification seems to be within `drivers/net/ethernet/stmicro/stmmac/stmmac_main.c`, specifically the `stmmac_xdp_xmit_xdpf` function.

Hmm, "stmmac"... I need to refresh my memory on that. Right, it's the STMicroelectronics Ethernet driver. But a critical question immediately pops into my head: is this something that's even *accessible* within a standard virtualized environment like GCE or QEMU, leveraging the usual software-emulated network devices? I need to know if I can reasonably reproduce this. My worry is that this might be tied to specific hardware, maybe an SoC Ethernet controller used in STM32, Allwinner, Rockchip, or potentially Intel Quark/Elkhart Lake, or even a DWMAC, which would be a huge challenge. I'm wondering if QEMU emulates it at all? Or perhaps it's a PCI device, which makes it more accessible, but still complex.

Let's quickly check the relevant Kconfig file (`drivers/net/ethernet/stmicro/stmmac/Kconfig`) and drivers directory to get a better feel for its configuration and potential dependencies. I need to understand the architecture before I can proceed.



4/2 2026/09/25 15:04 tool grepper
0m Args:
{
  "Expression": "config STMMAC",
  "PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}

Results:
{
  "Output": "drivers/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=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\"\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\"\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=382=endif # STMMAC_PLATFORM\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-383-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:384:config STMMAC_LIBPCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-385-\ttristate\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=409=config DWMAC_MOTORCOMM\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-417-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:418:config STMMAC_PCI\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-419-\ttristate \"STMMAC PCI bus support\"\n"
}

5/2 2026/09/25 15:04 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 6258
							output: 45
							thoughts: 139
						

Thoughts:
**Investigating the STMMAC Emulation Landscape**

Okay, so I need to figure out exactly how stmmac is being handled in this environment. My initial thought is to determine if it's being emulated within standard QEMU or if it's pointing towards some vendor-specific hardware. Now, wait a minute, I need to clarify: does QEMU even *emulate* stmmac or is it dwmac that is more common? Actually, let me rephrase that: which Ethernet MAC, dwmac or stmmac, is typically emulated within the QEMU environment?

Hold on... I'm reminded that some ARM boards *might* utilize dwmac, but the target architecture here is `amd64`! Ah, there it is: "Target architecture: amd64". That changes things. Since we're dealing with an amd64 target, what stmmac-related devices are even *available* in that context? I believe the next step is to examine the `STMMAC_PCI` configuration within the driver source, particularly in `drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c`. That should provide some clarity on supported hardware and configurations for this architecture.



6/2 2026/09/25 15:04 tool grepper
0m Args:
{
  "Expression": "PCI_DEVICE",
  "PathPrefix": "drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c"
}

Results:
{
  "Output": "drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=192=static void stmmac_pci_remove(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-199-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:200:#define PCI_DEVICE_ID_STMMAC_STMMAC\t\t0x1108\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:201:#define PCI_DEVICE_ID_SYNOPSYS_GMAC5_ID\t\t0x7102\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-202-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=203=static const struct pci_device_id stmmac_id_table[] = {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:204:\t{ PCI_DEVICE_DATA(STMMAC, STMMAC, \u0026stmmac_pci_info) },\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:205:\t{ PCI_DEVICE_DATA(STMICRO, MAC, \u0026stmmac_pci_info) },\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:206:\t{ PCI_DEVICE_DATA(SYNOPSYS, GMAC5_ID, \u0026snps_gmac5_pci_info) },\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-207-\t{}\n"
}

7/2 2026/09/25 15:04 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 7173
							output: 41
							thoughts: 34
						

Thoughts:
Okay, let's see. My first thought is: **Exploring the STMMAC Driver Landscape**. Hold on a minute... are there *different* PCI drivers specifically for the `stmmac` ethernet controller? I need to quickly verify that. Let's dig into the kernel source, specifically the `Kconfig` file within the `drivers/net/ethernet/stmicro/stmmac/` directory. That's the go-to place for configurations, driver options, and generally, understanding the build-time possibilities. I'll check that Kconfig file right now to confirm, and if so, it will give more insight into these STMMAC PCI drivers.



8/2 2026/09/25 15:04 tool grepper
0m Args:
{
  "Expression": "config DWMAC_INTEL",
  "PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}

Results:
{
  "Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig=333=config DWMAC_IMX8\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-344-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:345:config DWMAC_INTEL_PLAT\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-346-\ttristate \"Intel dwmac support\"\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=384=config STMMAC_LIBPCI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-388-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:389:config DWMAC_INTEL\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-390-\ttristate \"Intel GMAC support\"\n"
}

9/2 2026/09/25 15:04 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 7635
							output: 42
							thoughts: 679
						

Thoughts:
**Analyzing the Fuzzing Applicability of STMMAC Driver**

Okay, let's dive into these fuzzing instructions. Section 2, the "NEGATIVE CRITERIA," is key. The main point is *reachability*. If code isn't reachable in standard virtualized environments, we shouldn't fuzz it. Specifically, it mentions structurally unreachable hardware like vendor-specific PCIe switches, SmartNICs, or GPU drivers.

My immediate question is: *Is* the `stmmac` driver reachable in a standard QEMU or GCE environment?

To answer this, I need to know what network devices QEMU *does* emulate on x86_64, which is the standard I am operating with. Thinking through the standard models, it's things like e1000, rtl8139, virtio-net-pci, and a few others. Do I see `stmmac` or `dwmac` in that list? No.

A deeper dive into the QEMU source reveals specific device models like `allwinner-sun8i-emac`, `cadence_gem`, `imx_fec`, and `lan9118` that are *ARM-specific*. But nothing for x86_64 or amd64. `stmmac` and `dwmac` are usually Synopsys DesignWare Ethernet MAC and are used in SoCs like STM32, Allwinner, Rockchip, Amlogic, NXP, Intel Quark/PCH, or specific Synopsys PCI test chips / Intel Elkhart Lake / Tiger Lake / etc. No X86/AMD64. I'm not seeing any corresponding QEMU device model for it.

So, the next thought is: *Could `stmmac` somehow be loaded without hardware*? To check that, I need to look at how the `stmmac` driver is instantiated. I'll need to examine `stmmac_main.c` and figure out how the driver's instance is probed. Looking at `stmmac_dvr_probe` should provide clues. It looks like it is called by either platform drivers (`dwmac-*`, `stmmac_platform`) or PCI driver (`stmmac_pci`, `dwmac_intel`). So, a quick `grep` for `stmmac_dvr_probe` would be helpful.



10/2 2026/09/25 15:04 tool grepper
0m Args:
{
  "Expression": "stmmac_dvr_probe",
  "PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}

Results:
{
  "Output": "drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=283=static int dwc_eth_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-329-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:330:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-331-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c=42=static int intel_eth_plat_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c-117-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c:118:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c-119-\tif (ret)\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-1340-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1341:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat, \u0026res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1342-\tif (ret) {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c=374=static int ipq806x_gmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c-482-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c:483:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c-484-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=498=static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-561-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:562:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat, \u0026res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-563-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c=42=static int lpc18xx_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c-67-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c:68:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c-69-}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c=599=static int mediatek_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c-641-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c:642:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c-643-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c=47=static int meson6_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c-72-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c:73:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c-74-}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c=382=static int meson8b_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c-463-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c:464:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c-465-}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=293=static int motorcomm_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-358-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:359:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat, \u0026res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-360-}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c=48=static int rzn1_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c-67-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c:68:\tret = stmmac_dvr_probe(dev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c-69-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c=147=static int spacemit_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c-206-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c:207:\treturn stmmac_dvr_probe(dev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c-208-}\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-152-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:153:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c-154-}\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-578-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:579:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c-580-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c=1109=static int sun8i_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1205-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c:1206:\t/* the MAC is runtime suspended after stmmac_dvr_probe(), so we\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1207-\t * need to ensure the MAC resume back before other operations such\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1212-\t/* The mux must be registered after parent MDIO\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c:1213:\t * so after stmmac_dvr_probe()\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c-1214-\t */\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-375-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c:376:\terr = stmmac_dvr_probe(\u0026pdev-\u003edev, plat, \u0026res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c-377-\tif (err \u003c 0)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c=205=static int visconti_eth_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c-236-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c:237:\tret = stmmac_dvr_probe(\u0026pdev-\u003edev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c-238-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h=413=void stmmac_dvr_remove(struct device *dev);\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:414:int stmmac_dvr_probe(struct device *device,\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-415-\t\t     struct plat_stmmacenet_data *plat_dat,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c=7910=EXPORT_SYMBOL_GPL(stmmac_plat_dat_alloc);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-7911-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:7912:static int __stmmac_dvr_probe(struct device *device,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-7913-\t\t\t      struct plat_stmmacenet_data *plat_dat,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8215-/**\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:8216: * stmmac_dvr_probe\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8217- * @dev: device pointer\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8224- */\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:8225:int stmmac_dvr_probe(struct device *dev, struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8226-\t\t     struct stmmac_resources *res)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8235-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:8236:\tret = __stmmac_dvr_probe(dev, plat_dat, res);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8237-\tif (ret \u0026\u0026 plat_dat-\u003eexit)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8241-}\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:8242:EXPORT_SYMBOL_GPL(stmmac_dvr_probe);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c-8243-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=118=static int stmmac_pci_probe(struct pci_dev *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-182-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:183:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat, \u0026res);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-184-}\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c=847=int stmmac_pltfr_probe(struct platform_device *pdev,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c-865-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:866:\treturn stmmac_dvr_probe(\u0026pdev-\u003edev, plat, res);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c-867-}\n"
}

11/2 2026/09/25 15:04 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 12836
							output: 27
							thoughts: 908
						

Thoughts:
**Analyzing the STMMAC Driver and its Emulation Challenges**

Okay, so I'm looking at how this `stmmac` driver is behaving and trying to figure out if it can be reached in a fuzzing environment. My initial thought is that the probe calls for drivers like this, for Ethernet MACs, are generally going to be triggered by platform devices on SoCs or through PCI devices. Think about ipq806x, loongson, and similar. None of these are virtualized on x86-64, right? No, standard QEMU doesn't emulate these types of devices. I need to make sure though.

Right, so can QEMU or syzkaller emulate `stmmac` or something like a `dwmac` device on x86-64? Let's clarify. Can syzkaller fuzz `stmmac`? Wait, is there a USB gadget for it? No, `stmmac` is Ethernet, not USB. Does it have pseudo-syscalls or virtual netdevices for `stmmac`? No. Netdevs in syzkaller are created via tun/tap, macvtap, nl80211, vxlan, geneve, veth, or USB emulation.

So, can a physical Ethernet MAC driver, like `stmmac`, be probed in QEMU? Hmm, QEMU only emulates specific PCI network controllers: e1000, rtl8139, virtio-net, etc. Nope, no support for Synopsys DesignWare Ethernet MAC or STMMAC PCI device. It's not emulated. Forget about `syz_mount_image` or similar; not relevant for this network driver.

Now, let's re-read Section 2. Ah, "structurally unreachable hardware"! This includes vendor-specific PCIe switches and SmartNICs. Is this what's happening with `stmmac`? This is the driver for STMicroelectronics / Synopsys DesignWare Ethernet controllers. These are physical controllers, integrated into SoCs or PCIe expansion cards. So, unless I have the physical hardware, or a more sophisticated emulation than standard QEMU, the driver won't probe and the network interface will never register.

Furthermore, let's look at the specific function in question: `stmmac_xdp_xmit_xdpf`. This is the XDP transmit function for `stmmac`. It's only going to be called during XDP_TX or XDP_REDIRECT to a stmmac net_device! Without the `net_device` registered, it can't be opened, have an XDP program attached, or receive packets. And that `net_device` is only registered if `stmmac_dvr_probe` is successful on a physical device.

So, is there even a virtual or dummy `stmmac`? Time to search the kernel for other references or uses.



12/2 2026/09/25 15:05 tool grepper
0m Args:
{
  "Expression": "stmmac",
  "PathPrefix": "drivers/net/"
}

Results:
{
  "Output": "\nFull output is too long, showing 500 out of 11661 lines.\nUse more precise expression if possible.\n\ndrivers/net/ethernet/stmicro/Kconfig=19=if NET_VENDOR_STMICRO\ndrivers/net/ethernet/stmicro/Kconfig-20-\ndrivers/net/ethernet/stmicro/Kconfig:21:source \"drivers/net/ethernet/stmicro/stmmac/Kconfig\"\ndrivers/net/ethernet/stmicro/Kconfig-22-\n--\ndrivers/net/ethernet/stmicro/Makefile-5-\ndrivers/net/ethernet/stmicro/Makefile:6:obj-$(CONFIG_STMMAC_ETH) += stmmac/\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=29=config STMMAC_PLATFORM\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-33-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:34:\t  This selects the platform specific bus support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-35-\t  This is the driver used on several SoCs:\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=60=config DWMAC_ANARION\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-66-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:67:\t  This selects the Anarion SoC glue layer support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-68-\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=78=config DWMAC_INGENIC\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-85-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:86:\t  This selects Ingenic SoCs glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-87-\t  device driver. This driver is used on for the Ingenic SoCs\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=90=config DWMAC_IPQ806X\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-97-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:98:\t  This selects the IPQ806x SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-99-\t  device driver. This driver does not use any of the hardware\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=114=config DWMAC_MEDIATEK\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-119-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:120:\t  This selects the MT2712 SoC support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-121-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=122=config DWMAC_MESON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-129-\t  This selects the Amlogic Meson SoC glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:130:\t  the stmmac device driver. This driver is used for Meson6,\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-131-\t  Meson8, Meson8b and GXBB SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=133=config DWMAC_NUVOTON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-141-\t  This selects the Nuvoton MA35 series SoC glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:142:\t  for the stmmac device driver. The nuvoton-dwmac driver is\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-143-\t  used for MA35 series SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=145=config DWMAC_QCOM_ETHQOS\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-152-\t  This selects the Qualcomm ETHQOS glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:153:\t  stmmac device driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-154-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=155=config DWMAC_RENESAS_GBETH\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-163-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:164:\t  This selects Renesas SoC glue layer support for the stmmac device\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-165-\t  driver. This driver is used for the RZ/V2H(P) family, RZ/T2H and\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=168=config DWMAC_ROCKCHIP\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-176-\t  This selects the Rockchip RK3288 SoC glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:177:\t  the stmmac device driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-178-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=179=config DWMAC_RZN1\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-187-\t  This selects the Renesas RZ/N1 SoC glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:188:\t  the stmmac device driver. This support can make use of a custom MII\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-189-\t  converter PCS device.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=191=config DWMAC_S32\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-197-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:198:\t  This selects NXP SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-199-\t  device driver. This driver is used for the S32CC series\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=203=config DWMAC_SOCFPGA\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-214-\t  This selects the Altera SOCFPGA SoC glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:215:\t  for the stmmac device driver. This driver is used for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-216-\t  arria5 and cyclone5 FPGA SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=218=config DWMAC_SOPHGO\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-225-\t  This selects the Sophgo SoC specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:226:\t  for the stmmac device driver. This driver is used for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-227-\t  ethernet controllers on various Sophgo SoCs.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=229=config DWMAC_SPACEMIT\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-237-\t  This selects the Spacemit platform specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:238:\t  for the stmmac device driver. This driver is used for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-239-\t  Spacemit K3 ethernet controllers.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=241=config DWMAC_STARFIVE\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-249-\t  This selects the StarFive platform specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:250:\t  for the stmmac device driver. This driver is used for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-251-\t  StarFive JH7100 and JH7110 ethernet controllers.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=253=config DWMAC_STI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-260-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:261:\t  This selects STi SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-262-\t  device driver. This driver is used on for the STi series\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=265=config DWMAC_STM32\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-272-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:273:\t  This selects STM32 SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-274-\t  device driver. This driver is used on for the STM32 series\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=277=config DWMAC_SUNXI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-284-\t  This selects Allwinner SoC glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:285:\t  stmmac device driver. This driver is used for A20/A31\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-286-\t  GMAC ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=288=config DWMAC_SUN8I\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-296-\t  This selects Allwinner SoC glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:297:\t  stmmac device driver. This driver is used for H3/A83T/A64\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-298-\t  EMAC ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=300=config DWMAC_SUN55I\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-308-\t  This selects Allwinner SoC glue layer support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:309:\t  stmmac device driver. This driver is used for A523/T527\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-310-\t  GMAC200 ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=312=config DWMAC_THEAD\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-318-\t  This selects the T-HEAD platform specific glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:319:\t  the stmmac device driver. This driver is used for T-HEAD TH1520\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-320-\t  ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=322=config DWMAC_ULTRARISC\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-329-\t  This selects the UltraRISC platform specific glue layer support\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:330:\t  for the stmmac device driver. This driver is used for the DP1000\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-331-\t  GMAC Ethernet controller.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=333=config DWMAC_IMX8\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-340-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:341:\t  This selects NXP SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-342-\t  device driver. This driver is used for i.MX8 series like\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=345=config DWMAC_INTEL_PLAT\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-351-\t  This selects the Intel platform specific glue layer support for\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:352:\t  the stmmac device driver. This driver is used for the Intel Keem Bay\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-353-\t  SoC.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=355=config DWMAC_LOONGSON1\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-361-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:362:\t  This selects Loongson1 SoC glue layer support for the stmmac\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-363-\t  device driver. This driver is used for Loongson1-based boards\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=366=config DWMAC_TEGRA\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-371-\t  found on the NVIDIA Tegra SoC devices. This driver provides the glue\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:372:\t  layer on top of the stmmac driver required for these NVIDIA Tegra SoC\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-373-\t  devices.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=384=config STMMAC_LIBPCI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-386-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:387:\t  This option enables the PCI bus helpers for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-388-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=389=config DWMAC_INTEL\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-396-\t  This selects the Intel platform specific bus support for the\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:397:\t  stmmac driver. This driver is used for Intel Quark/EHL/TGL.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-398-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=399=config DWMAC_LOONGSON\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-405-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:406:\t  This selects the LOONGSON PCI bus support for the stmmac driver,\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-407-\t  Support for ethernet controller on Loongson-2K1000 SoC and LS7A1000 bridge.\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig=418=config STMMAC_PCI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-423-\thelp\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:424:\t  This selects the platform specific bus support for the stmmac driver.\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-425-\t  This driver was tested on XLINX XC2V3000 FF1152AMT0221\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\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile-4-\t      chain_mode.o dwmac_lib.o dwmac1000_core.o dwmac1000_dma.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile-5-\t      dwmac100_core.o dwmac100_dma.o enh_desc.o norm_desc.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:6:\t      mmc_core.o stmmac_hwtstamp.o stmmac_ptp.o dwmac4_descs.o\t\\\ndrivers/net/ethernet/stmicro/stmmac/Makefile-7-\t      dwmac4_dma.o dwmac4_lib.o dwmac4_core.o dwmac5.o hwif.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:8:\t      stmmac_tc.o dwxgmac2_core.o dwxgmac2_dma.o dwxgmac2_descs.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:9:\t      stmmac_xdp.o stmmac_est.o stmmac_fpe.o stmmac_vlan.o \\\ndrivers/net/ethernet/stmicro/stmmac/Makefile:10:\t      stmmac_pcs.o $(stmmac-y)\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=46=obj-$(CONFIG_DWMAC_VISCONTI)\t+= dwmac-visconti.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:47:stmmac-platform-objs:= stmmac_platform.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-48-dwmac-altr-socfpga-objs := dwmac-socfpga.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-49-\ndrivers/net/ethernet/stmicro/stmmac/Makefile:50:obj-$(CONFIG_STMMAC_LIBPCI)\t+= stmmac_libpci.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:51:obj-$(CONFIG_STMMAC_PCI)\t+= stmmac-pci.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile-52-obj-$(CONFIG_DWMAC_INTEL)\t+= dwmac-intel.o\n--\ndrivers/net/ethernet/stmicro/stmmac/Makefile=54=obj-$(CONFIG_DWMAC_MOTORCOMM)\t+= dwmac-motorcomm.o\ndrivers/net/ethernet/stmicro/stmmac/Makefile:55:stmmac-pci-objs:= stmmac_pci.o\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-14-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:15:#include \"stmmac.h\"\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-16-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:17:static int jumbo_frm(struct stmmac_tx_queue *tx_q, struct sk_buff *skb,\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-18-\t\t     int csum)\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-20-\tunsigned int nopaged_len = skb_headlen(skb);\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:21:\tstruct stmmac_priv *priv = tx_q-\u003epriv_data;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-22-\tunsigned int entry = tx_q-\u003ecur_tx;\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-62-\t\t\ttx_q-\u003etx_skbuff_dma[entry].len = bmax;\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);\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-76-\t\t\t/* last descriptor can be set now */\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);\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c=99=static void init_dma_chain(void *des, dma_addr_t phy_addr,\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-128-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:129:static void refill_desc3(struct stmmac_rx_queue *rx_q, struct dma_desc *p)\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-130-{\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:131:\tstruct stmmac_priv *priv = rx_q-\u003epriv_data;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-132-\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-143-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:144:static void clean_desc3(struct stmmac_tx_queue *tx_q, struct dma_desc *p)\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-145-{\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:146:\tstruct stmmac_priv *priv = tx_q-\u003epriv_data;\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-147-\tunsigned int entry = tx_q-\u003edirty_tx;\n--\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-160-\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c:161:const struct stmmac_mode_ops chain_mode_ops = {\ndrivers/net/ethernet/stmicro/stmmac/chain_mode.c-162-\t.init = init_dma_chain,\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-15-#include \u003clinux/netdevice.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/common.h:16:#include \u003clinux/stmmac.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/common.h-17-#include \u003clinux/phy.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-70-\ndrivers/net/ethernet/stmicro/stmmac/common.h:71:struct stmmac_q_tx_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-72-\tu64_stats_t tx_bytes;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-77-\ndrivers/net/ethernet/stmicro/stmmac/common.h:78:struct stmmac_napi_tx_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-79-\tu64_stats_t tx_packets;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-85-\ndrivers/net/ethernet/stmicro/stmmac/common.h:86:struct stmmac_txq_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-87-\t/* Updates protected by tx queue lock. */\ndrivers/net/ethernet/stmicro/stmmac/common.h-88-\tstruct u64_stats_sync q_syncp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:89:\tstruct stmmac_q_tx_stats q;\ndrivers/net/ethernet/stmicro/stmmac/common.h-90-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-92-\tstruct u64_stats_sync napi_syncp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:93:\tstruct stmmac_napi_tx_stats napi;\ndrivers/net/ethernet/stmicro/stmmac/common.h-94-} ____cacheline_aligned_in_smp;\ndrivers/net/ethernet/stmicro/stmmac/common.h-95-\ndrivers/net/ethernet/stmicro/stmmac/common.h:96:struct stmmac_napi_rx_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-97-\tu64_stats_t rx_bytes;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-102-\ndrivers/net/ethernet/stmicro/stmmac/common.h:103:struct stmmac_rxq_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-104-\t/* Updates protected by NAPI poll logic. */\ndrivers/net/ethernet/stmicro/stmmac/common.h-105-\tstruct u64_stats_sync napi_syncp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:106:\tstruct stmmac_napi_rx_stats napi;\ndrivers/net/ethernet/stmicro/stmmac/common.h-107-} ____cacheline_aligned_in_smp;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-109-/* Updates on each CPU protected by not allowing nested irqs. */\ndrivers/net/ethernet/stmicro/stmmac/common.h:110:struct stmmac_pcpu_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-111-\tstruct u64_stats_sync syncp;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-116-/* Extra statistic and debug information exposed by ethtool */\ndrivers/net/ethernet/stmicro/stmmac/common.h:117:struct stmmac_extra_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-118-\t/* Transmit errors */\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-237-\t/* per queue statistics */\ndrivers/net/ethernet/stmicro/stmmac/common.h:238:\tstruct stmmac_txq_stats txq_stats[MTL_MAX_TX_QUEUES];\ndrivers/net/ethernet/stmicro/stmmac/common.h:239:\tstruct stmmac_rxq_stats rxq_stats[MTL_MAX_RX_QUEUES];\ndrivers/net/ethernet/stmicro/stmmac/common.h:240:\tstruct stmmac_pcpu_stats __percpu *pcpu_stats;\ndrivers/net/ethernet/stmicro/stmmac/common.h-241-\tunsigned long rx_dropped;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-247-/* Safety Feature statistics exposed by ethtool */\ndrivers/net/ethernet/stmicro/stmmac/common.h:248:struct stmmac_safety_stats {\ndrivers/net/ethernet/stmicro/stmmac/common.h-249-\tunsigned long mac_errors[32];\n--\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))\ndrivers/net/ethernet/stmicro/stmmac/common.h-258-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=416=struct dma_features {\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-566-\ndrivers/net/ethernet/stmicro/stmmac/common.h:567:void stmmac_axi_blen_to_mask(u32 *regval, const u32 *blen, size_t len);\ndrivers/net/ethernet/stmicro/stmmac/common.h-568-\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h=615=struct mac_device_info {\ndrivers/net/ethernet/stmicro/stmmac/common.h:616:\tconst struct stmmac_ops *mac;\ndrivers/net/ethernet/stmicro/stmmac/common.h:617:\tconst struct stmmac_desc_ops *desc;\ndrivers/net/ethernet/stmicro/stmmac/common.h:618:\tconst struct stmmac_dma_ops *dma;\ndrivers/net/ethernet/stmicro/stmmac/common.h:619:\tconst struct stmmac_mode_ops *mode;\ndrivers/net/ethernet/stmicro/stmmac/common.h:620:\tconst struct stmmac_hwtimestamp *ptp;\ndrivers/net/ethernet/stmicro/stmmac/common.h:621:\tconst struct stmmac_tc_ops *tc;\ndrivers/net/ethernet/stmicro/stmmac/common.h:622:\tconst struct stmmac_mmc_ops *mmc;\ndrivers/net/ethernet/stmicro/stmmac/common.h:623:\tconst struct stmmac_est_ops *est;\ndrivers/net/ethernet/stmicro/stmmac/common.h:624:\tconst struct stmmac_vlan_ops *vlan;\ndrivers/net/ethernet/stmicro/stmmac/common.h-625-\tstruct dw_xpcs *xpcs;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-649-\ndrivers/net/ethernet/stmicro/stmmac/common.h:650:struct stmmac_rx_routing {\ndrivers/net/ethernet/stmicro/stmmac/common.h-651-\tu32 reg_mask;\n--\ndrivers/net/ethernet/stmicro/stmmac/common.h-654-\ndrivers/net/ethernet/stmicro/stmmac/common.h:655:int dwmac100_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:656:int dwmac1000_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:657:int dwmac4_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:658:int dwxgmac2_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h:659:int dwxlgmac2_setup(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/common.h-660-\ndrivers/net/ethernet/stmicro/stmmac/common.h:661:void stmmac_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],\ndrivers/net/ethernet/stmicro/stmmac/common.h-662-\t\t\t unsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:663:void stmmac_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,\ndrivers/net/ethernet/stmicro/stmmac/common.h-664-\t\t\t unsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:665:void stmmac_set_mac(void __iomem *ioaddr, bool enable);\ndrivers/net/ethernet/stmicro/stmmac/common.h-666-\ndrivers/net/ethernet/stmicro/stmmac/common.h:667:void stmmac_dwmac4_set_mac_addr(void __iomem *ioaddr, const u8 addr[6],\ndrivers/net/ethernet/stmicro/stmmac/common.h-668-\t\t\t\tunsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:669:void stmmac_dwmac4_get_mac_addr(void __iomem *ioaddr, unsigned char *addr,\ndrivers/net/ethernet/stmicro/stmmac/common.h-670-\t\t\t\tunsigned int high, unsigned int low);\ndrivers/net/ethernet/stmicro/stmmac/common.h:671:void stmmac_dwmac4_set_mac(void __iomem *ioaddr, bool enable);\ndrivers/net/ethernet/stmicro/stmmac/common.h-672-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-11-#include \u003clinux/of_net.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:12:#include \u003clinux/stmmac.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-13-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:14:#include \"stmmac.h\"\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:15:#include \"stmmac_platform.h\"\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-16-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c=63=anarion_config_dt(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:64:\t\t  struct plat_stmmacenet_data *plat_dat)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-65-{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c=93=static int anarion_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-96-\tstruct anarion_gmac *gmac;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:97:\tstruct plat_stmmacenet_data *plat_dat;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:98:\tstruct stmmac_resources stmmac_res;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-99-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:100:\tret = stmmac_get_platform_resources(pdev, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-101-\tif (ret)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-103-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:104:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-105-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-115-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:116:\treturn devm_stmmac_pltfr_probe(pdev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-117-}\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c=125=static struct platform_driver anarion_dwmac_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-128-\t\t.name           = \"anarion-dwmac\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:129:\t\t.pm\t\t= \u0026stmmac_pltfr_pm_ops,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c-130-\t\t.of_match_table = anarion_dwmac_match,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-21-#include \u003clinux/reset.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:22:#include \u003clinux/stmmac.h\u003e\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-23-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:24:#include \"stmmac_platform.h\"\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-25-#include \"dwmac4.h\"\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=36=static int dwc_eth_dwmac_config_dt(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:37:\t\t\t\t   struct plat_stmmacenet_data *plat_dat)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-38-{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-43-\t\tplat_dat-\u003eaxi = devm_kzalloc(\u0026pdev-\u003edev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:44:\t\t\t\t\t     sizeof(struct stmmac_axi),\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-45-\t\t\t\t\t     GFP_KERNEL);\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=96=static int dwc_qos_probe(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:97:\t\t\t struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:98:\t\t\t struct stmmac_resources *stmmac_res)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-99-{\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:100:\tplat_dat-\u003epclk = stmmac_pltfr_find_clk(plat_dat, \"phy_ref_clk\");\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-101-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=115=static void tegra_eqos_fix_speed(void *bsp_priv, phy_interface_t interface,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-119-\tbool needs_calibration = false;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:120:\tstruct stmmac_priv *priv;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-121-\tu32 value;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-141-\t\t/* Calibration should be done with the MDIO bus idle */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:142:\t\tstmmac_mdio_lock(priv);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-143-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-177-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:178:\t\tstmmac_mdio_unlock(priv);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-179-\t} else {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=186=static int tegra_eqos_probe(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:187:\t\t\t    struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:188:\t\t\t    struct stmmac_resources *res)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-189-{\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-203-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:204:\tplat_dat-\u003eclk_tx_i = stmmac_pltfr_find_clk(plat_dat, \"tx\");\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-205-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-237-\tplat_dat-\u003efix_mac_speed = tegra_eqos_fix_speed;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:238:\tplat_dat-\u003eset_clk_tx_rate = stmmac_set_clk_tx_rate;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-239-\tplat_dat-\u003ebsp_priv = eqos;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=252=static void tegra_eqos_remove(struct platform_device *pdev)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-253-{\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:254:\tstruct tegra_eqos *eqos = get_stmmac_bsp_priv(\u0026pdev-\u003edev);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-255-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=260=struct dwc_eth_dwmac_data {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-261-\tint (*probe)(struct platform_device *pdev,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:262:\t\t     struct plat_stmmacenet_data *plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:263:\t\t     struct stmmac_resources *res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-264-\tvoid (*remove)(struct platform_device *pdev);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:265:\tconst char *stmmac_clk_name;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-266-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=268=static const struct dwc_eth_dwmac_data dwc_qos_data = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-269-\t.probe = dwc_qos_probe,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:270:\t.stmmac_clk_name = \"apb_pclk\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-271-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=273=static const struct dwc_eth_dwmac_data tegra_eqos_data = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-275-\t.remove = tegra_eqos_remove,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:276:\t.stmmac_clk_name = \"slave_bus\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-277-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=279=static const struct dwc_eth_dwmac_data fsd_eqos_data = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:280:\t.stmmac_clk_name = \"slave_bus\",\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-281-};\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c=283=static int dwc_eth_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-285-\tconst struct dwc_eth_dwmac_data *data;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:286:\tstruct plat_stmmacenet_data *plat_dat;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:287:\tstruct stmmac_resources stmmac_res;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-288-\tint ret;\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-291-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:292:\tmemset(\u0026stmmac_res, 0, sizeof(struct stmmac_resources));\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-293-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-294-\t/**\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:295:\t * Since stmmac_platform supports name IRQ only, basic platform\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-296-\t * resource initialization is done in the glue logic.\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-297-\t */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:298:\tstmmac_res.irq = platform_get_irq(pdev, 0);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:299:\tif (stmmac_res.irq \u003c 0)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:300:\t\treturn stmmac_res.irq;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:301:\tstmmac_res.wol_irq = stmmac_res.irq;\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-302-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:303:\tstmmac_res.addr = devm_platform_ioremap_resource(pdev, 0);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:304:\tif (IS_ERR(stmmac_res.addr))\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:305:\t\treturn PTR_ERR(stmmac_res.addr);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-306-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:307:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-308-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-315-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:316:\tplat_dat-\u003estmmac_clk = stmmac_pltfr_find_clk(plat_dat,\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:317:\t\t\t\t\t\t     data-\u003estmmac_clk_name);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-318-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-319-\tif (data-\u003eprobe)\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:320:\t\tret = data-\u003eprobe(pdev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c-321-\tif (ret \u003c 0) {\n--\n\n"
}

13/2 2026/09/25 15:05 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 28668
							output: 40
							thoughts: 716
						

Thoughts:
**My Assessment of STMMAC Fuzzing Feasibility**

Okay, first things first, I need to see if syzkaller has any leads on STMMAC or `stmmac`. But, hold on... the instructions specifically warn against searching syzkaller's syzlang descriptions for terms like that, or expressions including "long syz_." Looks like I need to use `read-syz-spec` and `syz-grepper` instead. Let me just quickly check if those tools are even available in this session's tool declarations... Nope, looks like I'm limited to `default_api:grepper`, `default_api:read-file`, `default_api:codesearch-dir-index`, and `default_api:set-results`. So, I'll need to work around that limitation.

Now, let's refocus on the core rules. Reachability is key. We can only discover bugs in code that *executes* in standard virtualized environments. That means QEMU or GCE with software-emulated devices like netdev or tun/tap. Any structurally unreachable code is a no-go, even if it has assertions or complex logic. And, specifically, structurally unreachable hardware like vendor-specific PCIe switches, SmartNICs, or GPU drivers are out.

Alright, so the million-dollar question: Does QEMU or GCE emulate STMMAC or DWMAC? I need to check the list of devices QEMU provides. Okay, on x86_64, it's e1000, e1000e, igb, vmxnet3, virtio-net-pci, rtl8139, pcnet, ne2k_pci, sungem, i82550... No STMMAC in that list. And STMMAC, I recall, is a Synopsys DesignWare MAC / STMicroelectronics MAC Ethernet controller typically found on embedded SoCs like Allwinner, Rockchip, STM32, Renesas, NXP i.MX, and some specific Intel / Loongson / Motorcomm PCI chips. QEMU does *not* emulate STMMAC PCI cards. Even on ARM, the standard QEMU `virt` machine uses virtio-net-pci. So, the bottom line is that neither QEMU nor GCE emulates STMMAC hardware on x86_64.

That means the stmmac driver can't probe, no network device gets created, and functions like `stmmac_xdp_xmit_xdpf` can *never* be executed in a standard virtualized fuzzing environment. This driver, and any associated bugs, are unreachable within the defined scope.

Hang on... Let's double check if there are any mock or test drivers or virtual interfaces for stmmac just in case I missed something. Let's check `STMMAC_SELFTESTS` to see what `stmmac_selftests.c` actually does. Gotta be thorough.



14/2 2026/09/25 15:05 tool grepper
0m Args:
{
  "Expression": "stmmac_selftest",
  "PathPrefix": "drivers/net/ethernet/stmicro/stmmac/"
}

Results:
{
  "Output": "drivers/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-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h=439=struct timespec64 stmmac_calc_tas_basetime(ktime_t old_base_time,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-443-#if IS_ENABLED(CONFIG_STMMAC_SELFTESTS)\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:444:void stmmac_selftest_run(struct net_device *dev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-445-\t\t\t struct ethtool_test *etest, u64 *buf);\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:446:void stmmac_selftest_get_strings(struct stmmac_priv *priv, u8 *data);\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:447:int stmmac_selftest_get_count(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-448-#else\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:449:static inline void stmmac_selftest_run(struct net_device *dev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-450-\t\t\t\t       struct ethtool_test *etest, u64 *buf)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-453-}\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:454:static inline void stmmac_selftest_get_strings(struct stmmac_priv *priv,\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-455-\t\t\t\t\t       u8 *data)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-458-}\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:459:static inline int stmmac_selftest_get_count(struct stmmac_priv *priv)\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-460-{\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c=621=static int stmmac_get_sset_count(struct net_device *netdev, int sset)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-648-\tcase ETH_SS_TEST:\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:649:\t\treturn stmmac_selftest_get_count(priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-650-\tdefault:\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c=677=static void stmmac_get_strings(struct net_device *dev, u32 stringset, u8 *data)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-712-\tcase ETH_SS_TEST:\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:713:\t\tstmmac_selftest_get_strings(priv, p);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-714-\t\tbreak;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c=1092=static const struct ethtool_ops stmmac_ethtool_ops = {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-1105-\t.set_pauseparam = stmmac_set_pauseparam,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c:1106:\t.self_test = stmmac_selftest_run,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c-1107-\t.get_ethtool_stats = stmmac_get_ethtool_stats,\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c=1722=static const struct stmmac_test {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1725-\tint (*fn)(struct stmmac_priv *priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1726:} stmmac_selftests[] = {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1727-\t{\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1819-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1820:void stmmac_selftest_run(struct net_device *dev,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1821-\t\t\t struct ethtool_test *etest, u64 *buf)\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1823-\tstruct stmmac_priv *priv = netdev_priv(dev);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1824:\tint count = stmmac_selftest_get_count(priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1825-\tint i, ret;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1850-\tfor (i = 0; i \u003c count; i++) {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1851:\t\tret = stmmac_selftests[i].fn(priv);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1852-\t\tif (ret \u0026\u0026 (ret != -EOPNOTSUPP))\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1859-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1860:void stmmac_selftest_get_strings(struct stmmac_priv *priv, u8 *data)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1861-{\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1864-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1865:\tfor (i = 0; i \u003c stmmac_selftest_get_count(priv); i++) {\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1866-\t\tsnprintf(p, ETH_GSTRING_LEN, \"%2d. %s\", i + 1,\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1867:\t\t\t stmmac_selftests[i].name);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1868-\t\tp += ETH_GSTRING_LEN;\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1871-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1872:int stmmac_selftest_get_count(struct stmmac_priv *priv)\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1873-{\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c:1874:\treturn ARRAY_SIZE(stmmac_selftests);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c-1875-}\n"
}

15/2 2026/09/25 15:05 llm patch-evaluator
0m Model:
gemini-3.8-flash

Args:
null

Results:
null

Tokens:
							input: 32451
							output: 112
							thoughts: 976
						

Thoughts:
**Analysis of STMMAC Reachability for Fuzzing**

Okay, so `stmmac_selftests` are triggered through `ethtool`, which means we need a live `stmmac` network device. My primary concern is whether there are alternative means to instantiate or interact with `stmmac` without relying on actual hardware. Let me quickly consider possibilities: netdevsim, USB gadgets (CDC Ethernet, RNDIS, etc.), and PCI devices. Are there any emulated `stmmac` instances within QEMU?

Let me review the standard QEMU network devices by checking the QEMU sources (specifically `hw/net/`): I see familiar network devices like e1000, e1000e, igb, rtl8139, vmxnet3, and others. I noticed the cadence_gem, ftgmac100 and other vendor specific network drivers. A quick side note: I noticed allwinner-sun8i-emac...but wait, that's associated with ARM architectures. I'm targeting amd64, so it's irrelevant.

So, let's establish that my *target architecture is amd64*.

Based on my understanding, `stmmac` *requires* physical hardware: Intel Quark, Elkhart Lake, Tiger Lake GMAC, a Synopsys GMAC PCI prototype board, or Loongson PCI. Standard QEMU, and by extension GCE, on amd64 **does not** emulate any `stmmac` or DWMAC PCI device. This implies that on amd64, reaching the `stmmac` hardware is inherently impossible.

Now, let's revisit Section 2 from the instructions, specifically the "NEGATIVE CRITERIA": "Structurally unreachable hardware." It explicitly lists examples like vendor-specific PCIe switches, SmartNICs, or GPU drivers that mandate physical hardware, absent in standard QEMU. That is my situation!

Looking at the context, the modified file is `drivers/net/ethernet/stmicro/stmmac/stmmac_main.c` and the function of interest is `stmmac_xdp_xmit_xdpf`. This code is exclusively within the `stmmac` driver for STMicroelectronics/Synopsys Ethernet MACs. It's clear that these devices need physical ASIC/SoC/PCIe cards that are *not* emulated in standard QEMU/GCE on amd64. Therefore, the code I'm analyzing is structurally unreachable.

Let's summarize the results:
-   `WorthFuzzing`: false
-   `FocusSymbols`: \[ ]
-   `EnableConfigs`: \[ ]
-   `Reasoning`: The STMMAC driver is for STMicroelectronics/Synopsys DesignWare Ethernet MAC controllers and needs physical hardware not emulated in standard QEMU/GCE on amd64. Thus, the modified `stmmac_xdp_xmit_xdpf` code is structurally unreachable.

The analysis directly fulfills the instructions. We can now proceed with `set-results`.



16/2 2026/09/25 15:05 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch modifies stmmac_xdp_xmit_xdpf() in the STMMAC (STMicroelectronics / Synopsys DesignWare Ethernet MAC) driver. On the amd64 target architecture, this driver requires physical PCI devices or SoC platform hardware that is not emulated in standard QEMU or GCE virtual environments. Consequently, the modified code is structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch modifies stmmac_xdp_xmit_xdpf() in the STMMAC (STMicroelectronics / Synopsys DesignWare Ethernet MAC) driver. On the amd64 target architecture, this driver requires physical PCI devices or SoC platform hardware that is not emulated in standard QEMU or GCE virtual environments. Consequently, the modified code is structurally unreachable for fuzzing.",
  "WorthFuzzing": false
}

17/1 2026/09/25 15:05 action If
0m Args:
{
  "WorthFuzzing": false
}

Results:
null

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)