| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/15 18:35 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies DMA IRQ enable/disable handling, IRQ synchronization, and XDP open/release routines across the Synopsys DesignWare Ethernet (stmmac) driver family (dwmac-sun8i, dwmac4, dwmac, dwxgmac2, stmmac_main). The stmmac driver is designed for Synopsys DesignWare MAC IP cores found in specific embedded SoCs (ARM, RISC-V, MIPS) or specific physical PCI ASICs (Intel Quark/Elkhart Lake/Tiger Lake, Loongson, Motorcomm). None of these devices are emulated by standard QEMU or GCE virtualized environments on the target architecture (amd64). Because the underlying hardware is not emulated and cannot probe, the modified code paths are structurally unreachable during fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/15 18:35 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 52f823136edb829bdb40346dac09f84d9feb9adb\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Oct 15 18:35:35 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\nindex 48c52eb962335..af7acfc7a26fa 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c\n@@ -347,13 +347,13 @@ static void sun8i_dwmac_dump_mac_regs(struct mac_device_info *hw,\n \n static void sun8i_dwmac_enable_dma_irq(struct stmmac_priv *priv,\n \t\t\t\t void __iomem *ioaddr, u32 chan,\n-\t\t\t\t bool rx, bool tx)\n+\t\t\t\t u32 flags)\n {\n \tu32 value = readl(ioaddr + EMAC_INT_EN);\n \n-\tif (rx)\n+\tif (flags \u0026 STMMAC_DMA_IRQ_RX)\n \t\tvalue |= EMAC_RX_INT;\n-\tif (tx)\n+\tif (flags \u0026 STMMAC_DMA_IRQ_TX)\n \t\tvalue |= EMAC_TX_INT;\n \n \twritel(value, ioaddr + EMAC_INT_EN);\n@@ -361,13 +361,13 @@ static void sun8i_dwmac_enable_dma_irq(struct stmmac_priv *priv,\n \n static void sun8i_dwmac_disable_dma_irq(struct stmmac_priv *priv,\n \t\t\t\t\tvoid __iomem *ioaddr, u32 chan,\n-\t\t\t\t\tbool rx, bool tx)\n+\t\t\t\t\tu32 flags)\n {\n \tu32 value = readl(ioaddr + EMAC_INT_EN);\n \n-\tif (rx)\n+\tif (flags \u0026 STMMAC_DMA_IRQ_RX)\n \t\tvalue \u0026= ~EMAC_RX_INT;\n-\tif (tx)\n+\tif (flags \u0026 STMMAC_DMA_IRQ_TX)\n \t\tvalue \u0026= ~EMAC_TX_INT;\n \n \twritel(value, ioaddr + EMAC_INT_EN);\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h\nindex 43b036d4e95bd..ca8caade68079 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h\n@@ -175,9 +175,9 @@ static inline u32 dma_chanx_base_addr(const struct dwmac4_addrs *addrs,\n \n int dwmac4_dma_reset(void __iomem *ioaddr);\n void dwmac4_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx);\n+\t\t\t u32 chan, u32 group);\n void dwmac4_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx);\n+\t\t\t u32 chan, u32 group);\n void dwmac4_dma_start_tx(struct stmmac_priv *priv, void __iomem *ioaddr,\n \t\t\t u32 chan);\n void dwmac4_dma_stop_tx(struct stmmac_priv *priv, void __iomem *ioaddr,\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c\nindex a0249715fafaf..7c5881ca61e8b 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c\n@@ -109,30 +109,39 @@ void dwmac4_set_rx_ring_len(struct stmmac_priv *priv, void __iomem *ioaddr,\n \twritel(len, ioaddr + DMA_CHAN_RX_RING_LEN(dwmac4_addrs, chan));\n }\n \n+static u32 dwmac4_enable_dma_mask(u32 group)\n+{\n+\tu32 mask = 0;\n+\n+\tif (group \u0026 STMMAC_DMA_IRQ_RX)\n+\t\tmask |= DMA_CHAN_INTR_ENA_RIE;\n+\tif (group \u0026 STMMAC_DMA_IRQ_TX)\n+\t\tmask |= DMA_CHAN_INTR_ENA_TIE;\n+\tif (group \u0026 STMMAC_DMA_IRQ_OTHER)\n+\t\tmask |= DMA_CHAN_INTR_DEFAULT_MASK \u0026\n+\t\t\t~(DMA_CHAN_INTR_ENA_RIE | DMA_CHAN_INTR_ENA_TIE);\n+\n+\treturn mask;\n+}\n+\n void dwmac4_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx)\n+\t\t\t u32 chan, u32 group)\n {\n \tconst struct dwmac4_addrs *dwmac4_addrs = priv-\u003eplat-\u003edwmac4_addrs;\n \tu32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));\n \n-\tif (rx)\n-\t\tvalue |= DMA_CHAN_INTR_ENA_RIE;\n-\tif (tx)\n-\t\tvalue |= DMA_CHAN_INTR_ENA_TIE;\n+\tvalue |= dwmac4_enable_dma_mask(group);\n \n \twritel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));\n }\n \n void dwmac4_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx)\n+\t\t\t u32 chan, u32 group)\n {\n \tconst struct dwmac4_addrs *dwmac4_addrs = priv-\u003eplat-\u003edwmac4_addrs;\n \tu32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));\n \n-\tif (rx)\n-\t\tvalue \u0026= ~DMA_CHAN_INTR_ENA_RIE;\n-\tif (tx)\n-\t\tvalue \u0026= ~DMA_CHAN_INTR_ENA_TIE;\n+\tvalue \u0026= ~dwmac4_enable_dma_mask(group);\n \n \twritel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));\n }\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h\nindex e1c37ac2c99d2..6b4cad57610ca 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h\n@@ -145,9 +145,9 @@ static inline u32 dma_chan_base_addr(u32 base, u32 chan)\n void dwmac_enable_dma_transmission(void __iomem *ioaddr, u32 chan);\n void dwmac_enable_dma_reception(void __iomem *ioaddr, u32 chan);\n void dwmac_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx);\n+\t\t\t u32 chan, u32 group);\n void dwmac_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx);\n+\t\t\t u32 chan, u32 group);\n void dwmac_dma_start_tx(struct stmmac_priv *priv, void __iomem *ioaddr,\n \t\t\tu32 chan);\n void dwmac_dma_stop_tx(struct stmmac_priv *priv, void __iomem *ioaddr,\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c\nindex a0383f9486c2d..d746527198546 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c\n@@ -38,28 +38,37 @@ void dwmac_enable_dma_reception(void __iomem *ioaddr, u32 chan)\n \twritel(1, ioaddr + DMA_CHAN_RCV_POLL_DEMAND(chan));\n }\n \n+static u32 dwmac_enable_dma_mask(u32 group)\n+{\n+\tu32 mask = 0;\n+\n+\tif (group \u0026 STMMAC_DMA_IRQ_RX)\n+\t\tmask |= DMA_INTR_DEFAULT_RX;\n+\tif (group \u0026 STMMAC_DMA_IRQ_TX)\n+\t\tmask |= DMA_INTR_DEFAULT_TX;\n+\tif (group \u0026 STMMAC_DMA_IRQ_OTHER)\n+\t\tmask |= DMA_INTR_DEFAULT_MASK \u0026\n+\t\t\t~(DMA_INTR_DEFAULT_RX | DMA_INTR_DEFAULT_TX);\n+\n+\treturn mask;\n+}\n+\n void dwmac_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx)\n+\t\t\t u32 chan, u32 group)\n {\n \tu32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(chan));\n \n-\tif (rx)\n-\t\tvalue |= DMA_INTR_DEFAULT_RX;\n-\tif (tx)\n-\t\tvalue |= DMA_INTR_DEFAULT_TX;\n+\tvalue |= dwmac_enable_dma_mask(group);\n \n \twritel(value, ioaddr + DMA_CHAN_INTR_ENA(chan));\n }\n \n void dwmac_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx)\n+\t\t\t u32 chan, u32 group)\n {\n \tu32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(chan));\n \n-\tif (rx)\n-\t\tvalue \u0026= ~DMA_INTR_DEFAULT_RX;\n-\tif (tx)\n-\t\tvalue \u0026= ~DMA_INTR_DEFAULT_TX;\n+\tvalue \u0026= ~dwmac_enable_dma_mask(group);\n \n \twritel(value, ioaddr + DMA_CHAN_INTR_ENA(chan));\n }\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c\nindex ff83858ebc1f3..63459d1a73a95 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c\n@@ -228,30 +228,39 @@ static void dwxgmac2_dma_tx_mode(struct stmmac_priv *priv, void __iomem *ioaddr,\n \twritel(value, ioaddr + XGMAC_MTL_TXQ_OPMODE(channel));\n }\n \n+static u32 dwxgmac2_enable_dma_mask(u32 group)\n+{\n+\tu32 mask = 0;\n+\n+\tif (group \u0026 STMMAC_DMA_IRQ_RX)\n+\t\tmask |= XGMAC_DMA_INT_DEFAULT_RX;\n+\tif (group \u0026 STMMAC_DMA_IRQ_TX)\n+\t\tmask |= XGMAC_DMA_INT_DEFAULT_TX;\n+\tif (group \u0026 STMMAC_DMA_IRQ_OTHER)\n+\t\tmask |= XGMAC_DMA_INT_DEFAULT_EN \u0026\n+\t\t\t~(XGMAC_DMA_INT_DEFAULT_RX | XGMAC_DMA_INT_DEFAULT_TX);\n+\n+\treturn mask;\n+}\n+\n static void dwxgmac2_enable_dma_irq(struct stmmac_priv *priv,\n \t\t\t\t void __iomem *ioaddr, u32 chan,\n-\t\t\t\t bool rx, bool tx)\n+\t\t\t\t u32 group)\n {\n \tu32 value = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan));\n \n-\tif (rx)\n-\t\tvalue |= XGMAC_DMA_INT_DEFAULT_RX;\n-\tif (tx)\n-\t\tvalue |= XGMAC_DMA_INT_DEFAULT_TX;\n+\tvalue |= dwxgmac2_enable_dma_mask(group);\n \n \twritel(value, ioaddr + XGMAC_DMA_CH_INT_EN(chan));\n }\n \n static void dwxgmac2_disable_dma_irq(struct stmmac_priv *priv,\n \t\t\t\t void __iomem *ioaddr, u32 chan,\n-\t\t\t\t bool rx, bool tx)\n+\t\t\t\t u32 group)\n {\n \tu32 value = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan));\n \n-\tif (rx)\n-\t\tvalue \u0026= ~XGMAC_DMA_INT_DEFAULT_RX;\n-\tif (tx)\n-\t\tvalue \u0026= ~XGMAC_DMA_INT_DEFAULT_TX;\n+\tvalue \u0026= ~dwxgmac2_enable_dma_mask(group);\n \n \twritel(value, ioaddr + XGMAC_DMA_CH_INT_EN(chan));\n }\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h\nindex 5e2654c91b417..766a36e4fab66 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/hwif.h\n+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h\n@@ -163,6 +163,12 @@ struct stmmac_desc_ops {\n struct stmmac_dma_cfg;\n struct dma_features;\n \n+#define STMMAC_DMA_IRQ_RX BIT(0)\n+#define STMMAC_DMA_IRQ_TX BIT(1)\n+#define STMMAC_DMA_IRQ_OTHER BIT(2)\n+#define STMMAC_DMA_IRQ_TXRX (STMMAC_DMA_IRQ_TX | STMMAC_DMA_IRQ_RX)\n+#define STMMAC_DMA_IRQ_ALL (STMMAC_DMA_IRQ_TXRX | STMMAC_DMA_IRQ_OTHER)\n+\n /* Specific DMA helpers */\n struct stmmac_dma_ops {\n \t/* DMA core initialization */\n@@ -194,9 +200,9 @@ struct stmmac_dma_ops {\n \tvoid (*enable_dma_transmission)(void __iomem *ioaddr, u32 chan);\n \tvoid (*enable_dma_reception)(void __iomem *ioaddr, u32 chan);\n \tvoid (*enable_dma_irq)(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t u32 chan, bool rx, bool tx);\n+\t\t\t u32 chan, u32 group);\n \tvoid (*disable_dma_irq)(struct stmmac_priv *priv, void __iomem *ioaddr,\n-\t\t\t\tu32 chan, bool rx, bool tx);\n+\t\t\t\tu32 chan, u32 group);\n \tvoid (*start_tx)(struct stmmac_priv *priv, void __iomem *ioaddr,\n \t\t\t u32 chan);\n \tvoid (*stop_tx)(struct stmmac_priv *priv, void __iomem *ioaddr,\ndiff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\nindex b837e8e27a352..f1359637007e2 100644\n--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c\n@@ -144,6 +144,7 @@ static const char *stmmac_dwxgmac_phyif[4] = {\n \t[PHY_INTF_RGMII]\t= \"RGMII\",\n };\n \n+static void stmmac_synchronize_irq(struct net_device *dev);\n static irqreturn_t stmmac_interrupt(int irq, void *dev_id);\n /* For MSI interrupts handling */\n static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id);\n@@ -2515,7 +2516,24 @@ static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)\n \t\tunsigned long flags;\n \n \t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, 1, 1);\n+\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_ALL);\n+\t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n+\t}\n+}\n+\n+static void stmmac_disable_all_dma_irq(struct stmmac_priv *priv)\n+{\n+\tu8 rx_channels_count = priv-\u003eplat-\u003erx_queues_to_use;\n+\tu8 tx_channels_count = priv-\u003eplat-\u003etx_queues_to_use;\n+\tu8 dma_csr_ch = max(rx_channels_count, tx_channels_count);\n+\tu8 chan;\n+\n+\tfor (chan = 0; chan \u003c dma_csr_ch; chan++) {\n+\t\tstruct stmmac_channel *ch = \u0026priv-\u003echannel[chan];\n+\t\tunsigned long flags;\n+\n+\t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n+\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_ALL);\n \t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t}\n }\n@@ -3088,7 +3106,7 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan, u32 dir)\n \tif ((status \u0026 handle_rx) \u0026\u0026 (chan \u003c priv-\u003eplat-\u003erx_queues_to_use)) {\n \t\tif (napi_schedule_prep(rx_napi)) {\n \t\t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\t\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, 1, 0);\n+\t\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_RX);\n \t\t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t\t\t__napi_schedule(rx_napi);\n \t\t}\n@@ -3097,7 +3115,7 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan, u32 dir)\n \tif ((status \u0026 handle_tx) \u0026\u0026 (chan \u003c priv-\u003eplat-\u003etx_queues_to_use)) {\n \t\tif (napi_schedule_prep(tx_napi)) {\n \t\t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\t\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, 0, 1);\n+\t\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_TX);\n \t\t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t\t\t__napi_schedule(tx_napi);\n \t\t}\n@@ -3291,7 +3309,7 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)\n \t/* DMA CSR Channel configuration */\n \tfor (chan = 0; chan \u003c dma_csr_ch; chan++) {\n \t\tstmmac_init_chan(priv, priv-\u003eioaddr, priv-\u003eplat-\u003edma_cfg, chan);\n-\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, 1, 1);\n+\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_TXRX);\n \t}\n \n \t/* DMA RX Channel Configuration */\n@@ -3365,7 +3383,7 @@ static enum hrtimer_restart stmmac_tx_timer(struct hrtimer *t)\n \t\tunsigned long flags;\n \n \t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, ch-\u003eindex, 0, 1);\n+\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, ch-\u003eindex, STMMAC_DMA_IRQ_TX);\n \t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t\t__napi_schedule(napi);\n \t}\n@@ -3816,6 +3834,33 @@ static void stmmac_free_irq(struct net_device *dev,\n \t}\n }\n \n+static void stmmac_synchronize_irq(struct net_device *dev)\n+{\n+\tstruct stmmac_priv *priv = netdev_priv(dev);\n+\tstruct stmmac_msi *msi = priv-\u003emsi;\n+\tint j;\n+\n+\tfor (j = priv-\u003eplat-\u003etx_queues_to_use - 1; msi \u0026\u0026 j \u003e= 0; j--) {\n+\t\tif (msi-\u003etx_irq[j] \u003e 0)\n+\t\t\tsynchronize_irq(msi-\u003etx_irq[j]);\n+\t}\n+\n+\tfor (j = priv-\u003eplat-\u003erx_queues_to_use - 1; msi \u0026\u0026 j \u003e= 0; j--) {\n+\t\tif (msi-\u003erx_irq[j] \u003e 0)\n+\t\t\tsynchronize_irq(msi-\u003erx_irq[j]);\n+\t}\n+\n+\tif (msi \u0026\u0026 msi-\u003esfty_ue_irq \u003e 0 \u0026\u0026 msi-\u003esfty_ue_irq != dev-\u003eirq)\n+\t\tsynchronize_irq(msi-\u003esfty_ue_irq);\n+\tif (msi \u0026\u0026 msi-\u003esfty_ce_irq \u003e 0 \u0026\u0026 msi-\u003esfty_ce_irq != dev-\u003eirq)\n+\t\tsynchronize_irq(msi-\u003esfty_ce_irq);\n+\tif (priv-\u003ewol_irq \u003e 0 \u0026\u0026 priv-\u003ewol_irq != dev-\u003eirq)\n+\t\tsynchronize_irq(priv-\u003ewol_irq);\n+\tif (priv-\u003esfty_irq \u003e 0 \u0026\u0026 priv-\u003esfty_irq != dev-\u003eirq)\n+\t\tsynchronize_irq(priv-\u003esfty_irq);\n+\tsynchronize_irq(dev-\u003eirq);\n+}\n+\n static int stmmac_msi_init(struct stmmac_priv *priv,\n \t\t\t struct stmmac_resources *res)\n {\n@@ -6013,7 +6058,7 @@ static int stmmac_napi_poll_rx(struct napi_struct *napi, int budget)\n \t\tunsigned long flags;\n \n \t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, 1, 0);\n+\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_RX);\n \t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t}\n \n@@ -6042,7 +6087,7 @@ static int stmmac_napi_poll_tx(struct napi_struct *napi, int budget)\n \t\tunsigned long flags;\n \n \t\tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, 0, 1);\n+\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_TX);\n \t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t}\n \n@@ -6095,7 +6140,7 @@ static int stmmac_napi_poll_rxtx(struct napi_struct *napi, int budget)\n \t\t/* Both RX and TX work done are complete,\n \t\t * so enable both RX \u0026 TX IRQs.\n \t\t */\n-\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, 1, 1);\n+\t\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, chan, STMMAC_DMA_IRQ_TXRX);\n \t\tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \t}\n \n@@ -7032,7 +7077,7 @@ void stmmac_disable_rx_queue(struct stmmac_priv *priv, u32 queue)\n \tunsigned long flags;\n \n \tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, queue, 1, 0);\n+\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, queue, STMMAC_DMA_IRQ_RX);\n \tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \n \tstmmac_stop_rx_dma(priv, queue);\n@@ -7072,7 +7117,7 @@ void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)\n \tstmmac_start_rx_dma(priv, queue);\n \n \tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, queue, 1, 0);\n+\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, queue, STMMAC_DMA_IRQ_RX);\n \tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n }\n \n@@ -7082,7 +7127,7 @@ void stmmac_disable_tx_queue(struct stmmac_priv *priv, u32 queue)\n \tunsigned long flags;\n \n \tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, queue, 0, 1);\n+\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, queue, STMMAC_DMA_IRQ_TX);\n \tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n \n \tstmmac_stop_tx_dma(priv, queue);\n@@ -7123,7 +7168,7 @@ void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)\n \tstmmac_start_tx_dma(priv, queue);\n \n \tspin_lock_irqsave(\u0026ch-\u003elock, flags);\n-\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, queue, 0, 1);\n+\tstmmac_enable_dma_irq(priv, priv-\u003eioaddr, queue, STMMAC_DMA_IRQ_TX);\n \tspin_unlock_irqrestore(\u0026ch-\u003elock, flags);\n }\n \n@@ -7141,8 +7186,9 @@ void stmmac_xdp_release(struct net_device *dev)\n \tfor (chan = 0; chan \u003c priv-\u003eplat-\u003etx_queues_to_use; chan++)\n \t\thrtimer_cancel(\u0026priv-\u003edma_conf.tx_queue[chan].txtimer);\n \n-\t/* Free the IRQ lines */\n-\tstmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);\n+\t/* Silence DMA interrupts */\n+\tstmmac_disable_all_dma_irq(priv);\n+\tstmmac_synchronize_irq(dev);\n \n \t/* Stop TX/RX DMA channels */\n \tstmmac_stop_all_dma(priv);\n@@ -7165,7 +7211,6 @@ int stmmac_xdp_open(struct net_device *dev)\n \tstruct stmmac_priv *priv = netdev_priv(dev);\n \tu8 rx_cnt = priv-\u003eplat-\u003erx_queues_to_use;\n \tu8 tx_cnt = priv-\u003eplat-\u003etx_queues_to_use;\n-\tu8 dma_csr_ch = max(rx_cnt, tx_cnt);\n \tstruct stmmac_rx_queue *rx_q;\n \tstruct stmmac_tx_queue *tx_q;\n \tbool sph_en;\n@@ -7188,12 +7233,6 @@ int stmmac_xdp_open(struct net_device *dev)\n \n \tstmmac_reset_queues_param(priv);\n \n-\t/* DMA CSR Channel configuration */\n-\tfor (chan = 0; chan \u003c dma_csr_ch; chan++) {\n-\t\tstmmac_init_chan(priv, priv-\u003eioaddr, priv-\u003eplat-\u003edma_cfg, chan);\n-\t\tstmmac_disable_dma_irq(priv, priv-\u003eioaddr, chan, 1, 1);\n-\t}\n-\n \t/* Adjust Split header */\n \tsph_en = (priv-\u003ehw-\u003erx_csum \u003e 0) \u0026\u0026 priv-\u003esph_active;\n \n@@ -7230,10 +7269,6 @@ int stmmac_xdp_open(struct net_device *dev)\n \t/* Start Rx \u0026 Tx DMA Channels */\n \tstmmac_start_all_dma(priv);\n \n-\tret = stmmac_request_irq(dev);\n-\tif (ret)\n-\t\tgoto irq_error;\n-\n \t/* Enable NAPI process*/\n \tstmmac_enable_all_queues(priv);\n \tnetif_carrier_on(dev);\n@@ -7242,10 +7277,6 @@ int stmmac_xdp_open(struct net_device *dev)\n \n \treturn 0;\n \n-irq_error:\n-\tfor (chan = 0; chan \u003c priv-\u003eplat-\u003etx_queues_to_use; chan++)\n-\t\thrtimer_cancel(\u0026priv-\u003edma_conf.tx_queue[chan].txtimer);\n-\n init_error:\n \tfree_dma_desc_resources(priv, \u0026priv-\u003edma_conf);\n dma_desc_error:\n"
} |
| 2/1 | 2026/10/15 18:35 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies DMA IRQ enable/disable handling, IRQ synchronization, and XDP open/release routines across the Synopsys DesignWare Ethernet (stmmac) driver family (dwmac-sun8i, dwmac4, dwmac, dwxgmac2, stmmac_main). The stmmac driver is designed for Synopsys DesignWare MAC IP cores found in specific embedded SoCs (ARM, RISC-V, MIPS) or specific physical PCI ASICs (Intel Quark/Elkhart Lake/Tiger Lake, Loongson, Motorcomm). None of these devices are emulated by standard QEMU or GCE virtualized environments on the target architecture (amd64). Because the underlying hardware is not emulated and cannot probe, the modified code paths are structurally unreachable during 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 52f823136edb829bdb40346dac09f84d9feb9adb
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Oct 15 18:35:35 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 48c52eb962335..af7acfc7a26fa 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -347,13 +347,13 @@ static void sun8i_dwmac_dump_mac_regs(struct mac_device_info *hw,
static void sun8i_dwmac_enable_dma_irq(struct stmmac_priv *priv,
void __iomem *ioaddr, u32 chan,
- bool rx, bool tx)
+ u32 flags)
{
u32 value = readl(ioaddr + EMAC_INT_EN);
- if (rx)
+ if (flags & STMMAC_DMA_IRQ_RX)
value |= EMAC_RX_INT;
- if (tx)
+ if (flags & STMMAC_DMA_IRQ_TX)
value |= EMAC_TX_INT;
writel(value, ioaddr + EMAC_INT_EN);
@@ -361,13 +361,13 @@ static void sun8i_dwmac_enable_dma_irq(struct stmmac_priv *priv,
static void sun8i_dwmac_disable_dma_irq(struct stmmac_priv *priv,
void __iomem *ioaddr, u32 chan,
- bool rx, bool tx)
+ u32 flags)
{
u32 value = readl(ioaddr + EMAC_INT_EN);
- if (rx)
+ if (flags & STMMAC_DMA_IRQ_RX)
value &= ~EMAC_RX_INT;
- if (tx)
+ if (flags & STMMAC_DMA_IRQ_TX)
value &= ~EMAC_TX_INT;
writel(value, ioaddr + EMAC_INT_EN);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
index 43b036d4e95bd..ca8caade68079 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
@@ -175,9 +175,9 @@ static inline u32 dma_chanx_base_addr(const struct dwmac4_addrs *addrs,
int dwmac4_dma_reset(void __iomem *ioaddr);
void dwmac4_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx);
+ u32 chan, u32 group);
void dwmac4_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx);
+ u32 chan, u32 group);
void dwmac4_dma_start_tx(struct stmmac_priv *priv, void __iomem *ioaddr,
u32 chan);
void dwmac4_dma_stop_tx(struct stmmac_priv *priv, void __iomem *ioaddr,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
index a0249715fafaf..7c5881ca61e8b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
@@ -109,30 +109,39 @@ void dwmac4_set_rx_ring_len(struct stmmac_priv *priv, void __iomem *ioaddr,
writel(len, ioaddr + DMA_CHAN_RX_RING_LEN(dwmac4_addrs, chan));
}
+static u32 dwmac4_enable_dma_mask(u32 group)
+{
+ u32 mask = 0;
+
+ if (group & STMMAC_DMA_IRQ_RX)
+ mask |= DMA_CHAN_INTR_ENA_RIE;
+ if (group & STMMAC_DMA_IRQ_TX)
+ mask |= DMA_CHAN_INTR_ENA_TIE;
+ if (group & STMMAC_DMA_IRQ_OTHER)
+ mask |= DMA_CHAN_INTR_DEFAULT_MASK &
+ ~(DMA_CHAN_INTR_ENA_RIE | DMA_CHAN_INTR_ENA_TIE);
+
+ return mask;
+}
+
void dwmac4_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx)
+ u32 chan, u32 group)
{
const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
u32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
- if (rx)
- value |= DMA_CHAN_INTR_ENA_RIE;
- if (tx)
- value |= DMA_CHAN_INTR_ENA_TIE;
+ value |= dwmac4_enable_dma_mask(group);
writel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
}
void dwmac4_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx)
+ u32 chan, u32 group)
{
const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
u32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
- if (rx)
- value &= ~DMA_CHAN_INTR_ENA_RIE;
- if (tx)
- value &= ~DMA_CHAN_INTR_ENA_TIE;
+ value &= ~dwmac4_enable_dma_mask(group);
writel(value, ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
index e1c37ac2c99d2..6b4cad57610ca 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
@@ -145,9 +145,9 @@ static inline u32 dma_chan_base_addr(u32 base, u32 chan)
void dwmac_enable_dma_transmission(void __iomem *ioaddr, u32 chan);
void dwmac_enable_dma_reception(void __iomem *ioaddr, u32 chan);
void dwmac_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx);
+ u32 chan, u32 group);
void dwmac_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx);
+ u32 chan, u32 group);
void dwmac_dma_start_tx(struct stmmac_priv *priv, void __iomem *ioaddr,
u32 chan);
void dwmac_dma_stop_tx(struct stmmac_priv *priv, void __iomem *ioaddr,
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
index a0383f9486c2d..d746527198546 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
@@ -38,28 +38,37 @@ void dwmac_enable_dma_reception(void __iomem *ioaddr, u32 chan)
writel(1, ioaddr + DMA_CHAN_RCV_POLL_DEMAND(chan));
}
+static u32 dwmac_enable_dma_mask(u32 group)
+{
+ u32 mask = 0;
+
+ if (group & STMMAC_DMA_IRQ_RX)
+ mask |= DMA_INTR_DEFAULT_RX;
+ if (group & STMMAC_DMA_IRQ_TX)
+ mask |= DMA_INTR_DEFAULT_TX;
+ if (group & STMMAC_DMA_IRQ_OTHER)
+ mask |= DMA_INTR_DEFAULT_MASK &
+ ~(DMA_INTR_DEFAULT_RX | DMA_INTR_DEFAULT_TX);
+
+ return mask;
+}
+
void dwmac_enable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx)
+ u32 chan, u32 group)
{
u32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(chan));
- if (rx)
- value |= DMA_INTR_DEFAULT_RX;
- if (tx)
- value |= DMA_INTR_DEFAULT_TX;
+ value |= dwmac_enable_dma_mask(group);
writel(value, ioaddr + DMA_CHAN_INTR_ENA(chan));
}
void dwmac_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx)
+ u32 chan, u32 group)
{
u32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(chan));
- if (rx)
- value &= ~DMA_INTR_DEFAULT_RX;
- if (tx)
- value &= ~DMA_INTR_DEFAULT_TX;
+ value &= ~dwmac_enable_dma_mask(group);
writel(value, ioaddr + DMA_CHAN_INTR_ENA(chan));
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
index ff83858ebc1f3..63459d1a73a95 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c
@@ -228,30 +228,39 @@ static void dwxgmac2_dma_tx_mode(struct stmmac_priv *priv, void __iomem *ioaddr,
writel(value, ioaddr + XGMAC_MTL_TXQ_OPMODE(channel));
}
+static u32 dwxgmac2_enable_dma_mask(u32 group)
+{
+ u32 mask = 0;
+
+ if (group & STMMAC_DMA_IRQ_RX)
+ mask |= XGMAC_DMA_INT_DEFAULT_RX;
+ if (group & STMMAC_DMA_IRQ_TX)
+ mask |= XGMAC_DMA_INT_DEFAULT_TX;
+ if (group & STMMAC_DMA_IRQ_OTHER)
+ mask |= XGMAC_DMA_INT_DEFAULT_EN &
+ ~(XGMAC_DMA_INT_DEFAULT_RX | XGMAC_DMA_INT_DEFAULT_TX);
+
+ return mask;
+}
+
static void dwxgmac2_enable_dma_irq(struct stmmac_priv *priv,
void __iomem *ioaddr, u32 chan,
- bool rx, bool tx)
+ u32 group)
{
u32 value = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan));
- if (rx)
- value |= XGMAC_DMA_INT_DEFAULT_RX;
- if (tx)
- value |= XGMAC_DMA_INT_DEFAULT_TX;
+ value |= dwxgmac2_enable_dma_mask(group);
writel(value, ioaddr + XGMAC_DMA_CH_INT_EN(chan));
}
static void dwxgmac2_disable_dma_irq(struct stmmac_priv *priv,
void __iomem *ioaddr, u32 chan,
- bool rx, bool tx)
+ u32 group)
{
u32 value = readl(ioaddr + XGMAC_DMA_CH_INT_EN(chan));
- if (rx)
- value &= ~XGMAC_DMA_INT_DEFAULT_RX;
- if (tx)
- value &= ~XGMAC_DMA_INT_DEFAULT_TX;
+ value &= ~dwxgmac2_enable_dma_mask(group);
writel(value, ioaddr + XGMAC_DMA_CH_INT_EN(chan));
}
diff --git a/drivers/net/ethernet/stmicro/stmmac/hwif.h b/drivers/net/ethernet/stmicro/stmmac/hwif.h
index 5e2654c91b417..766a36e4fab66 100644
--- a/drivers/net/ethernet/stmicro/stmmac/hwif.h
+++ b/drivers/net/ethernet/stmicro/stmmac/hwif.h
@@ -163,6 +163,12 @@ struct stmmac_desc_ops {
struct stmmac_dma_cfg;
struct dma_features;
+#define STMMAC_DMA_IRQ_RX BIT(0)
+#define STMMAC_DMA_IRQ_TX BIT(1)
+#define STMMAC_DMA_IRQ_OTHER BIT(2)
+#define STMMAC_DMA_IRQ_TXRX (STMMAC_DMA_IRQ_TX | STMMAC_DMA_IRQ_RX)
+#define STMMAC_DMA_IRQ_ALL (STMMAC_DMA_IRQ_TXRX | STMMAC_DMA_IRQ_OTHER)
+
/* Specific DMA helpers */
struct stmmac_dma_ops {
/* DMA core initialization */
@@ -194,9 +200,9 @@ struct stmmac_dma_ops {
void (*enable_dma_transmission)(void __iomem *ioaddr, u32 chan);
void (*enable_dma_reception)(void __iomem *ioaddr, u32 chan);
void (*enable_dma_irq)(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx);
+ u32 chan, u32 group);
void (*disable_dma_irq)(struct stmmac_priv *priv, void __iomem *ioaddr,
- u32 chan, bool rx, bool tx);
+ u32 chan, u32 group);
void (*start_tx)(struct stmmac_priv *priv, void __iomem *ioaddr,
u32 chan);
void (*stop_tx)(struct stmmac_priv *priv, void __iomem *ioaddr,
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b837e8e27a352..f1359637007e2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -144,6 +144,7 @@ static const char *stmmac_dwxgmac_phyif[4] = {
[PHY_INTF_RGMII] = "RGMII",
};
+static void stmmac_synchronize_irq(struct net_device *dev);
static irqreturn_t stmmac_interrupt(int irq, void *dev_id);
/* For MSI interrupts handling */
static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id);
@@ -2515,7 +2516,24 @@ static void stmmac_enable_all_dma_irq(struct stmmac_priv *priv)
unsigned long flags;
spin_lock_irqsave(&ch->lock, flags);
- stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_ALL);
+ spin_unlock_irqrestore(&ch->lock, flags);
+ }
+}
+
+static void stmmac_disable_all_dma_irq(struct stmmac_priv *priv)
+{
+ u8 rx_channels_count = priv->plat->rx_queues_to_use;
+ u8 tx_channels_count = priv->plat->tx_queues_to_use;
+ u8 dma_csr_ch = max(rx_channels_count, tx_channels_count);
+ u8 chan;
+
+ for (chan = 0; chan < dma_csr_ch; chan++) {
+ struct stmmac_channel *ch = &priv->channel[chan];
+ unsigned long flags;
+
+ spin_lock_irqsave(&ch->lock, flags);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_ALL);
spin_unlock_irqrestore(&ch->lock, flags);
}
}
@@ -3088,7 +3106,7 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan, u32 dir)
if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) {
if (napi_schedule_prep(rx_napi)) {
spin_lock_irqsave(&ch->lock, flags);
- stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 0);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_RX);
spin_unlock_irqrestore(&ch->lock, flags);
__napi_schedule(rx_napi);
}
@@ -3097,7 +3115,7 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan, u32 dir)
if ((status & handle_tx) && (chan < priv->plat->tx_queues_to_use)) {
if (napi_schedule_prep(tx_napi)) {
spin_lock_irqsave(&ch->lock, flags);
- stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 0, 1);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_TX);
spin_unlock_irqrestore(&ch->lock, flags);
__napi_schedule(tx_napi);
}
@@ -3291,7 +3309,7 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
/* DMA CSR Channel configuration */
for (chan = 0; chan < dma_csr_ch; chan++) {
stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
- stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_TXRX);
}
/* DMA RX Channel Configuration */
@@ -3365,7 +3383,7 @@ static enum hrtimer_restart stmmac_tx_timer(struct hrtimer *t)
unsigned long flags;
spin_lock_irqsave(&ch->lock, flags);
- stmmac_disable_dma_irq(priv, priv->ioaddr, ch->index, 0, 1);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, ch->index, STMMAC_DMA_IRQ_TX);
spin_unlock_irqrestore(&ch->lock, flags);
__napi_schedule(napi);
}
@@ -3816,6 +3834,33 @@ static void stmmac_free_irq(struct net_device *dev,
}
}
+static void stmmac_synchronize_irq(struct net_device *dev)
+{
+ struct stmmac_priv *priv = netdev_priv(dev);
+ struct stmmac_msi *msi = priv->msi;
+ int j;
+
+ for (j = priv->plat->tx_queues_to_use - 1; msi && j >= 0; j--) {
+ if (msi->tx_irq[j] > 0)
+ synchronize_irq(msi->tx_irq[j]);
+ }
+
+ for (j = priv->plat->rx_queues_to_use - 1; msi && j >= 0; j--) {
+ if (msi->rx_irq[j] > 0)
+ synchronize_irq(msi->rx_irq[j]);
+ }
+
+ if (msi && msi->sfty_ue_irq > 0 && msi->sfty_ue_irq != dev->irq)
+ synchronize_irq(msi->sfty_ue_irq);
+ if (msi && msi->sfty_ce_irq > 0 && msi->sfty_ce_irq != dev->irq)
+ synchronize_irq(msi->sfty_ce_irq);
+ if (priv->wol_irq > 0 && priv->wol_irq != dev->irq)
+ synchronize_irq(priv->wol_irq);
+ if (priv->sfty_irq > 0 && priv->sfty_irq != dev->irq)
+ synchronize_irq(priv->sfty_irq);
+ synchronize_irq(dev->irq);
+}
+
static int stmmac_msi_init(struct stmmac_priv *priv,
struct stmmac_resources *res)
{
@@ -6013,7 +6058,7 @@ static int stmmac_napi_poll_rx(struct napi_struct *napi, int budget)
unsigned long flags;
spin_lock_irqsave(&ch->lock, flags);
- stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 0);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_RX);
spin_unlock_irqrestore(&ch->lock, flags);
}
@@ -6042,7 +6087,7 @@ static int stmmac_napi_poll_tx(struct napi_struct *napi, int budget)
unsigned long flags;
spin_lock_irqsave(&ch->lock, flags);
- stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 0, 1);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_TX);
spin_unlock_irqrestore(&ch->lock, flags);
}
@@ -6095,7 +6140,7 @@ static int stmmac_napi_poll_rxtx(struct napi_struct *napi, int budget)
/* Both RX and TX work done are complete,
* so enable both RX & TX IRQs.
*/
- stmmac_enable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, chan, STMMAC_DMA_IRQ_TXRX);
spin_unlock_irqrestore(&ch->lock, flags);
}
@@ -7032,7 +7077,7 @@ void stmmac_disable_rx_queue(struct stmmac_priv *priv, u32 queue)
unsigned long flags;
spin_lock_irqsave(&ch->lock, flags);
- stmmac_disable_dma_irq(priv, priv->ioaddr, queue, 1, 0);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, queue, STMMAC_DMA_IRQ_RX);
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_rx_dma(priv, queue);
@@ -7072,7 +7117,7 @@ void stmmac_enable_rx_queue(struct stmmac_priv *priv, u32 queue)
stmmac_start_rx_dma(priv, queue);
spin_lock_irqsave(&ch->lock, flags);
- stmmac_enable_dma_irq(priv, priv->ioaddr, queue, 1, 0);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, queue, STMMAC_DMA_IRQ_RX);
spin_unlock_irqrestore(&ch->lock, flags);
}
@@ -7082,7 +7127,7 @@ void stmmac_disable_tx_queue(struct stmmac_priv *priv, u32 queue)
unsigned long flags;
spin_lock_irqsave(&ch->lock, flags);
- stmmac_disable_dma_irq(priv, priv->ioaddr, queue, 0, 1);
+ stmmac_disable_dma_irq(priv, priv->ioaddr, queue, STMMAC_DMA_IRQ_TX);
spin_unlock_irqrestore(&ch->lock, flags);
stmmac_stop_tx_dma(priv, queue);
@@ -7123,7 +7168,7 @@ void stmmac_enable_tx_queue(struct stmmac_priv *priv, u32 queue)
stmmac_start_tx_dma(priv, queue);
spin_lock_irqsave(&ch->lock, flags);
- stmmac_enable_dma_irq(priv, priv->ioaddr, queue, 0, 1);
+ stmmac_enable_dma_irq(priv, priv->ioaddr, queue, STMMAC_DMA_IRQ_TX);
spin_unlock_irqrestore(&ch->lock, flags);
}
@@ -7141,8 +7186,9 @@ void stmmac_xdp_release(struct net_device *dev)
for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
hrtimer_cancel(&priv->dma_conf.tx_queue[chan].txtimer);
- /* Free the IRQ lines */
- stmmac_free_irq(dev, REQ_IRQ_ERR_ALL, 0);
+ /* Silence DMA interrupts */
+ stmmac_disable_all_dma_irq(priv);
+ stmmac_synchronize_irq(dev);
/* Stop TX/RX DMA channels */
stmmac_stop_all_dma(priv);
@@ -7165,7 +7211,6 @@ int stmmac_xdp_open(struct net_device *dev)
struct stmmac_priv *priv = netdev_priv(dev);
u8 rx_cnt = priv->plat->rx_queues_to_use;
u8 tx_cnt = priv->plat->tx_queues_to_use;
- u8 dma_csr_ch = max(rx_cnt, tx_cnt);
struct stmmac_rx_queue *rx_q;
struct stmmac_tx_queue *tx_q;
bool sph_en;
@@ -7188,12 +7233,6 @@ int stmmac_xdp_open(struct net_device *dev)
stmmac_reset_queues_param(priv);
- /* DMA CSR Channel configuration */
- for (chan = 0; chan < dma_csr_ch; chan++) {
- stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
- stmmac_disable_dma_irq(priv, priv->ioaddr, chan, 1, 1);
- }
-
/* Adjust Split header */
sph_en = (priv->hw->rx_csum > 0) && priv->sph_active;
@@ -7230,10 +7269,6 @@ int stmmac_xdp_open(struct net_device *dev)
/* Start Rx & Tx DMA Channels */
stmmac_start_all_dma(priv);
- ret = stmmac_request_irq(dev);
- if (ret)
- goto irq_error;
-
/* Enable NAPI process*/
stmmac_enable_all_queues(priv);
netif_carrier_on(dev);
@@ -7242,10 +7277,6 @@ int stmmac_xdp_open(struct net_device *dev)
return 0;
-irq_error:
- for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++)
- hrtimer_cancel(&priv->dma_conf.tx_queue[chan].txtimer);
-
init_error:
free_dma_desc_resources(priv, &priv->dma_conf);
dma_desc_error:
|
| 3/2 | 2026/10/15 18:35 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 11014 output: 48 thoughts: 263 Thoughts: **Analyzing a Potential Syzkaller Fuzzing Target: The stmmac Driver** Okay, let's break this down. A new patch has come across my desk, and the first question is always: does this warrant a closer look for fuzzing potential with syzkaller? It modifies several files within the `drivers/net/ethernet/stmicro/stmmac/` directory: `dwmac-sun8i.c`, `dwmac4_dma.h`, `dwmac4_lib.c`, `dwmac_dma.h`, `dwmac_lib.c`, `dwxgmac2_dma.c`, `hwif.h`, and `stmmac_main.c`. The sheer breadth of the changes within this driver directory makes my internal alarms go off - this could be interesting. First, I need to understand what `stmmac` actually *is*. Ah, right, it's the Synopsys DesignWare Ethernet MAC driver, often associated with STMicroelectronics and Synopsys DWMAC hardware. Okay, that's helpful. Now, the crucial question: can we get at this in a syzkaller fuzzing environment on amd64? This is the make-or-break point. So, I need to quickly determine whether `stmmac` is hardware that's emulated in QEMU (and accessible in a standard AMD64 syzkaller setup), or if it's reachable via a platform device, or maybe even has a PCI component. If we can't reliably get the driver running in an environment syzkaller can reach, it's not a high-priority target for fuzzing. I'll use `grepper` to see what I can find. I need to look for PCI IDs, platform drivers, and any other clues that might tell me where `stmmac` is used. This should give me a good indication of the attack surface, and determine if it's worth the effort of setting up a syzkaller environment to target this. |
| 4/2 | 2026/10/15 18:35 | tool | grepper |
0mArgs:{
"Expression": "pci_register_driver|module_pci_driver",
"PathPrefixes": [
"drivers/net/ethernet/stmicro/stmmac/"
]
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1417=static struct pci_driver intel_eth_pci_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1426-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1427:module_pci_driver(intel_eth_pci_driver);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1428-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c=604=static struct pci_driver loongson_dwmac_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-613-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:614:module_pci_driver(loongson_dwmac_driver);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c-615-\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c=373=static struct pci_driver dwmac_motorcomm_pci_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-382-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:383:module_pci_driver(dwmac_motorcomm_pci_driver);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c-384-\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c=212=static struct pci_driver stmmac_pci_driver = {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-221-\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:222:module_pci_driver(stmmac_pci_driver);\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c-223-\n"
} |
| 5/2 | 2026/10/15 18:35 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 12358 output: 69 thoughts: 67 Thoughts: **Investigating PCI Driver Compatibility with QEMU and stmmac** Okay, so I'm thinking about the different PCI drivers available for the stmmac ethernet core. I know there are a few, specifically `dwmac-intel`, `dwmac-loongson`, and `stmmac_pci`. My focus right now is on how these drivers interact with QEMU. Specifically, are any of these stmmac devices actually emulated within a QEMU environment? I need to figure out if my testing setup is viable, or if I need to adjust it. To clarify this, I'll need to check the PCI IDs associated with `stmmac_pci` and likely `dwmac-intel`, and see what's being recognized by QEMU. This will determine if the emulated hardware supports my intended use case. |
| 6/2 | 2026/10/15 18:36 | tool | grepper |
0mArgs:{
"Expression": "PCI_DEVICE",
"PathPrefixes": [
"drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c",
"drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c"
]
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1362=static void intel_eth_pci_remove(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1373-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1374:#define PCI_DEVICE_ID_INTEL_QUARK\t\t0x0937\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1375:#define PCI_DEVICE_ID_INTEL_EHL_RGMII1G\t\t0x4b30\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1376:#define PCI_DEVICE_ID_INTEL_EHL_SGMII1G\t\t0x4b31\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1377:#define PCI_DEVICE_ID_INTEL_EHL_SGMII2G5\t0x4b32\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1378-/* Intel(R) Programmable Services Engine (Intel(R) PSE) consist of 2 MAC\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1380- */\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1381:#define PCI_DEVICE_ID_INTEL_EHL_PSE0_RGMII1G\t0x4ba0\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1382:#define PCI_DEVICE_ID_INTEL_EHL_PSE0_SGMII1G\t0x4ba1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1383:#define PCI_DEVICE_ID_INTEL_EHL_PSE0_SGMII2G5\t0x4ba2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1384:#define PCI_DEVICE_ID_INTEL_EHL_PSE1_RGMII1G\t0x4bb0\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1385:#define PCI_DEVICE_ID_INTEL_EHL_PSE1_SGMII1G\t0x4bb1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1386:#define PCI_DEVICE_ID_INTEL_EHL_PSE1_SGMII2G5\t0x4bb2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1387:#define PCI_DEVICE_ID_INTEL_TGLH_SGMII1G_0\t0x43ac\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1388:#define PCI_DEVICE_ID_INTEL_TGLH_SGMII1G_1\t0x43a2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1389:#define PCI_DEVICE_ID_INTEL_TGL_SGMII1G\t\t0xa0ac\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1390:#define PCI_DEVICE_ID_INTEL_ADLS_SGMII1G_0\t0x7aac\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1391:#define PCI_DEVICE_ID_INTEL_ADLS_SGMII1G_1\t0x7aad\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1392:#define PCI_DEVICE_ID_INTEL_ADLN_SGMII1G\t0x54ac\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1393:#define PCI_DEVICE_ID_INTEL_RPLP_SGMII1G\t0x51ac\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1394-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c=1395=static const struct pci_device_id intel_eth_pci_id_table[] = {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1396:\t{ PCI_DEVICE_DATA(INTEL, QUARK, \u0026quark_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1397:\t{ PCI_DEVICE_DATA(INTEL, EHL_RGMII1G, \u0026ehl_rgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1398:\t{ PCI_DEVICE_DATA(INTEL, EHL_SGMII1G, \u0026ehl_sgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1399:\t{ PCI_DEVICE_DATA(INTEL, EHL_SGMII2G5, \u0026ehl_sgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1400:\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_RGMII1G, \u0026ehl_pse0_rgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1401:\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII1G, \u0026ehl_pse0_sgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1402:\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE0_SGMII2G5, \u0026ehl_pse0_sgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1403:\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_RGMII1G, \u0026ehl_pse1_rgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1404:\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII1G, \u0026ehl_pse1_sgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1405:\t{ PCI_DEVICE_DATA(INTEL, EHL_PSE1_SGMII2G5, \u0026ehl_pse1_sgmii1g_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1406:\t{ PCI_DEVICE_DATA(INTEL, TGL_SGMII1G, \u0026tgl_sgmii1g_phy0_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1407:\t{ PCI_DEVICE_DATA(INTEL, TGLH_SGMII1G_0, \u0026tgl_sgmii1g_phy0_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1408:\t{ PCI_DEVICE_DATA(INTEL, TGLH_SGMII1G_1, \u0026tgl_sgmii1g_phy1_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1409:\t{ PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_0, \u0026adls_sgmii1g_phy0_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1410:\t{ PCI_DEVICE_DATA(INTEL, ADLS_SGMII1G_1, \u0026adls_sgmii1g_phy1_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1411:\t{ PCI_DEVICE_DATA(INTEL, ADLN_SGMII1G, \u0026adln_sgmii1g_phy0_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1412:\t{ PCI_DEVICE_DATA(INTEL, RPLP_SGMII1G, \u0026adln_sgmii1g_phy0_info) },\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c-1413-\t{}\n--\ndrivers/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/10/15 18:36 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15348 output: 43 thoughts: 1246 Thoughts: **Analyzing the Reachability of STMMAC for Fuzzing** Okay, let's break this down. My primary question is: can I even reach and fuzz `stmmac` within the confines of QEMU? I need to figure out if it's emulated or accessible. First, I quickly review the network devices QEMU *does* emulate: `e1000`, `e1000e`, `igb`, etc. Nope, `stmmac` or `dwmac` isn't there. A quick check on ARM boards in QEMU reveals the Allwinner A10 has an EMAC, and the Orange Pi PC (Allwinner H3) has `allwinner-h3-emac`, but that's ARM, and this target is AMD64. Crucially, the specified target architecture is AMD64, so it needs to run on this architecture and not ARM. Alright, is there *any* way to instantiate `stmmac` in the AMD64 QEMU/GCE environment? Can `syzkaller` use some pseudo-device or USB trickery? No, that's not it. Driver registration or mock devices? Still no. Then I remind myself about the guiding principle: *reachability*. If code isn't executing in standard environments, it's a no-go for fuzzing. Section 2 spells it out: structurally unreachable hardware, like vendor-specific PCI stuff not emulated, is a dead end. That includes things like STMMAC, which is usually found in embedded SoCs like Allwinner, Rockchip, STM32, and Intel Quark/Elkhart Lake/Tiger Lake (which I know are *not* emulated on standard QEMU on AMD64). Okay, let's verify if `stmmac` is even emulated at all for x86_64/AMD64. I'm going to look in the QEMU source, specifically `hw/net/`. No `dwmac` or `stmmac` implementations there. The Allwinner stuff, like `allwinner_sun8i_emac.c`, is specifically for the Allwinner EMAC (not DWMAC), which I know is used in `orangepi-pc`, and is ARM-based. So that’s out. I search the QEMU sources specifically for "dwmac" and "stmmac" – nothing. They're simply not there. The Allwinner devices I found, like `allwinner-sun8i-emac.c`, emulate the EMAC, but it's *still* ARM, and I’m on AMD64. Can it be probed/instantiated at all on AMD64? I'm checking, can I at least see a `stmmac_pci_driver` or `intel_eth_pci_driver` in standard QEMU/Q35 machines? Nope. The standard QEMU network adapters are things like `e1000`, `igb`, `virtio-net-pci` etc., which I know are Intel and VirtIO-based. Again, none of these use `stmmac`. And finally, `dwmac-sun8i.c`? No, that's a platform driver for Allwinner SoCs (ARM), not x86/AMD64. The Kconfig confirms this. Therefore, since the code is structurally unreachable, I must return `WorthFuzzing=false`. |
| 8/2 | 2026/10/15 18:36 | tool | grepper |
0mArgs:{
"Expression": "config DWMAC_SUN8I",
"PathPrefixes": [
"drivers/net/ethernet/stmicro/stmmac/"
]
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/Kconfig=277=config DWMAC_SUNXI\n--\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-287-\ndrivers/net/ethernet/stmicro/stmmac/Kconfig:288:config DWMAC_SUN8I\ndrivers/net/ethernet/stmicro/stmmac/Kconfig-289-\ttristate \"Allwinner sun8i GMAC support\"\n"
} |
| 9/2 | 2026/10/15 18:36 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17525 output: 44 thoughts: 29 Thoughts: Okay, here's my interpretation of that thought process, assuming I'm a networking expert: **Investigating a Potential Ethernet Driver Configuration** Alright, so the task at hand seems to be diving into the `drivers/net/ethernet/stmicro/stmmac/Kconfig` file, specifically around line 288. My initial assumption is that we're looking at some sort of configuration option related to the STMicroelectronics STMMAC Ethernet driver. Given the filename, this is likely where all the kernel configuration options related to that driver are defined. This would contain conditional compilations, parameters, and other settings to toggle support for specific features, hardware variants, or performance characteristics. I'm going to start by pulling up that file and navigating to that location. I'm guessing that line 288 is a critical entry, perhaps a feature I need to understand, a bug that's been reported, or a hardware variant that I'm trying to enable or debug. I'll need to assess the surrounding context as well to fully understand the implication of that particular configuration item. Let's see what we've got. |
| 10/2 | 2026/10/15 18:36 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/stmicro/stmmac/Kconfig",
"FirstLine": 285,
"LineCount": 25
}Results: {
"Contents": " 285:\t\t stmmac device driver. This driver is used for A20/A31\n 286:\t\t GMAC ethernet controller.\n 287:\t\n 288:\tconfig DWMAC_SUN8I\n 289:\t\ttristate \"Allwinner sun8i GMAC support\"\n 290:\t\tdefault ARCH_SUNXI\n 291:\t\tdepends on OF \u0026\u0026 (ARCH_SUNXI || COMPILE_TEST)\n 292:\t\tselect MDIO_BUS_MUX\n 293:\t\thelp\n 294:\t\t Support for Allwinner H3 A83T A64 EMAC ethernet controllers.\n 295:\t\n 296:\t\t This selects Allwinner SoC glue layer support for the\n 297:\t\t stmmac device driver. This driver is used for H3/A83T/A64\n 298:\t\t EMAC ethernet controller.\n 299:\t\n 300:\tconfig DWMAC_SUN55I\n 301:\t\ttristate \"Allwinner sun55i GMAC200 support\"\n 302:\t\tdefault ARCH_SUNXI\n 303:\t\tdepends on OF \u0026\u0026 (ARCH_SUNXI || COMPILE_TEST)\n 304:\t\tselect MDIO_BUS_MUX\n 305:\t\thelp\n 306:\t\t Support for Allwinner A523/T527 GMAC200 ethernet controllers.\n 307:\t\n 308:\t\t This selects Allwinner SoC glue layer support for the\n 309:\t\t stmmac device driver. This driver is used for A523/T527\n"
} |
| 11/2 | 2026/10/15 18:36 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18266 output: 42 thoughts: 602 Thoughts: **Analyzing the STMMAC Driver Updates** Okay, here's the breakdown of this patch as I see it. It looks like we're dealing with interrupt handling in the STMMAC driver, specifically for the DWMAC variants targeted at Sunxi SoCs, which makes sense. The key is in how interrupts are enabled and disabled, and how this patch refactors that. First, I see the dependency: `DWMAC_SUN8I` relies on `OF && (ARCH_SUNXI || COMPILE_TEST)`. That's important context. It means this code is conditional on the device tree being used *and* either being on a Sunxi architecture, or a compile test. Looking at the code changes, there is a consistent pattern. The `sun8i_dwmac_enable_dma_irq` and `sun8i_dwmac_disable_dma_irq` functions are changing their parameter from two boolean values for Rx and Tx to a single `u32 flags` value. This is being consistently applied in `dwmac4_dma.h`, `dwmac4_lib.c`, `dwmac_dma.h`, `dwmac_lib.c`, and `dwxgmac2_dma.c`. I also see some new helper functions like `dwmac4_enable_dma_mask`, `dwmac_enable_dma_mask`, and `dwxgmac2_enable_dma_mask` handling cases like `STMMAC_DMA_IRQ_OTHER`. This is a very interesting change, as it allows more fine-grained control over interrupt enabling/disabling instead of just Rx/Tx. Also, the `hwif.h` file now defines `STMMAC_DMA_IRQ_RX` and other such flags and the function pointers in `struct stmmac_dma_ops` have been updated. The core of the change seems to be in `stmmac_main.c`. Here, we have `stmmac_enable_all_dma_irq` using the `STMMAC_DMA_IRQ_ALL` flag, along with `stmmac_disable_all_dma_irq` and `stmmac_synchronize_irq` being introduced. These are important additions. The changes to `stmmac_xdp_release` calling `stmmac_disable_all_dma_irq` and `stmmac_synchronize_irq` indicate a resource cleanup is now more complete, which is good. And, removing the DMA channel reinit from `stmmac_xdp_open` is interesting. Now, as I'm thinking through this, I need to understand the reachability of this code. Since this is strictly within the `drivers/net/ethernet/stmicro/stmmac/` directory, I should check whether it can ever be instantiated or probed on amd64 in a standard virtualized environment like QEMU or Google Compute Engine. I'm going to search the kernel code for calls to `stmmac` or `dwmac` to see if there are any platform device registrations or any virtual drivers that bind to it. This will give me a better understanding of where this code is used and whether it's relevant in the systems I deal with most often. |
| 12/2 | 2026/10/15 18:36 | tool | grepper |
0mArgs:{
"Expression": "\"stmmaceth\"|\"dwmac\"",
"PathPrefixes": [
"arch/x86/",
"drivers/"
]
}Results: {
"Output": "drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c=214=static int ipq806x_gmac_of_parse(struct ipq806x_gmac *gmac,\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c-234-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c:235:\tgmac-\u003ecore_clk = devm_clk_get(dev, \"stmmaceth\");\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c-236-\tif (IS_ERR(gmac-\u003ecore_clk)) {\n--\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-11-\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:12:#define STMMAC_RESOURCE_NAME \"stmmaceth\"\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h-13-\n"
} |
| 13/2 | 2026/10/15 18:36 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19924 output: 53 thoughts: 18 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Investigating Potential MAC Driver Integration Points** Right, let's dive straight in. My gut feeling is that the issue likely resides in the glue layer, specifically within the `stmmac_platform.c` driver, or perhaps a similar glue driver if this isn't the specific STMicroelectronics MAC. These platform drivers are where the low-level hardware configuration usually interfaces with the more generic MAC framework. This is the prime suspect. I need to quickly ascertain how the hardware resources, interrupt handling, and clock management are integrated with the core MAC driver logic. The devil, as always, is in the details of the silicon-specific configuration and its interaction with the generic stack. A systematic check of the register accesses and initialization sequences in these glue drivers is the most sensible first step. |
| 14/2 | 2026/10/15 18:36 | tool | grepper |
0mArgs:{
"Expression": "stmmac_probe_config_dt|stmmac_dvr_probe",
"PathPrefixes": [
"drivers/net/ethernet/stmicro/stmmac/"
]
}Results: {
"Output": "\nFull output is too long, showing 200 out of 342 lines.\nUse more precise expression or PathPrefixes if possible.\n\nNumber of matching lines per file (39 files in total):\ndrivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rk.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sti.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun55i.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c:3\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c:2\ndrivers/net/ethernet/stmicro/stmmac/dwmac-thead.c:1\ndrivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c:2\ndrivers/net/ethernet/stmicro/stmmac/stmmac.h:1\ndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c:5\ndrivers/net/ethernet/stmicro/stmmac/stmmac_pci.c:1\ndrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:9\ndrivers/net/ethernet/stmicro/stmmac/stmmac_platform.h:1\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-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-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-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-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-eic7700.c=167=static int eic7700_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c-180-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c:181:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c-182-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c=19=static int dwmac_generic_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c-29-\tif (pdev-\u003edev.of_node) {\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c:30:\t\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-generic.c-31-\t\tif (IS_ERR(plat_dat)) {\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c=293=static int imx_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c-308-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c:309:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-imx.c-310-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c=154=static int ingenic_mac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c-166-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c:167:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ingenic.c-168-\tif (IS_ERR(plat_dat))\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-53-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c:54:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-intel-plat.c-55-\tif (IS_ERR(plat_dat)) {\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-386-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c:387:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c-388-\tif (IS_ERR(plat_dat))\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-loongson1.c=158=static int ls1x_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c-187-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c:188:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-loongson1.c-189-\tif (IS_ERR(plat_dat))\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-52-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c:53:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-lpc18xx.c-54-\tif (IS_ERR(plat_dat))\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-630-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c:631:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c-632-\tif (IS_ERR(plat_dat))\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-57-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c:58:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson.c-59-\tif (IS_ERR(plat_dat))\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-392-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c:393:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c-394-\tif (IS_ERR(plat_dat))\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-nuvoton.c=82=static int nvt_gmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c-93-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c:94:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-nuvoton.c-95-\tif (IS_ERR(plat_dat))\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-698-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c:699:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c-700-\tif (IS_ERR(plat_dat)) {\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-145-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c:146:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c-147-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rk.c=1571=static int rk_gmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rk.c-1587-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rk.c:1588:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rk.c-1589-\tif (IS_ERR(plat_dat))\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-58-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c:59:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-rzn1.c-60-\tif (IS_ERR(plat_dat))\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-s32.c=144=static int s32_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-162-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c:163:\tplat = devm_stmmac_probe_config_dt(pdev, res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-s32.c-164-\tif (IS_ERR(plat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c=596=static int socfpga_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c-614-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:615:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c-616-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c=35=static int sophgo_dwmac_probe(struct platform_device *pdev)\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c-47-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c:48:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c-49-\tif (IS_ERR(plat_dat))\n--\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c-64-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c:65:\treturn stmmac_dvr_probe(dev, plat_dat, \u0026stmmac_res);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-sophgo.c-66-}\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-168-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c:169:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-spacemit.c-170-\tif (IS_ERR(plat_dat))\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-102-\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c:103:\tplat_dat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);\ndrivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c-104-\tif (IS_ERR(plat_dat))\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--\n\n"
} |
| 15/2 | 2026/10/15 18:36 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26961 output: 201 thoughts: 1102 Thoughts: **WorthFuzzing Assessment: stmmac Driver Refactoring** Okay, let's break this down. That initial list of SoCs and PCI devices – *anarion, dwc-qos-eth...* – is key. It's a comprehensive overview, but it clearly shows that this code, the stmmac driver and its variants (dwmac-sun8i, dwmac4, etc.), is tied to specific hardware platforms, either System-on-Chips (SoCs) based on ARM, RISC-V or MIPS architectures, or PCI devices. Specifically, none of these listed devices are emulated by a standard amd64 QEMU setup, which is our target fuzzing environment. I need to confirm that. Section 2 of the guidance highlights structurally unreachable hardware, and this list seems to align. It covers vendor-specific PCIe switches, and drivers requiring physical ASICs or PCIe cards not simulated in QEMU. Also, the section about unreachable execution paths mentions driver teardown callbacks which are only executed during physical PCI hot-unplug or manual sysfs unbinding. Looking back at Section 1, "REACHABILITY IS THE PRIMARY GATE", the fuzzing only discovers bugs in code executed in standard virtualized environments. I have to confirm that the stmmac driver *can* execute in this environment. It's time to verify. QEMU on amd64 has the standard virtual devices. *virtio-net, e1000, e1000e, igb, rtl8139, pcnet, ne2k_pci, vmxnet3, rocker, sungem, i82550...* And, as suspected, there is no stmmac or dwmac emulation present. Since the underlying hardware isn't present, the `stmmac_dvr_probe` function is never going to be called. Therefore, none of the driver code, including the interrupt handlers, NAPI polling, XDP code, or DMA interactions, can ever execute in a typical amd64 QEMU/GCE syzkaller fuzzing scenario. No mocks or loopback mechanisms exist, either. `stmmac` is firmly rooted in physical MMIO registers. I've confirmed that this driver's functionality isn't accessible via user-space or virtual buses (virtio, USB, etc.). It's a direct hardware driver, specifically for Synopsys DesignWare IP. And it's not reachable on the target architecture. So that settles it. **Therefore, WorthFuzzing must be false.** The focus will be empty, and no specific configurations will be enabled. Now, let me assemble a clear reasoning: 1. This patch refactors DMA IRQ enable/disable handling in the STMicroelectronics/Synopsys DesignWare MAC (stmmac) driver family using bitflags and modifies IRQ and XDP handling. 2. The stmmac driver is for Synopsys DesignWare Ethernet controllers found on embedded SoCs and certain physical PCI chips. QEMU/GCE on amd64 doesn't emulate these. 3. The modified code is unreachable in our standard fuzzing environment. Now, I'll invoke the `set-results` tool and move on. |
| 16/2 | 2026/10/15 18:36 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies DMA IRQ enable/disable handling, IRQ synchronization, and XDP open/release routines across the Synopsys DesignWare Ethernet (stmmac) driver family (dwmac-sun8i, dwmac4, dwmac, dwxgmac2, stmmac_main). The stmmac driver is designed for Synopsys DesignWare MAC IP cores found in specific embedded SoCs (ARM, RISC-V, MIPS) or specific physical PCI ASICs (Intel Quark/Elkhart Lake/Tiger Lake, Loongson, Motorcomm). None of these devices are emulated by standard QEMU or GCE virtualized environments on the target architecture (amd64). Because the underlying hardware is not emulated and cannot probe, the modified code paths are structurally unreachable during fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies DMA IRQ enable/disable handling, IRQ synchronization, and XDP open/release routines across the Synopsys DesignWare Ethernet (stmmac) driver family (dwmac-sun8i, dwmac4, dwmac, dwxgmac2, stmmac_main). The stmmac driver is designed for Synopsys DesignWare MAC IP cores found in specific embedded SoCs (ARM, RISC-V, MIPS) or specific physical PCI ASICs (Intel Quark/Elkhart Lake/Tiger Lake, Loongson, Motorcomm). None of these devices are emulated by standard QEMU or GCE virtualized environments on the target architecture (amd64). Because the underlying hardware is not emulated and cannot probe, the modified code paths are structurally unreachable during fuzzing.",
"WorthFuzzing": false
} |
| 17/1 | 2026/10/15 18:36 | 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) |
|---|