| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/03 10:41 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies the Microsoft Azure Network Adapter (MANA) Ethernet driver (drivers/net/ethernet/microsoft/mana/), which is a vendor-specific SmartNIC driver requiring Azure Hyper-V PCI hardware (depends on PCI_HYPERV and binds to Microsoft MANA PCI device IDs). This hardware is not emulated in standard QEMU or GCE virtualized fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/03 10:41 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit d47161c18b92ca45e19b3fc0decc63384a01c33f\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Oct 3 10:41:15 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ethernet/microsoft/mana/mana_bpf.c b/drivers/net/ethernet/microsoft/mana/mana_bpf.c\nindex 5c9961ee9747a..b27fd9b8c4f6d 100644\n--- a/drivers/net/ethernet/microsoft/mana/mana_bpf.c\n+++ b/drivers/net/ethernet/microsoft/mana/mana_bpf.c\n@@ -91,7 +91,7 @@ u32 mana_run_xdp(struct net_device *ndev, struct mana_rxq *rxq,\n \t\tgoto out;\n \n \txdp_init_buff(xdp, PAGE_SIZE, \u0026rxq-\u003exdp_rxq);\n-\txdp_prepare_buff(xdp, buf_va, XDP_PACKET_HEADROOM, pkt_len, true);\n+\txdp_prepare_buff(xdp, buf_va, rxq-\u003eheadroom, pkt_len, true);\n \n \tact = bpf_prog_run_xdp(prog, xdp);\n \n@@ -183,9 +183,9 @@ static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog,\n \tif (!old_prog \u0026\u0026 !prog)\n \t\treturn 0;\n \n-\tif (prog \u0026\u0026 ndev-\u003emtu \u003e MANA_XDP_MTU_MAX) {\n+\tif (prog \u0026\u0026 ndev-\u003emtu \u003e MANA_XDP_MTU_MAX(ndev)) {\n \t\tnetdev_err(ndev, \"XDP: mtu:%u too large, mtu_max:%lu\\n\",\n-\t\t\t ndev-\u003emtu, MANA_XDP_MTU_MAX);\n+\t\t\t ndev-\u003emtu, MANA_XDP_MTU_MAX(ndev));\n \t\tNL_SET_ERR_MSG_MOD(extack, \"XDP: mtu too large\");\n \n \t\treturn -EOPNOTSUPP;\n@@ -238,7 +238,7 @@ static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog,\n \t\tbpf_prog_put(old_prog);\n \n \tif (prog)\n-\t\tndev-\u003emax_mtu = min_t(unsigned int, MANA_XDP_MTU_MAX,\n+\t\tndev-\u003emax_mtu = min_t(unsigned int, MANA_XDP_MTU_MAX(ndev),\n \t\t\t\t gc-\u003eadapter_mtu - ETH_HLEN);\n \telse\n \t\tndev-\u003emax_mtu = gc-\u003eadapter_mtu - ETH_HLEN;\ndiff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c\nindex 591fb4191d90d..a1fb06b239476 100644\n--- a/drivers/net/ethernet/microsoft/mana/mana_en.c\n+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c\n@@ -758,6 +758,44 @@ static void *mana_get_rxbuf_pre(struct mana_rxq *rxq, dma_addr_t *da)\n \treturn va;\n }\n \n+/* Reserve enough headroom to satisfy the skb_cow() in ip_forward() and avoid\n+ * reallocation: the TX path keeps the SGE DMA mappings in struct mana_skb_head\n+ * at skb-\u003ehead, so the port advertises ndev-\u003eneeded_headroom = MANA_HEADROOM.\n+ */\n+static u32 mana_get_rxbuf_headroom(struct mana_port_context *apc)\n+{\n+\tif (mana_xdp_get(apc))\n+\t\treturn mana_xdp_headroom(apc-\u003endev);\n+\n+\treturn LL_RESERVED_SPACE(apc-\u003endev);\n+}\n+\n+static u32 mana_get_rxbuf_size(struct mana_port_context *apc, u32 mtu)\n+{\n+\tu32 len = SKB_DATA_ALIGN(mtu + MANA_RXBUF_PAD +\n+\t\t\t\t mana_get_rxbuf_headroom(apc));\n+\n+\treturn ALIGN(len, MANA_RX_FRAG_ALIGNMENT);\n+}\n+\n+/* Returns true when one RX buffer per page is already required by XDP or by\n+ * the buffer size implied by the MTU, i.e. regardless of the\n+ * MANA_PRIV_FLAG_USE_FULL_PAGE_RXBUF private flag.\n+ */\n+bool mana_single_rxbuf_per_page_forced(struct mana_port_context *apc, u32 mtu)\n+{\n+\t/* For xdp make sure only one packet fits per page. */\n+\tif (mana_xdp_get(apc))\n+\t\treturn true;\n+\n+\t/* Only use the page_pool fragment path when at least two buffers,\n+\t * including the headroom each of them has to reserve, actually fit\n+\t * into one page. Otherwise the fragment path degenerates into one\n+\t * buffer per page while still paying the fragment accounting cost.\n+\t */\n+\treturn PAGE_SIZE / mana_get_rxbuf_size(apc, mtu) \u003c 2;\n+}\n+\n static bool\n mana_use_single_rxbuf_per_page(struct mana_port_context *apc, u32 mtu)\n {\n@@ -770,32 +808,27 @@ mana_use_single_rxbuf_per_page(struct mana_port_context *apc, u32 mtu)\n \tif (apc-\u003epriv_flags \u0026 BIT(MANA_PRIV_FLAG_USE_FULL_PAGE_RXBUF))\n \t\treturn true;\n \n-\t/* For xdp and jumbo frames make sure only one packet fits per page. */\n-\tif (mtu + MANA_RXBUF_PAD \u003e PAGE_SIZE / 2 || mana_xdp_get(apc))\n-\t\treturn true;\n-\n-\treturn false;\n+\treturn mana_single_rxbuf_per_page_forced(apc, mtu);\n }\n \n-/* Get RX buffer's data size, alloc size, XDP headroom based on MTU */\n+/* Get RX buffer's data size, alloc size, headroom and frag count based on MTU */\n static void mana_get_rxbuf_cfg(struct mana_port_context *apc,\n \t\t\t int mtu, u32 *datasize, u32 *alloc_size,\n \t\t\t u32 *headroom, u32 *frag_count)\n {\n-\tu32 len, buf_size;\n+\tu32 buf_size;\n \n \t/* Calculate datasize first (consistent across all cases) */\n \t*datasize = mtu + ETH_HLEN;\n \n+\t*headroom = mana_get_rxbuf_headroom(apc);\n+\n \tif (mana_use_single_rxbuf_per_page(apc, mtu)) {\n-\t\tif (mana_xdp_get(apc)) {\n-\t\t\t*headroom = XDP_PACKET_HEADROOM;\n+\t\tif (mana_xdp_get(apc))\n \t\t\t*alloc_size = PAGE_SIZE;\n-\t\t} else {\n-\t\t\t*headroom = 0; /* no support for XDP */\n+\t\telse\n \t\t\t*alloc_size = SKB_DATA_ALIGN(mtu + MANA_RXBUF_PAD +\n \t\t\t\t\t\t *headroom);\n-\t\t}\n \n \t\t*frag_count = 1;\n \n@@ -809,11 +842,7 @@ static void mana_get_rxbuf_cfg(struct mana_port_context *apc,\n \t}\n \n \t/* Standard MTU case - optimize for multiple packets per page */\n-\t*headroom = 0;\n-\n-\t/* Calculate base buffer size needed */\n-\tlen = SKB_DATA_ALIGN(mtu + MANA_RXBUF_PAD + *headroom);\n-\tbuf_size = ALIGN(len, MANA_RX_FRAG_ALIGNMENT);\n+\tbuf_size = mana_get_rxbuf_size(apc, mtu);\n \n \t/* Calculate how many packets can fit in a page */\n \t*frag_count = PAGE_SIZE / buf_size;\ndiff --git a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c\nindex ece7ff9cc409a..33db79569d3b6 100644\n--- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c\n+++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c\n@@ -815,12 +815,12 @@ static int mana_set_priv_flags(struct net_device *ndev, u32 priv_flags)\n \t\tif (!apc-\u003eport_is_up)\n \t\t\treturn 0;\n \n-\t\t/* If XDP is attached or MTU is jumbo, single-buffer-per-page\n-\t\t * is already forced regardless of this flag. Skip the\n-\t\t * expensive detach/attach cycle since nothing changes.\n+\t\t/* If XDP is attached or the MTU already forces one buffer per\n+\t\t * page, single-buffer-per-page is used regardless of this\n+\t\t * flag. Skip the expensive detach/attach cycle since nothing\n+\t\t * changes.\n \t\t */\n-\t\tif (ndev-\u003emtu + MANA_RXBUF_PAD \u003e PAGE_SIZE / 2 ||\n-\t\t mana_xdp_get(apc))\n+\t\tif (mana_single_rxbuf_per_page_forced(apc, ndev-\u003emtu))\n \t\t\treturn 0;\n \n \t\t/* Block RDMA from grabbing the vport during detach/attach */\ndiff --git a/include/net/mana/mana.h b/include/net/mana/mana.h\nindex 83b7eff4646ea..8c3dc9d0b2993 100644\n--- a/include/net/mana/mana.h\n+++ b/include/net/mana/mana.h\n@@ -377,7 +377,18 @@ struct mana_recv_buf_oob {\n #define MANA_RXBUF_PAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) \\\n \t\t\t+ ETH_HLEN)\n \n-#define MANA_XDP_MTU_MAX (PAGE_SIZE - MANA_RXBUF_PAD - XDP_PACKET_HEADROOM)\n+/* Headroom an RX buffer has to reserve while XDP is attached: the XDP program\n+ * needs XDP_PACKET_HEADROOM, and the TX path needs LL_RESERVED_SPACE() (see\n+ * mana_get_rxbuf_headroom()). LL_RESERVED_SPACE() grows with MAX_SKB_FRAGS and\n+ * exceeds XDP_PACKET_HEADROOM once CONFIG_MAX_SKB_FRAGS is 19 or more.\n+ */\n+static inline u32 mana_xdp_headroom(struct net_device *ndev)\n+{\n+\treturn max_t(u32, LL_RESERVED_SPACE(ndev), XDP_PACKET_HEADROOM);\n+}\n+\n+#define MANA_XDP_MTU_MAX(ndev) \\\n+\t(PAGE_SIZE - MANA_RXBUF_PAD - mana_xdp_headroom(ndev))\n \n struct mana_rxq {\n \tstruct gdma_queue *gdma_rq;\n@@ -691,6 +702,7 @@ int mana_query_link_cfg(struct mana_port_context *apc);\n int mana_set_bw_clamp(struct mana_port_context *apc, u32 speed,\n \t\t int enable_clamping);\n void mana_query_phy_stats(struct mana_port_context *apc);\n+bool mana_single_rxbuf_per_page_forced(struct mana_port_context *apc, u32 mtu);\n int mana_pre_alloc_rxbufs(struct mana_port_context *apc, int mtu, int num_queues);\n void mana_pre_dealloc_rxbufs(struct mana_port_context *apc);\n void mana_unmap_skb(struct sk_buff *skb, struct mana_port_context *apc);\n"
} |
| 2/1 | 2026/10/03 10:41 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Microsoft Azure Network Adapter (MANA) Ethernet driver (drivers/net/ethernet/microsoft/mana/), which is a vendor-specific SmartNIC driver requiring Azure Hyper-V PCI hardware (depends on PCI_HYPERV and binds to Microsoft MANA PCI device IDs). This hardware is not emulated in standard QEMU or GCE virtualized fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit d47161c18b92ca45e19b3fc0decc63384a01c33f
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Oct 3 10:41:15 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ethernet/microsoft/mana/mana_bpf.c b/drivers/net/ethernet/microsoft/mana/mana_bpf.c
index 5c9961ee9747a..b27fd9b8c4f6d 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_bpf.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_bpf.c
@@ -91,7 +91,7 @@ u32 mana_run_xdp(struct net_device *ndev, struct mana_rxq *rxq,
goto out;
xdp_init_buff(xdp, PAGE_SIZE, &rxq->xdp_rxq);
- xdp_prepare_buff(xdp, buf_va, XDP_PACKET_HEADROOM, pkt_len, true);
+ xdp_prepare_buff(xdp, buf_va, rxq->headroom, pkt_len, true);
act = bpf_prog_run_xdp(prog, xdp);
@@ -183,9 +183,9 @@ static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog,
if (!old_prog && !prog)
return 0;
- if (prog && ndev->mtu > MANA_XDP_MTU_MAX) {
+ if (prog && ndev->mtu > MANA_XDP_MTU_MAX(ndev)) {
netdev_err(ndev, "XDP: mtu:%u too large, mtu_max:%lu\n",
- ndev->mtu, MANA_XDP_MTU_MAX);
+ ndev->mtu, MANA_XDP_MTU_MAX(ndev));
NL_SET_ERR_MSG_MOD(extack, "XDP: mtu too large");
return -EOPNOTSUPP;
@@ -238,7 +238,7 @@ static int mana_xdp_set(struct net_device *ndev, struct bpf_prog *prog,
bpf_prog_put(old_prog);
if (prog)
- ndev->max_mtu = min_t(unsigned int, MANA_XDP_MTU_MAX,
+ ndev->max_mtu = min_t(unsigned int, MANA_XDP_MTU_MAX(ndev),
gc->adapter_mtu - ETH_HLEN);
else
ndev->max_mtu = gc->adapter_mtu - ETH_HLEN;
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 591fb4191d90d..a1fb06b239476 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -758,6 +758,44 @@ static void *mana_get_rxbuf_pre(struct mana_rxq *rxq, dma_addr_t *da)
return va;
}
+/* Reserve enough headroom to satisfy the skb_cow() in ip_forward() and avoid
+ * reallocation: the TX path keeps the SGE DMA mappings in struct mana_skb_head
+ * at skb->head, so the port advertises ndev->needed_headroom = MANA_HEADROOM.
+ */
+static u32 mana_get_rxbuf_headroom(struct mana_port_context *apc)
+{
+ if (mana_xdp_get(apc))
+ return mana_xdp_headroom(apc->ndev);
+
+ return LL_RESERVED_SPACE(apc->ndev);
+}
+
+static u32 mana_get_rxbuf_size(struct mana_port_context *apc, u32 mtu)
+{
+ u32 len = SKB_DATA_ALIGN(mtu + MANA_RXBUF_PAD +
+ mana_get_rxbuf_headroom(apc));
+
+ return ALIGN(len, MANA_RX_FRAG_ALIGNMENT);
+}
+
+/* Returns true when one RX buffer per page is already required by XDP or by
+ * the buffer size implied by the MTU, i.e. regardless of the
+ * MANA_PRIV_FLAG_USE_FULL_PAGE_RXBUF private flag.
+ */
+bool mana_single_rxbuf_per_page_forced(struct mana_port_context *apc, u32 mtu)
+{
+ /* For xdp make sure only one packet fits per page. */
+ if (mana_xdp_get(apc))
+ return true;
+
+ /* Only use the page_pool fragment path when at least two buffers,
+ * including the headroom each of them has to reserve, actually fit
+ * into one page. Otherwise the fragment path degenerates into one
+ * buffer per page while still paying the fragment accounting cost.
+ */
+ return PAGE_SIZE / mana_get_rxbuf_size(apc, mtu) < 2;
+}
+
static bool
mana_use_single_rxbuf_per_page(struct mana_port_context *apc, u32 mtu)
{
@@ -770,32 +808,27 @@ mana_use_single_rxbuf_per_page(struct mana_port_context *apc, u32 mtu)
if (apc->priv_flags & BIT(MANA_PRIV_FLAG_USE_FULL_PAGE_RXBUF))
return true;
- /* For xdp and jumbo frames make sure only one packet fits per page. */
- if (mtu + MANA_RXBUF_PAD > PAGE_SIZE / 2 || mana_xdp_get(apc))
- return true;
-
- return false;
+ return mana_single_rxbuf_per_page_forced(apc, mtu);
}
-/* Get RX buffer's data size, alloc size, XDP headroom based on MTU */
+/* Get RX buffer's data size, alloc size, headroom and frag count based on MTU */
static void mana_get_rxbuf_cfg(struct mana_port_context *apc,
int mtu, u32 *datasize, u32 *alloc_size,
u32 *headroom, u32 *frag_count)
{
- u32 len, buf_size;
+ u32 buf_size;
/* Calculate datasize first (consistent across all cases) */
*datasize = mtu + ETH_HLEN;
+ *headroom = mana_get_rxbuf_headroom(apc);
+
if (mana_use_single_rxbuf_per_page(apc, mtu)) {
- if (mana_xdp_get(apc)) {
- *headroom = XDP_PACKET_HEADROOM;
+ if (mana_xdp_get(apc))
*alloc_size = PAGE_SIZE;
- } else {
- *headroom = 0; /* no support for XDP */
+ else
*alloc_size = SKB_DATA_ALIGN(mtu + MANA_RXBUF_PAD +
*headroom);
- }
*frag_count = 1;
@@ -809,11 +842,7 @@ static void mana_get_rxbuf_cfg(struct mana_port_context *apc,
}
/* Standard MTU case - optimize for multiple packets per page */
- *headroom = 0;
-
- /* Calculate base buffer size needed */
- len = SKB_DATA_ALIGN(mtu + MANA_RXBUF_PAD + *headroom);
- buf_size = ALIGN(len, MANA_RX_FRAG_ALIGNMENT);
+ buf_size = mana_get_rxbuf_size(apc, mtu);
/* Calculate how many packets can fit in a page */
*frag_count = PAGE_SIZE / buf_size;
diff --git a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
index ece7ff9cc409a..33db79569d3b6 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_ethtool.c
@@ -815,12 +815,12 @@ static int mana_set_priv_flags(struct net_device *ndev, u32 priv_flags)
if (!apc->port_is_up)
return 0;
- /* If XDP is attached or MTU is jumbo, single-buffer-per-page
- * is already forced regardless of this flag. Skip the
- * expensive detach/attach cycle since nothing changes.
+ /* If XDP is attached or the MTU already forces one buffer per
+ * page, single-buffer-per-page is used regardless of this
+ * flag. Skip the expensive detach/attach cycle since nothing
+ * changes.
*/
- if (ndev->mtu + MANA_RXBUF_PAD > PAGE_SIZE / 2 ||
- mana_xdp_get(apc))
+ if (mana_single_rxbuf_per_page_forced(apc, ndev->mtu))
return 0;
/* Block RDMA from grabbing the vport during detach/attach */
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
index 83b7eff4646ea..8c3dc9d0b2993 100644
--- a/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -377,7 +377,18 @@ struct mana_recv_buf_oob {
#define MANA_RXBUF_PAD (SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) \
+ ETH_HLEN)
-#define MANA_XDP_MTU_MAX (PAGE_SIZE - MANA_RXBUF_PAD - XDP_PACKET_HEADROOM)
+/* Headroom an RX buffer has to reserve while XDP is attached: the XDP program
+ * needs XDP_PACKET_HEADROOM, and the TX path needs LL_RESERVED_SPACE() (see
+ * mana_get_rxbuf_headroom()). LL_RESERVED_SPACE() grows with MAX_SKB_FRAGS and
+ * exceeds XDP_PACKET_HEADROOM once CONFIG_MAX_SKB_FRAGS is 19 or more.
+ */
+static inline u32 mana_xdp_headroom(struct net_device *ndev)
+{
+ return max_t(u32, LL_RESERVED_SPACE(ndev), XDP_PACKET_HEADROOM);
+}
+
+#define MANA_XDP_MTU_MAX(ndev) \
+ (PAGE_SIZE - MANA_RXBUF_PAD - mana_xdp_headroom(ndev))
struct mana_rxq {
struct gdma_queue *gdma_rq;
@@ -691,6 +702,7 @@ int mana_query_link_cfg(struct mana_port_context *apc);
int mana_set_bw_clamp(struct mana_port_context *apc, u32 speed,
int enable_clamping);
void mana_query_phy_stats(struct mana_port_context *apc);
+bool mana_single_rxbuf_per_page_forced(struct mana_port_context *apc, u32 mtu);
int mana_pre_alloc_rxbufs(struct mana_port_context *apc, int mtu, int num_queues);
void mana_pre_dealloc_rxbufs(struct mana_port_context *apc);
void mana_unmap_skb(struct sk_buff *skb, struct mana_port_context *apc);
|
| 3/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5756 output: 35 thoughts: 264 Thoughts: **Evaluating the Patch's Fuzzing Potential** Okay, so this patch landed on my desk, and my first thought is, "does this warrant syzkaller fuzzing?" Let's break it down. I need to understand what this patch is even touching. Alright, it seems to be modifying: `drivers/net/ethernet/microsoft/mana/mana_bpf.c`, `drivers/net/ethernet/microsoft/mana/mana_en.c`, `drivers/net/ethernet/microsoft/mana/mana_ethtool.c`, and `include/net/mana/mana.h`. Hmm, MANA… that's Microsoft Azure Network Adapter, right? Now, the crucial question: Is this something that can run in a standard virtualized environment like QEMU, or is it specific Azure hardware, maybe a PCI device? I need to check the restrictions again... Ah, yes, in Section 2: "- Structurally unreachable hardware...". Right, so vendor-specific PCIe switches, SmartNICs, GPU drivers – things like mlxsw, pds_core, qed, ionic, amdgpu. If it requires physical ASIC/PCIe cards that are not emulated in standard QEMU, then syzkaller would not be able to fuzz it directly. Okay, I need to confirm what MANA *is*. Time to fire up `grepper` or check the `Kconfig` for some info on the driver. Let's see if this is something that can be tested, or if I need to rule it out immediately. |
| 4/2 | 2026/10/03 10:41 | tool | grepper |
0mArgs:{
"Expression": "config MICROSOFT_MANA",
"PathPrefix": "drivers/net/ethernet/microsoft/"
}Results: {
"Output": "drivers/net/ethernet/microsoft/Kconfig=16=if NET_VENDOR_MICROSOFT\ndrivers/net/ethernet/microsoft/Kconfig-17-\ndrivers/net/ethernet/microsoft/Kconfig:18:config MICROSOFT_MANA\ndrivers/net/ethernet/microsoft/Kconfig-19-\ttristate \"Microsoft Azure Network Adapter (MANA) support\"\n"
} |
| 5/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 6494 output: 38 thoughts: 17 Thoughts: Okay, here's my interpretation of what's going through my mind as I approach the `drivers/net/ethernet/microsoft/Kconfig` file, tailored for an expert audience: **Diving into the Microsoft Ethernet Kconfig** Alright, time to dig into the Microsoft Ethernet Kconfig file. My immediate expectation is to see a structured configuration file, likely employing the standard Kconfig syntax that I'm intimately familiar with. I'm anticipating finding the usual suspects – kernel configuration options, dependencies, descriptions, and potentially some default settings specific to Microsoft's Ethernet drivers. I'll be looking for things like: * **Generic Driver Options:** Are there base options that apply to all Microsoft Ethernet drivers, regardless of the specific hardware? I'll quickly scan for things like enabling/disabling the driver as a whole, debugging flags, and any core features that are controlled at a high level. * **Hardware-Specific Options:** How are specific hardware devices supported? I'll expect to see distinct configuration options for different NIC models or families, probably using `select` and `depends on` statements to build a hierarchical configuration structure. I want to see how they've handled potential hardware variations and their specific needs. * **Feature Control:** I'm particularly interested in any configuration options related to features like hardware offloading (checksum, segmentation, etc.), power management (wake-on-LAN), and any Microsoft-specific optimizations or extensions that have been implemented. This will be a key indicator of the driver's sophistication and performance tuning. * **Dependencies and Relationships:** I'll be keeping a close eye on `depends on` statements to understand how these Microsoft Ethernet drivers relate to other parts of the kernel. What other subsystems are they dependent on (e.g., networking core, PCI, DMA)? Are there any surprising or unusual dependencies that might indicate an architectural approach or integration strategy? I want to determine their place in the larger Kconfig tree. * **Defaults and Help Texts:** I'll pay attention to the default settings for the options and the explanatory text. These can provide valuable clues about the intended use cases, the typical hardware environment, and any design choices that were made during the driver's development. Good documentation is always a sign of a well-maintained and well-understood code base. * **Any `bool`, `tristate`, or `int` variables?**: It's likely that a mix of bool, tristate, and integer variables will be present. I'll mentally evaluate the options for potential impact, and configuration options that are likely to be used in conjunction. Ultimately, I'm aiming to build a mental map of how these Microsoft Ethernet drivers are configured within the kernel. This knowledge will be invaluable for debugging, customization, performance tuning, and understanding the overall architectural implications of using these drivers. I'll likely be mentally cross-referencing this Kconfig file with the driver source code itself, keeping an eye out for any inconsistencies or ambiguities between what's configured and what's implemented. |
| 6/2 | 2026/10/03 10:41 | tool | read-file |
0mArgs:{
"File": "drivers/net/ethernet/microsoft/Kconfig",
"FirstLine": 15,
"LineCount": 40
}Results: {
"Contents": " 15:\t\n 16:\tif NET_VENDOR_MICROSOFT\n 17:\t\n 18:\tconfig MICROSOFT_MANA\n 19:\t\ttristate \"Microsoft Azure Network Adapter (MANA) support\"\n 20:\t\tdepends on PCI_MSI\n 21:\t\tdepends on X86_64 || (ARM64 \u0026\u0026 !CPU_BIG_ENDIAN)\n 22:\t\tdepends on PCI_HYPERV\n 23:\t\tselect AUXILIARY_BUS\n 24:\t\tselect DIMLIB\n 25:\t\tselect PAGE_POOL\n 26:\t\tselect NET_SHAPER\n 27:\t\thelp\n 28:\t\t This driver supports Microsoft Azure Network Adapter (MANA).\n 29:\t\t So far, the driver is only supported on X86_64.\n 30:\t\n 31:\t\t To compile this driver as a module, choose M here.\n 32:\t\t The module will be called mana.\n 33:\t\n 34:\tendif #NET_VENDOR_MICROSOFT\n"
} |
| 7/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7459 output: 34 thoughts: 42 Thoughts: Okay, here's my take on those thoughts, framed from my expert perspective: **Thinking Through the MANA Driver and PCI_HYPERV Dependency** Right, *first thing I see is that crucial `depends on PCI_HYPERV`*. That immediately flags a specific context: this is going to be about networking within a Hyper-V environment, and likely Azure-specific. Let's delve in to what we're actually looking at – I need to understand what "MANA" stands for. *Ah, the Microsoft Azure Network Adapter, that makes sense.* Now the critical question: *how does this adapter interface, and to which hardware does it bind?* I need to understand its probing mechanisms, driver binding, and ultimately, how it's integrated at the hardware level. This is where the core functionality of the MANA driver will be revealed to me. My next step will be to explore the probing and binding process. |
| 8/2 | 2026/10/03 10:41 | tool | grepper |
0mArgs:{
"Expression": "mana_probe",
"PathPrefix": "drivers/net/ethernet/microsoft/mana/"
}Results: {
"Output": "drivers/net/ethernet/microsoft/mana/gdma_main.c=179=static int mana_gd_query_max_resources(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-282-\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:283:\t/* Cap to the same limit used by mana_probe() for port instantiation,\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-284-\t * so MSI-X and queue budgeting matches the actual port count.\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c=2499=static int mana_gd_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2554-\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:2555:\terr = mana_probe(\u0026gc-\u003emana, false);\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2556-\tif (err)\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2593-\t * Hardware could be in recovery mode and the HWC returns TIMEDOUT or\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:2594:\t * EPROTO from mana_gd_setup(), mana_probe() or mana_rdma_probe(), or\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2595-\t * we received a hardware reset event over HWC interrupt. In this case,\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c=2659=int mana_gd_resume(struct pci_dev *pdev)\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2667-\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:2668:\terr = mana_probe(\u0026gc-\u003emana, true);\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2669-\tif (err)\n--\ndrivers/net/ethernet/microsoft/mana/mana_en.c=3799=int mana_detach(struct net_device *ndev, bool from_close)\n--\ndrivers/net/ethernet/microsoft/mana/mana_en.c-3835-\ndrivers/net/ethernet/microsoft/mana/mana_en.c:3836:static int mana_probe_port(struct mana_context *ac, int port_idx,\ndrivers/net/ethernet/microsoft/mana/mana_en.c-3837-\t\t\t struct net_device **ndev_storage)\n--\ndrivers/net/ethernet/microsoft/mana/mana_en.c=4078=static void mana_gf_stats_work_handler(struct work_struct *work)\n--\ndrivers/net/ethernet/microsoft/mana/mana_en.c-4100-\ndrivers/net/ethernet/microsoft/mana/mana_en.c:4101:int mana_probe(struct gdma_dev *gd, bool resuming)\ndrivers/net/ethernet/microsoft/mana/mana_en.c-4102-{\n--\ndrivers/net/ethernet/microsoft/mana/mana_en.c-4175-\t\tfor (i = 0; i \u003c ac-\u003enum_ports; i++) {\ndrivers/net/ethernet/microsoft/mana/mana_en.c:4176:\t\t\terr = mana_probe_port(ac, i, \u0026ac-\u003eports[i]);\ndrivers/net/ethernet/microsoft/mana/mana_en.c-4177-\t\t\t/* Log the port for which the probe failed, stop probing\n"
} |
| 9/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8702 output: 36 thoughts: 19 Thoughts: Here's my take on those thoughts: **Checking Key Data Structures** Okay, time to get down to brass tacks. I need to quickly assess the state of a couple of critical data structures. First, `mana_gd_probe`. This is where the core diagnostic information resides, and I need to understand its current status, likely as a primary indicator of what's working and what's not. I'm going to scan it and check for any immediate flags or anomalies. Then, I’ll cross-reference that with `mana_id_table`. I expect to find relationships between these two. I need to make sure the ID table isn't indicating any conflicts or problems that might explain what I see in `mana_gd_probe`. The ID table is crucial for tying everything together and any issues there are likely to have broader, potentially cascading, consequences. A quick double-check on both will likely give me some direction. |
| 10/2 | 2026/10/03 10:41 | tool | grepper |
0mArgs:{
"Expression": "mana_id_table",
"PathPrefix": "drivers/net/ethernet/microsoft/mana/"
}Results: {
"Output": "drivers/net/ethernet/microsoft/mana/gdma_main.c=2698=static int mana_sriov_configure(struct pci_dev *pdev, int numvfs)\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2718-\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:2719:static const struct pci_device_id mana_id_table[] = {\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2720-\t{ PCI_DEVICE(PCI_VENDOR_ID_MICROSOFT, MANA_PF_DEVICE_ID) },\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c=2726=static struct pci_driver mana_driver = {\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2727-\t.name\t\t= \"mana\",\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:2728:\t.id_table\t= mana_id_table,\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2729-\t.probe\t\t= mana_gd_probe,\n--\ndrivers/net/ethernet/microsoft/mana/gdma_main.c=2781=module_exit(mana_driver_exit);\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2782-\ndrivers/net/ethernet/microsoft/mana/gdma_main.c:2783:MODULE_DEVICE_TABLE(pci, mana_id_table);\ndrivers/net/ethernet/microsoft/mana/gdma_main.c-2784-\n"
} |
| 11/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9394 output: 30 thoughts: 60 Thoughts: Here's my take on the thought process, as though I were the one thinking it: **Diving into the Mana Driver** Alright, let's get down to brass tacks. I'm looking at the `mana_driver` code. It's immediately clear that this is a PCI driver, specifically targeting devices with the `PCI_VENDOR_ID_MICROSOFT` vendor ID. And, from the looks of it, it's handling devices identified by either `MANA_PF_DEVICE_ID` or `MANA_VF_DEVICE_ID`. Time to drill down on `MANA_PF_DEVICE_ID` first. Need to understand the primary function device ID before going any deeper. Let's see what that reveals. |
| 12/2 | 2026/10/03 10:41 | tool | grepper |
0mArgs:{
"Expression": "MANA_.*_DEVICE_ID",
"PathPrefix": "include/"
}Results: {
"Output": "include/net/mana/gdma.h=606=struct gdma_eqe {\n--\ninclude/net/mana/gdma.h-620-\ninclude/net/mana/gdma.h:621:#define MANA_PF_DEVICE_ID 0x00B9\ninclude/net/mana/gdma.h:622:#define MANA_PF2_DEVICE_ID 0x00C1\ninclude/net/mana/gdma.h:623:#define MANA_VF_DEVICE_ID 0x00BA\ninclude/net/mana/gdma.h-624-\n"
} |
| 13/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 9809 output: 28 thoughts: 440 Thoughts: **MANA Reachability Assessment** Okay, so MANA hinges on `PCI_HYPERV`, which immediately makes me think Azure Hyper-V. The critical question, as always in this context, is whether this thing is even *reachable* in standard fuzzing environments like QEMU or GCE syzkaller. I already suspect it isn't, given my knowledge of Azure-specific hardware. MANA is the Microsoft Azure Network Adapter, and from experience, those are usually tied to Azure SmartNIC or MANA hardware, meaning a direct QEMU emulation is likely out of the question. Let's confirm. QEMU's well-established. It doesn't emulate these types of NICs, so that's the first hurdle. But, let me make sure: I need to verify that there is *no* virtual or software emulation layer. I need to make sure it doesn't fall under that "structurally unreachable hardware" category. Things like vendor-specific PCIe switches, SmartNICs, GPU drivers (mlxsw, pds_core, qed, ionic, amdgpu) all need physical ASIC/PCIe cards that are not emulated in standard QEMU. I'm basically looking for something that *can't* be probed without Hyper-V. Let me reread Sections 1 and 2 carefully. This is a crucial check. Reachability is *the* primary gate. We can only discover bugs in code that actually runs in these standard virtualized environments. If the code is structurally unreachable, it MUST NOT be fuzzed, no matter what assertions or complex logic it adds. The key to this "negative criteria" for determining whether something's worth fuzzing is the statement that something's *not* worth fuzzing if it falls into one of these categories. The one that applies here is "Structurally unreachable hardware," which directly includes our scenario. So, the next step is to see if I can even interact with MANA with any mock or virtual device or if it can be probed without physical/Hyper-V hardware. I'll need to check the `drivers/net/ethernet/microsoft/mana/` directory. That should be the key to confirming its reachability. |
| 14/2 | 2026/10/03 10:41 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/net/ethernet/microsoft/mana"
}Results: {
"Files": [
"gdma_main.c",
"hw_channel.c",
"mana_bpf.c",
"mana_en.c",
"mana_ethtool.c",
"shm_channel.c"
],
"Subdirs": null
} |
| 15/2 | 2026/10/03 10:41 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 10816 output: 118 thoughts: 408 Thoughts: **MANA Driver Triage: A Dead End for Fuzzing** Okay, so I've just reviewed the changes. Looks like we're dealing with modifications across several files within the `mana` driver – specifically, `mana_bpf.c`, `mana_en.c`, `mana_ethtool.c`, and `mana.h`. All of these are part of the Microsoft Azure Network Adapter driver, the `mana` driver, which supports specific PCI device IDs (0x00B9, 0x00C1, 0x00BA) associated with vendor 0x1414 (Microsoft). I immediately recognize this as a specialized driver. It's tied to `CONFIG_MICROSOFT_MANA`, which has a hard dependency on `PCI_HYPERV`. Essentially, this is a SmartNIC or NIC hardware driver designed for Azure Virtual Machines. The critical piece here is the requirement for a Hyper-V PCI bus and the Microsoft MANA hardware itself – an ASIC or SmartNIC that's deployed within Azure. Standard QEMU or Google Compute Engine environments, which are what we usually use in syzkaller fuzzing, *don't* emulate or provide these specific Microsoft MANA devices. Therefore, the driver is structurally unreachable from our standard fuzzing setups. It's simply impossible to probe or instantiate it within those environments. This implies that fuzzing it would be a complete waste of our time and resources. Now, let's confirm the triage instructions are properly documented: * `WorthFuzzing`: Set to `false` – correct. * `Reasoning`: We need a concise explanation of the rationale, so let's document that the MANA driver is specific to the Microsoft Azure Network Adapter and that Azure/Hyper-V specific PCIe hardware isn't emulated in standard QEMU/GCE, thereby rendering it structurally unreachable. * `FocusSymbols`: An empty list (`[]`) – correct for a `WorthFuzzing` value of `false`. * `EnableConfigs`: An empty list (`[]`) – correct as `WorthFuzzing` is `false`. Double-checking the schema for `set-results` confirms that `EnableConfigs` and `FocusSymbols` can be null when `WorthFuzzing` is set to `false`, and that we should include a string-based `Reasoning` for why this driver is untestable. Yep, everything checks out. We're good to go. The verdict is clear. We don't need to prioritize this driver for fuzzing. |
| 16/2 | 2026/10/03 10:41 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies the Microsoft Azure Network Adapter (MANA) Ethernet driver (drivers/net/ethernet/microsoft/mana/), which is a vendor-specific SmartNIC driver requiring Azure Hyper-V PCI hardware (depends on PCI_HYPERV and binds to Microsoft MANA PCI device IDs). This hardware is not emulated in standard QEMU or GCE virtualized fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies the Microsoft Azure Network Adapter (MANA) Ethernet driver (drivers/net/ethernet/microsoft/mana/), which is a vendor-specific SmartNIC driver requiring Azure Hyper-V PCI hardware (depends on PCI_HYPERV and binds to Microsoft MANA PCI device IDs). This hardware is not emulated in standard QEMU or GCE virtualized fuzzing environments, making the modified code structurally unreachable.",
"WorthFuzzing": false
} |
| 17/1 | 2026/10/03 10:41 | 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) |
|---|