| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/28 17:20 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any changes to the kernel source code.",
"WorthFuzzing": false
} |
| 1/1 | 2026/08/28 17:20 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 98889968a000877f2d94f3a9f0d50be5f62b83a1\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Aug 28 17:20:49 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/tools/testing/selftests/mm/hugepage_settings.c b/tools/testing/selftests/mm/hugepage_settings.c\nindex d7917dce3abac..584054736ce99 100644\n--- a/tools/testing/selftests/mm/hugepage_settings.c\n+++ b/tools/testing/selftests/mm/hugepage_settings.c\n@@ -449,6 +449,15 @@ unsigned long hugetlb_free_pages(unsigned long size)\n \treturn read_num(path);\n }\n \n+unsigned long hugetlb_nr_resv_pages(unsigned long size)\n+{\n+\tchar path[PATH_MAX];\n+\n+\thugetlb_sysfs_path(path, sizeof(path), size, \"resv_hugepages\");\n+\n+\treturn read_num(path);\n+}\n+\n static bool __hugetlb_setup(unsigned long size, unsigned long nr)\n {\n \tunsigned long free = hugetlb_free_pages(size);\ndiff --git a/tools/testing/selftests/mm/hugepage_settings.h b/tools/testing/selftests/mm/hugepage_settings.h\nindex 726c73c43c05b..548e9d288d1d1 100644\n--- a/tools/testing/selftests/mm/hugepage_settings.h\n+++ b/tools/testing/selftests/mm/hugepage_settings.h\n@@ -98,6 +98,7 @@ unsigned long default_huge_page_size(void);\n unsigned long hugetlb_nr_pages(unsigned long size);\n void hugetlb_set_nr_pages(unsigned long size, unsigned long nr);\n unsigned long hugetlb_free_pages(unsigned long size);\n+unsigned long hugetlb_nr_resv_pages(unsigned long size);\n \n static inline void hugetlb_save_settings(void)\n {\ndiff --git a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c\nindex f94549efcc6ff..d1f568fed4aa9 100644\n--- a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c\n+++ b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c\n@@ -15,13 +15,20 @@\n *\n * Touching the first page after thread3's allocation will raise a SIGBUS\n *\n+ * We setup a 2nd test where we create a child process, then unmap the page in\n+ * the parent while the child waits and verify that there is no underflow\n+ * of the reserved count.\n+ *\n * Author: Breno Leitao \u003cleitao@debian.org\u003e\n */\n+#include \u003climits.h\u003e\n #include \u003cpthread.h\u003e\n+#include \u003csignal.h\u003e\n #include \u003cstdio.h\u003e\n #include \u003cstdlib.h\u003e\n #include \u003csys/mman.h\u003e\n #include \u003csys/types.h\u003e\n+#include \u003csys/wait.h\u003e\n #include \u003cunistd.h\u003e\n \n #include \"vm_util.h\"\n@@ -74,7 +81,7 @@ void *map_extra(void *unused)\n \treturn NULL;\n }\n \n-int main(void)\n+void test_madv_vs_map(void)\n {\n \tpthread_t thread1, thread2, thread3;\n \tvoid *ret;\n@@ -85,13 +92,6 @@ int main(void)\n \t */\n \tint max = 10;\n \n-\tksft_print_header();\n-\tksft_set_plan(1);\n-\n-\tif (!hugetlb_setup_default_exact(1))\n-\t\tksft_exit_skip(\"This test needs one and only one page to execute. Got %lu\\n\",\n-\t\t\t hugetlb_free_default_pages());\n-\n \tmmap_size = default_huge_page_size();\n \n \twhile (max--) {\n@@ -120,5 +120,96 @@ int main(void)\n \t}\n \n \tksft_test_result_pass(\"No unexpected huge page allocations\\n\");\n+}\n+\n+void test_underflow(void)\n+{\n+\tpid_t pid;\n+\tint pipe_fds[2];\n+\tunsigned long nr_reserved = 0;\n+\n+\thuge_ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE,\n+\t\t\tMAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);\n+\n+\tif ((unsigned long)huge_ptr == -1)\n+\t\tksft_exit_fail_msg(\"Failed to allocate huge page\\n\");\n+\n+\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\tif (nr_reserved != 1)\n+\t\tksft_exit_fail_msg(\"Unexpected number of reserved pages: %lu, expected 1\\n\",\n+\t\t\t\t nr_reserved);\n+\n+\t/* Force the fault to ensure the reservation is consumed */\n+\t*huge_ptr = 0;\n+\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\tif (nr_reserved != 0)\n+\t\tksft_exit_fail_msg(\"Unexpected number of reserved pages: %lu, expected 0\\n\",\n+\t\t\t\t nr_reserved);\n+\n+\tif (pipe(pipe_fds) != 0)\n+\t\tksft_exit_fail_msg(\"pipe failed\");\n+\n+\tpid = fork();\n+\tif (pid \u003c 0)\n+\t\tksft_exit_fail_msg(\"fork failed\");\n+\n+\tif (pid == 0) {\n+\t\t/* Child: Simply wait for the parent */\n+\t\tchar b;\n+\n+\t\tclose(pipe_fds[1]);\n+\t\tif (read(pipe_fds[0], \u0026b, 1) \u003c 0)\n+\t\t\tksft_exit_fail_msg(\"child read failed\");\n+\t\treturn;\n+\t}\n+\n+\t/* Parent */\n+\tclose(pipe_fds[0]);\n+\n+\t/* First unmap, this will close the vma */\n+\tif (munmap(huge_ptr, mmap_size) != 0) {\n+\t\tkill(pid, SIGKILL);\n+\t\tksft_exit_fail_msg(\"munmap failed\");\n+\t}\n+\n+\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\tif (nr_reserved == ULONG_MAX) {\n+\t\tksft_test_result_fail(\"After the munmap, HugePages_Rsvd underflowed!\\n\");\n+\t} else if (nr_reserved == 0) {\n+\t\tksft_test_result_pass(\"Underflow not present!\\n\");\n+\t} else {\n+\t\tksft_exit_fail_msg(\"Unexpected HugePages_Rsvd=%ld after munmap, should be 0 or -1. Repeat the test\\n\",\n+\t\t\t\t nr_reserved);\n+\t}\n+\t/* Make the child exit, this should restore HugePages_Rsvd to 0 */\n+\tif (write(pipe_fds[1], \u0026nr_reserved, 1) \u003c 0) {\n+\t\tkill(pid, SIGKILL);\n+\t\tksft_exit_fail_msg(\"write failed\");\n+\t}\n+\tclose(pipe_fds[1]);\n+\tif (waitpid(pid, NULL, 0) \u003c= 0)\n+\t\tksft_exit_fail_msg(\"write failed\");\n+\n+\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\tif (nr_reserved == 0) {\n+\t\tksft_test_result_pass(\"After the child dies, HugePages_Rsvd is properly set to 0\\n\");\n+\t} else {\n+\t\tksft_exit_fail_msg(\"Unexpected HugePages_Rsvd=%ld after the child termination munmap, should be 0 or -1. Repeat the test\\n\",\n+\t\t\t\t nr_reserved);\n+\t}\n+}\n+\n+int main(void)\n+{\n+\tksft_print_header();\n+\tksft_set_plan(3);\n+\n+\tif (!hugetlb_setup_default_exact(1))\n+\t\tksft_exit_skip(\"This test needs one and only one page to execute. Got %lu\\n\",\n+\t\t\t hugetlb_free_default_pages());\n+\n+\ttest_madv_vs_map();\n+\ttest_underflow();\n+\n \tksft_finished();\n }\n"
} |
| 2/1 | 2026/08/28 17:20 | agent | patch-evaluator |
2mModel:core Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any changes to the kernel source code.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a '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: For your convenience, here is the diff of the changes:
commit 98889968a000877f2d94f3a9f0d50be5f62b83a1
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Aug 28 17:20:49 2026 +0000
syz-cluster: applied patch under review
diff --git a/tools/testing/selftests/mm/hugepage_settings.c b/tools/testing/selftests/mm/hugepage_settings.c
index d7917dce3abac..584054736ce99 100644
--- a/tools/testing/selftests/mm/hugepage_settings.c
+++ b/tools/testing/selftests/mm/hugepage_settings.c
@@ -449,6 +449,15 @@ unsigned long hugetlb_free_pages(unsigned long size)
return read_num(path);
}
+unsigned long hugetlb_nr_resv_pages(unsigned long size)
+{
+ char path[PATH_MAX];
+
+ hugetlb_sysfs_path(path, sizeof(path), size, "resv_hugepages");
+
+ return read_num(path);
+}
+
static bool __hugetlb_setup(unsigned long size, unsigned long nr)
{
unsigned long free = hugetlb_free_pages(size);
diff --git a/tools/testing/selftests/mm/hugepage_settings.h b/tools/testing/selftests/mm/hugepage_settings.h
index 726c73c43c05b..548e9d288d1d1 100644
--- a/tools/testing/selftests/mm/hugepage_settings.h
+++ b/tools/testing/selftests/mm/hugepage_settings.h
@@ -98,6 +98,7 @@ unsigned long default_huge_page_size(void);
unsigned long hugetlb_nr_pages(unsigned long size);
void hugetlb_set_nr_pages(unsigned long size, unsigned long nr);
unsigned long hugetlb_free_pages(unsigned long size);
+unsigned long hugetlb_nr_resv_pages(unsigned long size);
static inline void hugetlb_save_settings(void)
{
diff --git a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c
index f94549efcc6ff..d1f568fed4aa9 100644
--- a/tools/testing/selftests/mm/hugetlb_madv_vs_map.c
+++ b/tools/testing/selftests/mm/hugetlb_madv_vs_map.c
@@ -15,13 +15,20 @@
*
* Touching the first page after thread3's allocation will raise a SIGBUS
*
+ * We setup a 2nd test where we create a child process, then unmap the page in
+ * the parent while the child waits and verify that there is no underflow
+ * of the reserved count.
+ *
* Author: Breno Leitao <leitao@debian.org>
*/
+#include <limits.h>
#include <pthread.h>
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/types.h>
+#include <sys/wait.h>
#include <unistd.h>
#include "vm_util.h"
@@ -74,7 +81,7 @@ void *map_extra(void *unused)
return NULL;
}
-int main(void)
+void test_madv_vs_map(void)
{
pthread_t thread1, thread2, thread3;
void *ret;
@@ -85,13 +92,6 @@ int main(void)
*/
int max = 10;
- ksft_print_header();
- ksft_set_plan(1);
-
- if (!hugetlb_setup_default_exact(1))
- ksft_exit_skip("This test needs one and only one page to execute. Got %lu\n",
- hugetlb_free_default_pages());
-
mmap_size = default_huge_page_size();
while (max--) {
@@ -120,5 +120,96 @@ int main(void)
}
ksft_test_result_pass("No unexpected huge page allocations\n");
+}
+
+void test_underflow(void)
+{
+ pid_t pid;
+ int pipe_fds[2];
+ unsigned long nr_reserved = 0;
+
+ huge_ptr = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB, -1, 0);
+
+ if ((unsigned long)huge_ptr == -1)
+ ksft_exit_fail_msg("Failed to allocate huge page\n");
+
+ nr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());
+ if (nr_reserved != 1)
+ ksft_exit_fail_msg("Unexpected number of reserved pages: %lu, expected 1\n",
+ nr_reserved);
+
+ /* Force the fault to ensure the reservation is consumed */
+ *huge_ptr = 0;
+ nr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());
+ if (nr_reserved != 0)
+ ksft_exit_fail_msg("Unexpected number of reserved pages: %lu, expected 0\n",
+ nr_reserved);
+
+ if (pipe(pipe_fds) != 0)
+ ksft_exit_fail_msg("pipe failed");
+
+ pid = fork();
+ if (pid < 0)
+ ksft_exit_fail_msg("fork failed");
+
+ if (pid == 0) {
+ /* Child: Simply wait for the parent */
+ char b;
+
+ close(pipe_fds[1]);
+ if (read(pipe_fds[0], &b, 1) < 0)
+ ksft_exit_fail_msg("child read failed");
+ return;
+ }
+
+ /* Parent */
+ close(pipe_fds[0]);
+
+ /* First unmap, this will close the vma */
+ if (munmap(huge_ptr, mmap_size) != 0) {
+ kill(pid, SIGKILL);
+ ksft_exit_fail_msg("munmap failed");
+ }
+
+ nr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());
+ if (nr_reserved == ULONG_MAX) {
+ ksft_test_result_fail("After the munmap, HugePages_Rsvd underflowed!\n");
+ } else if (nr_reserved == 0) {
+ ksft_test_result_pass("Underflow not present!\n");
+ } else {
+ ksft_exit_fail_msg("Unexpected HugePages_Rsvd=%ld after munmap, should be 0 or -1. Repeat the test\n",
+ nr_reserved);
+ }
+ /* Make the child exit, this should restore HugePages_Rsvd to 0 */
+ if (write(pipe_fds[1], &nr_reserved, 1) < 0) {
+ kill(pid, SIGKILL);
+ ksft_exit_fail_msg("write failed");
+ }
+ close(pipe_fds[1]);
+ if (waitpid(pid, NULL, 0) <= 0)
+ ksft_exit_fail_msg("write failed");
+
+ nr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());
+ if (nr_reserved == 0) {
+ ksft_test_result_pass("After the child dies, HugePages_Rsvd is properly set to 0\n");
+ } else {
+ ksft_exit_fail_msg("Unexpected HugePages_Rsvd=%ld after the child termination munmap, should be 0 or -1. Repeat the test\n",
+ nr_reserved);
+ }
+}
+
+int main(void)
+{
+ ksft_print_header();
+ ksft_set_plan(3);
+
+ if (!hugetlb_setup_default_exact(1))
+ ksft_exit_skip("This test needs one and only one page to execute. Got %lu\n",
+ hugetlb_free_default_pages());
+
+ test_madv_vs_map();
+ test_underflow();
+
ksft_finished();
}
|
| 3/2 | 2026/08/28 17:20 | llm | patch-evaluator |
2mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4091 output: 63 thoughts: 413 Thoughts: **Patch Series Review - WorthFuzzing Determination** Okay, so the task is to determine if this patch series introduces any functional changes to the kernel that necessitate fuzzing. My initial instinct is to dive into the diff. The provided context indicates this is a straightforward assessment. I'm seeing that the changes are isolated to the `tools/testing/selftests/mm/` directory. Specifically, it looks like modifications to `hugepage_settings.c`, `hugepage_settings.h`, and `hugetlb_madv_vs_map.c`. Hmm, right away, these are self-tests. They're in `tools/` – which, in my experience, almost always means they're not impacting core kernel logic, drivers, or architectures. To be absolutely sure, I'll quickly check the git log or status, just in case there's anything subtly hidden, but based on what's presented, this confirms my initial impression: only changes within those self-test files. This means these changes won't be reachable by any core kernel logic or architectures. Now, let's refresh my memory on the guidelines. Ah, right: "Return WorthFuzzing=false if the patch only contains: modifications to Documentation/, Kconfig files, or code comments." And, "If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true." Given these tests live in `tools/testing/selftests/...`, they're specifically *userspace* test tools. They *do not* affect the kernel's code/logic at all. Consequently, I'm confident that `WorthFuzzing` should be `false`. To confirm the assessment and ensure this is fully recorded, I'm setting the results using `set-results`: * `EnableConfigs`: Empty or null / `[]` * `FocusSymbols`: `[]` * `Reasoning`: "The patch only modifies userspace selftests under tools/testing/selftests/mm/ and does not make any changes to the Linux kernel image itself." * `WorthFuzzing`: `false` And that's it; let's call `set-results`. This is a clean `false` for fuzzing. |
| 4/2 | 2026/08/28 17:23 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any changes to the kernel source code.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any changes to the kernel source code.",
"WorthFuzzing": false
} |
| 5/1 | 2026/08/28 17:23 | 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) |
|---|