| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/05 01:08 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch series contains only documentation updates (Documentation/networking/netmem.rst) and code comments/kernel-doc updates across include/linux/skbuff.h, include/net/netmem.h, include/net/page_pool/*.h, and net/core/skbuff.c. No executable code or data structures are modified.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/05 01:08 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 69a954422eb8975e4d3ea85d03b055d2599bb37a\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Mon Oct 5 01:08:12 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/Documentation/networking/netmem.rst b/Documentation/networking/netmem.rst\nindex 217869d1108dd..57e52a947663d 100644\n--- a/Documentation/networking/netmem.rst\n+++ b/Documentation/networking/netmem.rst\n@@ -19,6 +19,52 @@ Benefits of Netmem :\n * Simplified Development: Drivers interact with a consistent API,\n regardless of the underlying memory implementation.\n \n+Design Principles\n+=================\n+\n+Memory providers (or the default ``page_pool`` allocator) allocate underlying\n+memory (``struct net_iov`` or ``struct page``), cast it to ``netmem_ref``, and\n+supply it to ``page_pool``. The ``page_pool``, drivers, and networking stack\n+operate on ``netmem_ref`` as the abstract type. Existing ``page_pool`` APIs\n+that allocate or free ``struct page`` are legacy compatibility wrappers for\n+drivers that do not yet support ``netmem_ref``. Code that is not yet\n+``netmem``-aware should be converted to ``netmem_ref`` unless it will never\n+need to support ``netmem``.\n+\n+1. **Operate on netmem_ref, do not downcast**: ``page_pool``, drivers, and the\n+ core networking stack should deal with ``netmem_ref`` rather than\n+ ``struct net_iov`` or ``struct page``. Downcasting ``netmem_ref`` to\n+ ``struct net_iov`` or ``struct page`` is not allowed unless a code path\n+ strictly cannot function without knowing the underlying memory type (for\n+ example, ``kmap_local_page()``). In those cases, to keep call sites simple,\n+ add a ``netmem`` helper that performs the operation on behalf of the caller,\n+ cleanly handles all ``net_iov`` and ``page`` cases, and returns an error if\n+ the ``netmem`` type cannot support the requested operation.\n+\n+2. **Decouple memory providers from net_iov**: Memory providers are not limited\n+ to ``struct net_iov``. A memory provider that returns ``struct page``-backed\n+ ``netmem_ref``\\ s to upper layers is allowed. Code must not assume that using\n+ a memory provider implies ``net_iov`` memory.\n+\n+3. **Decouple net_iov from unreadability**: ``struct net_iov`` is flexible and\n+ has no inherent restrictions. While current ``net_iov`` implementations are\n+ unreadable by the CPU, future readable ``net_iov`` implementations are\n+ allowed. Code must not assume ``net_iov`` is unreadable; check readability\n+ via ``netmem_address()`` or ``skb_frags_readable()`` instead.\n+\n+4. **Delegate complexity to the lowest layer**: Each layer must respect its\n+ abstraction boundary. ``page_pool`` must not implement per-memory-provider\n+ custom logic in its main code; instead, it delegates provider-specific\n+ handling to ``struct memory_provider_ops``. Similarly, core networking code\n+ should avoid per-``netmem``-type branching and instead delegate operations\n+ to ``netmem`` helpers that handle the underlying memory type.\n+\n+5. **Homogeneous skb fragment memory types**: An ``sk_buff``'s ``frags[]`` are\n+ always backed by ``netmem_ref``\\ s of the same memory type. Mixing fragments\n+ from different memory types within a single ``sk_buff`` is not allowed,\n+ keeping ``sk_buff`` handling simple. Consequently, coalescing ``sk_buff``\\ s\n+ with different fragment memory types must not happen.\n+\n Driver RX Requirements\n ======================\n \ndiff --git a/include/linux/skbuff.h b/include/linux/skbuff.h\nindex 27ec1e38c8283..c022e5fd3124f 100644\n--- a/include/linux/skbuff.h\n+++ b/include/linux/skbuff.h\n@@ -358,6 +358,10 @@ struct sk_buff;\n */\n #define GSO_BY_FRAGS\t0xFFFF\n \n+/* All fragments in an skb (skb_shinfo(skb)-\u003efrags[]) must be backed by\n+ * netmems of the same memory type. Mixing fragments of different memory types\n+ * within a single skb (including via skb coalescing) is not allowed.\n+ */\n typedef struct skb_frag {\n \tnetmem_ref netmem;\n \tunsigned int len;\ndiff --git a/include/net/netmem.h b/include/net/netmem.h\nindex cc97611632dc8..8fcf455664781 100644\n--- a/include/net/netmem.h\n+++ b/include/net/netmem.h\n@@ -70,16 +70,17 @@ enum net_iov_type {\n \tNET_IOV_IOURING,\n };\n \n-/* A memory descriptor representing abstract networking I/O vectors,\n- * generally for non-pages memory that doesn't have its corresponding\n- * struct page and needs to be explicitly allocated through slab.\n+/* A memory descriptor representing abstract networking I/O vectors.\n *\n * net_iovs are allocated and used by networking code, and the size of\n * the chunk is PAGE_SIZE.\n *\n- * This memory can be any form of non-struct paged memory. Examples\n- * include imported dmabuf memory and imported io_uring memory. See\n- * net_iov_type for all the supported types.\n+ * Examples include imported dmabuf memory and imported io_uring memory. See\n+ * net_iov_type for all the supported types. While current net_iov types are\n+ * unreadable by the CPU, net_iov has no inherent restrictions and future\n+ * net_iov implementations may be CPU-readable. Code must not assume net_iov\n+ * implies unreadable memory; check readability via netmem_address() or\n+ * skb_frags_readable() instead.\n *\n * @pp_magic:\tpp field, similar to the one in struct page/struct\n *\t\tnetmem_desc.\n@@ -134,8 +135,17 @@ static inline void net_iov_init(struct net_iov *niov,\n * network memory.\n *\n * A netmem_ref can be a struct page* or a struct net_iov* underneath.\n+ * Memory providers (or the default page_pool allocator) allocate struct\n+ * net_iov or struct page, cast them to netmem_ref, and hand them to\n+ * page_pool.\n *\n- * Use the supplied helpers to obtain the underlying memory pointer and fields.\n+ * The page_pool, drivers, and core networking stack should operate on\n+ * netmem_ref rather than struct page or struct net_iov. Downcasting\n+ * netmem_ref via netmem_to_page() or netmem_to_net_iov() in callers is\n+ * not allowed unless a code path strictly requires a specific backing\n+ * type (e.g., kmap_local_page()). In such cases, add a netmem helper here\n+ * that handles both page and net_iov cases and returns an error if the\n+ * underlying type cannot support the operation.\n */\n typedef unsigned long __bitwise netmem_ref;\n \n@@ -300,9 +310,8 @@ static inline atomic_long_t *netmem_get_pp_ref_count_ref(netmem_ref netmem)\n \n static inline bool netmem_is_pref_nid(netmem_ref netmem, int pref_nid)\n {\n-\t/* NUMA node preference only makes sense if we're allocating\n-\t * system memory. Memory providers (which give us net_iovs)\n-\t * choose for us.\n+\t/* NUMA node preference only applies to struct page; net_iovs are\n+\t * managed by their memory provider.\n \t */\n \tif (netmem_is_net_iov(netmem))\n \t\treturn true;\ndiff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h\nindex cd021832c3fa3..28635ce9454e8 100644\n--- a/include/net/page_pool/helpers.h\n+++ b/include/net/page_pool/helpers.h\n@@ -8,12 +8,20 @@\n /**\n * DOC: page_pool allocator\n *\n- * The page_pool allocator is optimized for recycling page or page fragment used\n- * by skb packet and xdp frame.\n+ * The page_pool allocator is optimized for recycling network memory\n+ * (netmem_ref) or fragments used by skb packets and xdp frames.\n *\n- * Basic use involves replacing any alloc_pages() calls with page_pool_alloc(),\n- * which allocate memory with or without page splitting depending on the\n- * requested memory size.\n+ * page_pool natively operates on netmem_ref, which abstracts the underlying\n+ * memory type (struct page or struct net_iov) supplied by the page allocator\n+ * or a memory provider. Drivers and core networking code should use the\n+ * netmem-based APIs (e.g. page_pool_alloc_netmem(), page_pool_put_netmem()).\n+ * The struct page-based APIs (e.g. page_pool_alloc(), page_pool_alloc_pages(),\n+ * page_pool_put_page()) are legacy compatibility wrappers for drivers not yet\n+ * converted to netmem.\n+ *\n+ * Basic use involves replacing any alloc_pages() calls with\n+ * page_pool_alloc_netmem() (or legacy page_pool_alloc()), which allocate memory\n+ * with or without splitting depending on the requested memory size.\n *\n * If the driver knows that it always requires full pages or its allocations are\n * always smaller than half a page, it can use one of the more specific API\ndiff --git a/include/net/page_pool/memory_provider.h b/include/net/page_pool/memory_provider.h\nindex 255ce4cfd9755..6eaca6725d904 100644\n--- a/include/net/page_pool/memory_provider.h\n+++ b/include/net/page_pool/memory_provider.h\n@@ -9,6 +9,14 @@ struct netdev_rx_queue;\n struct netlink_ext_ack;\n struct sk_buff;\n \n+/* Memory providers allocate underlying memory (struct net_iov or struct page),\n+ * cast it to netmem_ref, and supply it to page_pool. Memory providers are not\n+ * limited to net_iov; a provider returning page-backed netmems is allowed, so\n+ * callers must not assume a memory provider implies net_iov.\n+ *\n+ * Per-provider custom logic must be delegated to memory_provider_ops rather\n+ * than handled directly in page_pool core code.\n+ */\n struct memory_provider_ops {\n \tnetmem_ref (*alloc_netmems)(struct page_pool *pool, gfp_t gfp);\n \tbool (*release_netmem)(struct page_pool *pool, netmem_ref netmem);\ndiff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h\nindex 03da138722f58..6d543076a0c0b 100644\n--- a/include/net/page_pool/types.h\n+++ b/include/net/page_pool/types.h\n@@ -22,9 +22,9 @@\n \t\t\t\t\t*/\n #define PP_FLAG_SYSTEM_POOL\tBIT(2) /* Global system page_pool */\n \n-/* Allow unreadable (net_iov backed) netmem in this page_pool. Drivers setting\n- * this must be able to support unreadable netmem, where netmem_address() would\n- * return NULL. This flag should not be set for header page_pools.\n+/* Allow unreadable netmem in this page_pool. Drivers setting this must be able\n+ * to support unreadable netmem, where netmem_address() returns NULL. This flag\n+ * should not be set for header page_pools.\n *\n * If the driver sets PP_FLAG_ALLOW_UNREADABLE_NETMEM, it should also set\n * page_pool_params.slow.queue_idx.\ndiff --git a/net/core/skbuff.c b/net/core/skbuff.c\nindex 5c4024a03e105..9395e0ad0a13b 100644\n--- a/net/core/skbuff.c\n+++ b/net/core/skbuff.c\n@@ -6206,6 +6206,9 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,\n \tif (to-\u003epp_recycle != from-\u003epp_recycle)\n \t\treturn false;\n \n+\t/* All frags in an skb must have the same backing netmem memory type;\n+\t * do not coalesce skbs with different frag memory types.\n+\t */\n \tif (skb_frags_readable(from) != skb_frags_readable(to))\n \t\treturn false;\n \n"
} |
| 2/1 | 2026/10/05 01:08 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch series contains only documentation updates (Documentation/networking/netmem.rst) and code comments/kernel-doc updates across include/linux/skbuff.h, include/net/netmem.h, include/net/page_pool/*.h, and net/core/skbuff.c. No executable code or data structures are modified.",
"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 69a954422eb8975e4d3ea85d03b055d2599bb37a
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Oct 5 01:08:12 2026 +0000
syz-cluster: applied patch under review
diff --git a/Documentation/networking/netmem.rst b/Documentation/networking/netmem.rst
index 217869d1108dd..57e52a947663d 100644
--- a/Documentation/networking/netmem.rst
+++ b/Documentation/networking/netmem.rst
@@ -19,6 +19,52 @@ Benefits of Netmem :
* Simplified Development: Drivers interact with a consistent API,
regardless of the underlying memory implementation.
+Design Principles
+=================
+
+Memory providers (or the default ``page_pool`` allocator) allocate underlying
+memory (``struct net_iov`` or ``struct page``), cast it to ``netmem_ref``, and
+supply it to ``page_pool``. The ``page_pool``, drivers, and networking stack
+operate on ``netmem_ref`` as the abstract type. Existing ``page_pool`` APIs
+that allocate or free ``struct page`` are legacy compatibility wrappers for
+drivers that do not yet support ``netmem_ref``. Code that is not yet
+``netmem``-aware should be converted to ``netmem_ref`` unless it will never
+need to support ``netmem``.
+
+1. **Operate on netmem_ref, do not downcast**: ``page_pool``, drivers, and the
+ core networking stack should deal with ``netmem_ref`` rather than
+ ``struct net_iov`` or ``struct page``. Downcasting ``netmem_ref`` to
+ ``struct net_iov`` or ``struct page`` is not allowed unless a code path
+ strictly cannot function without knowing the underlying memory type (for
+ example, ``kmap_local_page()``). In those cases, to keep call sites simple,
+ add a ``netmem`` helper that performs the operation on behalf of the caller,
+ cleanly handles all ``net_iov`` and ``page`` cases, and returns an error if
+ the ``netmem`` type cannot support the requested operation.
+
+2. **Decouple memory providers from net_iov**: Memory providers are not limited
+ to ``struct net_iov``. A memory provider that returns ``struct page``-backed
+ ``netmem_ref``\ s to upper layers is allowed. Code must not assume that using
+ a memory provider implies ``net_iov`` memory.
+
+3. **Decouple net_iov from unreadability**: ``struct net_iov`` is flexible and
+ has no inherent restrictions. While current ``net_iov`` implementations are
+ unreadable by the CPU, future readable ``net_iov`` implementations are
+ allowed. Code must not assume ``net_iov`` is unreadable; check readability
+ via ``netmem_address()`` or ``skb_frags_readable()`` instead.
+
+4. **Delegate complexity to the lowest layer**: Each layer must respect its
+ abstraction boundary. ``page_pool`` must not implement per-memory-provider
+ custom logic in its main code; instead, it delegates provider-specific
+ handling to ``struct memory_provider_ops``. Similarly, core networking code
+ should avoid per-``netmem``-type branching and instead delegate operations
+ to ``netmem`` helpers that handle the underlying memory type.
+
+5. **Homogeneous skb fragment memory types**: An ``sk_buff``'s ``frags[]`` are
+ always backed by ``netmem_ref``\ s of the same memory type. Mixing fragments
+ from different memory types within a single ``sk_buff`` is not allowed,
+ keeping ``sk_buff`` handling simple. Consequently, coalescing ``sk_buff``\ s
+ with different fragment memory types must not happen.
+
Driver RX Requirements
======================
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 27ec1e38c8283..c022e5fd3124f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -358,6 +358,10 @@ struct sk_buff;
*/
#define GSO_BY_FRAGS 0xFFFF
+/* All fragments in an skb (skb_shinfo(skb)->frags[]) must be backed by
+ * netmems of the same memory type. Mixing fragments of different memory types
+ * within a single skb (including via skb coalescing) is not allowed.
+ */
typedef struct skb_frag {
netmem_ref netmem;
unsigned int len;
diff --git a/include/net/netmem.h b/include/net/netmem.h
index cc97611632dc8..8fcf455664781 100644
--- a/include/net/netmem.h
+++ b/include/net/netmem.h
@@ -70,16 +70,17 @@ enum net_iov_type {
NET_IOV_IOURING,
};
-/* A memory descriptor representing abstract networking I/O vectors,
- * generally for non-pages memory that doesn't have its corresponding
- * struct page and needs to be explicitly allocated through slab.
+/* A memory descriptor representing abstract networking I/O vectors.
*
* net_iovs are allocated and used by networking code, and the size of
* the chunk is PAGE_SIZE.
*
- * This memory can be any form of non-struct paged memory. Examples
- * include imported dmabuf memory and imported io_uring memory. See
- * net_iov_type for all the supported types.
+ * Examples include imported dmabuf memory and imported io_uring memory. See
+ * net_iov_type for all the supported types. While current net_iov types are
+ * unreadable by the CPU, net_iov has no inherent restrictions and future
+ * net_iov implementations may be CPU-readable. Code must not assume net_iov
+ * implies unreadable memory; check readability via netmem_address() or
+ * skb_frags_readable() instead.
*
* @pp_magic: pp field, similar to the one in struct page/struct
* netmem_desc.
@@ -134,8 +135,17 @@ static inline void net_iov_init(struct net_iov *niov,
* network memory.
*
* A netmem_ref can be a struct page* or a struct net_iov* underneath.
+ * Memory providers (or the default page_pool allocator) allocate struct
+ * net_iov or struct page, cast them to netmem_ref, and hand them to
+ * page_pool.
*
- * Use the supplied helpers to obtain the underlying memory pointer and fields.
+ * The page_pool, drivers, and core networking stack should operate on
+ * netmem_ref rather than struct page or struct net_iov. Downcasting
+ * netmem_ref via netmem_to_page() or netmem_to_net_iov() in callers is
+ * not allowed unless a code path strictly requires a specific backing
+ * type (e.g., kmap_local_page()). In such cases, add a netmem helper here
+ * that handles both page and net_iov cases and returns an error if the
+ * underlying type cannot support the operation.
*/
typedef unsigned long __bitwise netmem_ref;
@@ -300,9 +310,8 @@ static inline atomic_long_t *netmem_get_pp_ref_count_ref(netmem_ref netmem)
static inline bool netmem_is_pref_nid(netmem_ref netmem, int pref_nid)
{
- /* NUMA node preference only makes sense if we're allocating
- * system memory. Memory providers (which give us net_iovs)
- * choose for us.
+ /* NUMA node preference only applies to struct page; net_iovs are
+ * managed by their memory provider.
*/
if (netmem_is_net_iov(netmem))
return true;
diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h
index cd021832c3fa3..28635ce9454e8 100644
--- a/include/net/page_pool/helpers.h
+++ b/include/net/page_pool/helpers.h
@@ -8,12 +8,20 @@
/**
* DOC: page_pool allocator
*
- * The page_pool allocator is optimized for recycling page or page fragment used
- * by skb packet and xdp frame.
+ * The page_pool allocator is optimized for recycling network memory
+ * (netmem_ref) or fragments used by skb packets and xdp frames.
*
- * Basic use involves replacing any alloc_pages() calls with page_pool_alloc(),
- * which allocate memory with or without page splitting depending on the
- * requested memory size.
+ * page_pool natively operates on netmem_ref, which abstracts the underlying
+ * memory type (struct page or struct net_iov) supplied by the page allocator
+ * or a memory provider. Drivers and core networking code should use the
+ * netmem-based APIs (e.g. page_pool_alloc_netmem(), page_pool_put_netmem()).
+ * The struct page-based APIs (e.g. page_pool_alloc(), page_pool_alloc_pages(),
+ * page_pool_put_page()) are legacy compatibility wrappers for drivers not yet
+ * converted to netmem.
+ *
+ * Basic use involves replacing any alloc_pages() calls with
+ * page_pool_alloc_netmem() (or legacy page_pool_alloc()), which allocate memory
+ * with or without splitting depending on the requested memory size.
*
* If the driver knows that it always requires full pages or its allocations are
* always smaller than half a page, it can use one of the more specific API
diff --git a/include/net/page_pool/memory_provider.h b/include/net/page_pool/memory_provider.h
index 255ce4cfd9755..6eaca6725d904 100644
--- a/include/net/page_pool/memory_provider.h
+++ b/include/net/page_pool/memory_provider.h
@@ -9,6 +9,14 @@ struct netdev_rx_queue;
struct netlink_ext_ack;
struct sk_buff;
+/* Memory providers allocate underlying memory (struct net_iov or struct page),
+ * cast it to netmem_ref, and supply it to page_pool. Memory providers are not
+ * limited to net_iov; a provider returning page-backed netmems is allowed, so
+ * callers must not assume a memory provider implies net_iov.
+ *
+ * Per-provider custom logic must be delegated to memory_provider_ops rather
+ * than handled directly in page_pool core code.
+ */
struct memory_provider_ops {
netmem_ref (*alloc_netmems)(struct page_pool *pool, gfp_t gfp);
bool (*release_netmem)(struct page_pool *pool, netmem_ref netmem);
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h
index 03da138722f58..6d543076a0c0b 100644
--- a/include/net/page_pool/types.h
+++ b/include/net/page_pool/types.h
@@ -22,9 +22,9 @@
*/
#define PP_FLAG_SYSTEM_POOL BIT(2) /* Global system page_pool */
-/* Allow unreadable (net_iov backed) netmem in this page_pool. Drivers setting
- * this must be able to support unreadable netmem, where netmem_address() would
- * return NULL. This flag should not be set for header page_pools.
+/* Allow unreadable netmem in this page_pool. Drivers setting this must be able
+ * to support unreadable netmem, where netmem_address() returns NULL. This flag
+ * should not be set for header page_pools.
*
* If the driver sets PP_FLAG_ALLOW_UNREADABLE_NETMEM, it should also set
* page_pool_params.slow.queue_idx.
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 5c4024a03e105..9395e0ad0a13b 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -6206,6 +6206,9 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
if (to->pp_recycle != from->pp_recycle)
return false;
+ /* All frags in an skb must have the same backing netmem memory type;
+ * do not coalesce skbs with different frag memory types.
+ */
if (skb_frags_readable(from) != skb_frags_readable(to))
return false;
|
| 3/2 | 2026/10/05 01:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5904 output: 37 thoughts: 395 Thoughts: **Analyzing the Patch Diff: SKB Coalescing** Okay, here's the diff. Let's dig in. I see updates to documentation (specifically `netmem.rst` which I need to check), comments in a few headers (`skbuff.h`, `netmem.h`, `helpers.h`, `memory_provider.h`, and `types.h`), and the core change appears to be in `net/core/skbuff.c`. Specifically, the `skb_try_coalesce` function. Now, what's this? There's a check that wasn't there before: `if (skb_frags_readable(from) != skb_frags_readable(to)) return false;`. That's a key bit, especially the comment that follows it; something about memory types when coalescing. It states "All frags in an skb must have the same backing netmem memory type; do not coalesce skbs with different frag memory types." But hold on, was that check really *added*? This looks like a change to address a specific scenario to prevent a bug. I need to confirm if that code was inserted or just the comment. A quick `git grep` on `net/core/skbuff.c` around line 6206 or just reading the file itself will sort this out quickly. I'll get the real answer from the source. |
| 4/2 | 2026/10/05 01:08 | tool | read-file |
0mArgs:{
"File": "net/core/skbuff.c",
"FirstLine": 6200,
"LineCount": 20
}Results: {
"Contents": "6200:\t\t/* In general, avoid mixing page_pool and non-page_pool allocated\n6201:\t\t * pages within the same SKB. In theory we could take full\n6202:\t\t * references if @from is cloned and !@to-\u003epp_recycle but its\n6203:\t\t * tricky (due to potential race with the clone disappearing) and\n6204:\t\t * rare, so not worth dealing with.\n6205:\t\t */\n6206:\t\tif (to-\u003epp_recycle != from-\u003epp_recycle)\n6207:\t\t\treturn false;\n6208:\t\n6209:\t\t/* All frags in an skb must have the same backing netmem memory type;\n6210:\t\t * do not coalesce skbs with different frag memory types.\n6211:\t\t */\n6212:\t\tif (skb_frags_readable(from) != skb_frags_readable(to))\n6213:\t\t\treturn false;\n6214:\t\n6215:\t\tif (len \u003c= skb_tailroom(to) \u0026\u0026 skb_frags_readable(from)) {\n6216:\t\t\tif (len)\n6217:\t\t\t\tBUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len));\n6218:\t\t\t*delta_truesize = 0;\n6219:\t\t\treturn true;\n"
} |
| 5/2 | 2026/10/05 01:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 7006 output: 30 thoughts: 582 Thoughts: **Analyzing a `skbuff.c` Diff: A Close Look** Okay, hold on a second... let me scrutinize this `net/core/skbuff.c` diff more closely. Right, so we're looking at `skb_try_coalesce`. I'm seeing a change, and... wait a minute! This is interesting. It *looks* like a new check was added for fragment memory types before coalescing, specifically related to `skb_frags_readable()`. But something feels off. The diff block shows: ```diff @@ -6206,6 +6206,9 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from, if (to->pp_recycle != from->pp_recycle) return false; + /* All frags in an skb must have the same backing netmem memory type; + * do not coalesce skbs with different frag memory types. + */ if (skb_frags_readable(from) != skb_frags_readable(to)) return false; ``` But, as I look closer, I realize... that `if (skb_frags_readable(from) != skb_frags_readable(to))` line *was already there*! It's just the comment explaining the rationale for this pre-existing condition that's new! The whitespace suggests this was not a new addition, but a clarification to an existing condition. I need to dig deeper. I want to check the commit log. I should check `git log -1 -p` to see what the actual commit added, and verify if the functionality has changed at all, or just been clarified. I think I'll look at the commit log. |
| 6/2 | 2026/10/05 01:08 | tool | grepper |
0mArgs:{
"Expression": "All frags in an skb must have the same backing netmem memory type"
}Results: {
"Output": "net/core/skbuff.c=6189=bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,\n--\nnet/core/skbuff.c-6208-\nnet/core/skbuff.c:6209:\t/* All frags in an skb must have the same backing netmem memory type;\nnet/core/skbuff.c-6210-\t * do not coalesce skbs with different frag memory types.\n"
} |
| 7/2 | 2026/10/05 01:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 8153 output: 104 thoughts: 2377 Thoughts: **Analysis of the "netmem: documentation and comment clarifications" Patch Series** Okay, let's break this down. Line by line, I've gone through each of these diffs, and the conclusion is pretty straightforward. This patch series is strictly about documentation improvements and clarifying comments. Not a single line of *executable* code has been added, removed, or modified. * `Documentation/networking/netmem.rst`: purely documentation. * Header files (`include/linux/skbuff.h`, `include/net/netmem.h`, `include/net/page_pool/helpers.h`, `include/net/page_pool/memory_provider.h`, `include/net/page_pool/types.h`): all modifications are within comments (/* ... */), adding explanations, clarifying existing concepts, or providing guidance on usage. * `net/core/skbuff.c`: likewise, the change consists of a clarifying comment. The changes are entirely non-functional. They don't introduce new code paths, modify existing behavior, or change any data structures. All the changes fall squarely into the category of "documentation, comments, or spelling fixes," as defined in Section 2 of the WorthFuzzing guidelines. Therefore, this patch series is not worth fuzzing, based on the documented criteria, and it has no impact on kernel functionality from a security perspective. It is merely about making the existing code more understandable through documentation and comments. |
| 8/2 | 2026/10/05 01:09 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch series contains only documentation updates (Documentation/networking/netmem.rst) and code comments/kernel-doc updates across include/linux/skbuff.h, include/net/netmem.h, include/net/page_pool/*.h, and net/core/skbuff.c. No executable code or data structures are modified.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch series contains only documentation updates (Documentation/networking/netmem.rst) and code comments/kernel-doc updates across include/linux/skbuff.h, include/net/netmem.h, include/net/page_pool/*.h, and net/core/skbuff.c. No executable code or data structures are modified.",
"WorthFuzzing": false
} |
| 9/1 | 2026/10/05 01:09 | 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) |
|---|