| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/10/15 01:21 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies only user-space selftests under tools/testing/selftests/mm/ and does not touch any kernel code or affect the compiled kernel image.",
"WorthFuzzing": false
} |
| 1/1 | 2026/10/15 01:21 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 7b55ff50ae325cc2ce647b9715d26be94e899b34\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Oct 15 01:21:28 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/tools/testing/selftests/mm/mremap_dontunmap.c b/tools/testing/selftests/mm/mremap_dontunmap.c\nindex 96ba537facf7e..a0fd99ff82577 100644\n--- a/tools/testing/selftests/mm/mremap_dontunmap.c\n+++ b/tools/testing/selftests/mm/mremap_dontunmap.c\n@@ -335,6 +335,98 @@ static void mremap_dontunmap_partial_mapping_overwrite(void)\n \tksft_test_result_pass(\"%s\\n\", __func__);\n }\n \n+static long get_vmlck_kb(void)\n+{\n+\tFILE *f = fopen(\"/proc/self/status\", \"r\");\n+\tchar *line = NULL;\n+\tsize_t len = 0;\n+\tlong kb = -1;\n+\n+\tif (!f)\n+\t\tksft_exit_fail_msg(\"fopen /proc/self/status: %s\\n\",\n+\t\t\t\t strerror(errno));\n+\n+\twhile (getline(\u0026line, \u0026len, f) != -1) {\n+\t\tif (sscanf(line, \"VmLck: %ld kB\", \u0026kb) == 1)\n+\t\t\tbreak;\n+\t}\n+\n+\tfree(line);\n+\tfclose(f);\n+\n+\tif (kb \u003c 0)\n+\t\tksft_exit_fail_msg(\"VmLck not found in /proc/self/status\\n\");\n+\n+\treturn kb;\n+}\n+\n+static void mremap_dontunmap_partial_mlocked(void)\n+{\n+\tunsigned long num_pages = 10;\n+\tsize_t size = num_pages * page_size;\n+\tsize_t half = (num_pages / 2) * page_size;\n+\tvoid *src, *dst;\n+\tlong baseline, locked, remapped, after;\n+\tbool pass;\n+\n+\tbaseline = get_vmlck_kb();\n+\n+\tsrc = mmap(NULL, size, PROT_READ | PROT_WRITE,\n+\t\t MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n+\tif (src == MAP_FAILED)\n+\t\tksft_exit_fail_msg(\"mmap source: %s\\n\", strerror(errno));\n+\n+\tdst = mmap(NULL, half, PROT_READ | PROT_WRITE,\n+\t\t MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n+\tif (dst == MAP_FAILED)\n+\t\tksft_exit_fail_msg(\"mmap destination: %s\\n\", strerror(errno));\n+\n+\tmemset(src, 'a', size);\n+\n+\tif (mlock(src, size)) {\n+\t\tif (errno == EPERM || errno == ENOMEM) {\n+\t\t\tksft_print_msg(\"mlock unavailable: %s\\n\",\n+\t\t\t\t strerror(errno));\n+\n+\t\t\tif (munmap(dst, half))\n+\t\t\t\tksft_exit_fail_msg(\"munmap destination: %s\\n\",\n+\t\t\t\t\t\t strerror(errno));\n+\t\t\tif (munmap(src, size))\n+\t\t\t\tksft_exit_fail_msg(\"munmap source: %s\\n\",\n+\t\t\t\t\t\t strerror(errno));\n+\n+\t\t\tksft_test_result_skip(\"%s\\n\", __func__);\n+\t\t\treturn;\n+\t\t}\n+\t\tksft_exit_fail_msg(\"mlock: %s\\n\", strerror(errno));\n+\t}\n+\n+\tlocked = get_vmlck_kb();\n+\n+\tif (mremap(src + half, half, half,\n+\t\t MREMAP_MAYMOVE | MREMAP_FIXED | MREMAP_DONTUNMAP,\n+\t\t dst) == MAP_FAILED)\n+\t\tksft_exit_fail_msg(\"mremap: %s\\n\", strerror(errno));\n+\n+\tremapped = get_vmlck_kb();\n+\n+\tif (munmap(dst, half))\n+\t\tksft_exit_fail_msg(\"munmap destination: %s\\n\",\n+\t\t\t\t strerror(errno));\n+\tif (munmap(src, size))\n+\t\tksft_exit_fail_msg(\"munmap source: %s\\n\", strerror(errno));\n+\n+\tafter = get_vmlck_kb();\n+\n+\tpass = locked == baseline + (long)(size / 1024) \u0026\u0026\n+\t remapped == locked \u0026\u0026\n+\t after == baseline;\n+\n+\tksft_test_result(pass,\n+\t\t\t \"%s (baseline=%ld kB, locked=%ld kB, remapped=%ld kB, after=%ld kB)\\n\",\n+\t\t\t __func__, baseline, locked, remapped, after);\n+}\n+\n int main(void)\n {\n \tksft_print_header();\n@@ -348,7 +440,7 @@ int main(void)\n \t\tksft_finished();\n \t}\n \n-\tksft_set_plan(5);\n+\tksft_set_plan(6);\n \n \t// Keep a page sized buffer around for when we need it.\n \tpage_buffer =\n@@ -361,6 +453,7 @@ int main(void)\n \tmremap_dontunmap_simple_fixed();\n \tmremap_dontunmap_partial_mapping();\n \tmremap_dontunmap_partial_mapping_overwrite();\n+\tmremap_dontunmap_partial_mlocked();\n \n \tBUG_ON(munmap(page_buffer, page_size) == -1,\n \t \"unable to unmap page buffer\");\n"
} |
| 2/1 | 2026/10/15 01:21 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies only user-space selftests under tools/testing/selftests/mm/ and does not touch any kernel code or affect the compiled kernel image.",
"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 7b55ff50ae325cc2ce647b9715d26be94e899b34
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Oct 15 01:21:28 2026 +0000
syz-cluster: applied patch under review
diff --git a/tools/testing/selftests/mm/mremap_dontunmap.c b/tools/testing/selftests/mm/mremap_dontunmap.c
index 96ba537facf7e..a0fd99ff82577 100644
--- a/tools/testing/selftests/mm/mremap_dontunmap.c
+++ b/tools/testing/selftests/mm/mremap_dontunmap.c
@@ -335,6 +335,98 @@ static void mremap_dontunmap_partial_mapping_overwrite(void)
ksft_test_result_pass("%s\n", __func__);
}
+static long get_vmlck_kb(void)
+{
+ FILE *f = fopen("/proc/self/status", "r");
+ char *line = NULL;
+ size_t len = 0;
+ long kb = -1;
+
+ if (!f)
+ ksft_exit_fail_msg("fopen /proc/self/status: %s\n",
+ strerror(errno));
+
+ while (getline(&line, &len, f) != -1) {
+ if (sscanf(line, "VmLck: %ld kB", &kb) == 1)
+ break;
+ }
+
+ free(line);
+ fclose(f);
+
+ if (kb < 0)
+ ksft_exit_fail_msg("VmLck not found in /proc/self/status\n");
+
+ return kb;
+}
+
+static void mremap_dontunmap_partial_mlocked(void)
+{
+ unsigned long num_pages = 10;
+ size_t size = num_pages * page_size;
+ size_t half = (num_pages / 2) * page_size;
+ void *src, *dst;
+ long baseline, locked, remapped, after;
+ bool pass;
+
+ baseline = get_vmlck_kb();
+
+ src = mmap(NULL, size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (src == MAP_FAILED)
+ ksft_exit_fail_msg("mmap source: %s\n", strerror(errno));
+
+ dst = mmap(NULL, half, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (dst == MAP_FAILED)
+ ksft_exit_fail_msg("mmap destination: %s\n", strerror(errno));
+
+ memset(src, 'a', size);
+
+ if (mlock(src, size)) {
+ if (errno == EPERM || errno == ENOMEM) {
+ ksft_print_msg("mlock unavailable: %s\n",
+ strerror(errno));
+
+ if (munmap(dst, half))
+ ksft_exit_fail_msg("munmap destination: %s\n",
+ strerror(errno));
+ if (munmap(src, size))
+ ksft_exit_fail_msg("munmap source: %s\n",
+ strerror(errno));
+
+ ksft_test_result_skip("%s\n", __func__);
+ return;
+ }
+ ksft_exit_fail_msg("mlock: %s\n", strerror(errno));
+ }
+
+ locked = get_vmlck_kb();
+
+ if (mremap(src + half, half, half,
+ MREMAP_MAYMOVE | MREMAP_FIXED | MREMAP_DONTUNMAP,
+ dst) == MAP_FAILED)
+ ksft_exit_fail_msg("mremap: %s\n", strerror(errno));
+
+ remapped = get_vmlck_kb();
+
+ if (munmap(dst, half))
+ ksft_exit_fail_msg("munmap destination: %s\n",
+ strerror(errno));
+ if (munmap(src, size))
+ ksft_exit_fail_msg("munmap source: %s\n", strerror(errno));
+
+ after = get_vmlck_kb();
+
+ pass = locked == baseline + (long)(size / 1024) &&
+ remapped == locked &&
+ after == baseline;
+
+ ksft_test_result(pass,
+ "%s (baseline=%ld kB, locked=%ld kB, remapped=%ld kB, after=%ld kB)\n",
+ __func__, baseline, locked, remapped, after);
+}
+
int main(void)
{
ksft_print_header();
@@ -348,7 +440,7 @@ int main(void)
ksft_finished();
}
- ksft_set_plan(5);
+ ksft_set_plan(6);
// Keep a page sized buffer around for when we need it.
page_buffer =
@@ -361,6 +453,7 @@ int main(void)
mremap_dontunmap_simple_fixed();
mremap_dontunmap_partial_mapping();
mremap_dontunmap_partial_mapping_overwrite();
+ mremap_dontunmap_partial_mlocked();
BUG_ON(munmap(page_buffer, page_size) == -1,
"unable to unmap page buffer");
|
| 3/2 | 2026/10/15 01:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 4237 output: 66 thoughts: 674 Thoughts: **Analysis of the Provided Kernel Patch** Okay, let's break this down. From what I see, the patch is exclusively modifying `tools/testing/selftests/mm/mremap_dontunmap.c`. That's the only file in the diff. Let me consult the guidelines... right, section 2. We're dealing with "Non-kernel and non-executable changes," specifically modifications to "User-space directories, self-tests, samples, or scripts... that do not affect the compiled kernel image (vmlinux) or kernel modules." Let me confirm that this is indeed the *only* file modified in the commit; there's no way to directly execute git commands. However, given the provided diff and commit details, it seems very clear: this is strictly a change to `tools/testing/selftests/mm/mremap_dontunmap.c`. No other files are touched. Now, based on the negative criteria, this falls squarely into the category that *does not* affect the kernel image or modules. Therefore, this change is not worth fuzzing. I'll flag this as `WorthFuzzing=false`. The `FocusSymbols` and `EnableConfigs` will be empty, and I'll include a concise explanation. Alright, before I finalize, let's make sure I've addressed all the requirements. Yep, I need to call the `set-results` tool once before responding. Consider it done. We're good to go. |
| 4/2 | 2026/10/15 01:21 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies only user-space selftests under tools/testing/selftests/mm/ and does not touch any kernel code or affect the compiled kernel image.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies only user-space selftests under tools/testing/selftests/mm/ and does not touch any kernel code or affect the compiled kernel image.",
"WorthFuzzing": false
} |
| 5/1 | 2026/10/15 01:21 | 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) |
|---|