| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/27 18:33 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch only modifies selftests and does not make any functional changes to the kernel.",
"WorthFuzzing": false
} |
| 1/1 | 2026/08/27 18:33 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit ae76f2f6259ec53455b094226f08297e67fb8baf\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Aug 27 18:33: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..6aa42f064279d 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@@ -86,7 +93,7 @@ int main(void)\n \tint max = 10;\n \n \tksft_print_header();\n-\tksft_set_plan(1);\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@@ -120,5 +127,80 @@ int main(void)\n \t}\n \n \tksft_test_result_pass(\"No unexpected huge page allocations\\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+\t{\n+\t\tpid_t pid;\n+\t\tint pipe_fds[2];\n+\t\tunsigned long nr_reserved = 0;\n+\n+\t\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\t\tif (nr_reserved != 1)\n+\t\t\tksft_exit_fail_msg(\"Unexpected number of reserved pages: %lu, expected 1\\n\",\n+\t\t\t\t\t nr_reserved);\n+\n+\t\t/* Force the fault to ensure the reservation is consumed */\n+\t\t*huge_ptr = 0;\n+\t\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\t\tif (nr_reserved != 0)\n+\t\t\tksft_exit_fail_msg(\"Unexpected number of reserved pages: %lu, expected 0\\n\",\n+\t\t\t\t\t nr_reserved);\n+\n+\t\tif (pipe(pipe_fds) != 0)\n+\t\t\tksft_exit_fail_msg(\"pipe failed\");\n+\n+\t\tpid = fork();\n+\t\tif (pid \u003c 0)\n+\t\t\tksft_exit_fail_msg(\"fork failed\");\n+\n+\t\tif (pid == 0) {\n+\t\t\t/* Child: Simply wait for the parent */\n+\t\t\tchar b;\n+\n+\t\t\tclose(pipe_fds[1]);\n+\t\t\tif (read(pipe_fds[0], \u0026b, 1) \u003c 0)\n+\t\t\t\tksft_exit_fail_msg(\"child read failed\");\n+\t\t\treturn 0;\n+\t\t}\n+\n+\t\t/* Parent */\n+\t\tclose(pipe_fds[0]);\n+\n+\t\t/* First unmap, this will close the vma */\n+\t\tif (munmap(huge_ptr, mmap_size) != 0) {\n+\t\t\tkill(pid, SIGKILL);\n+\t\t\tksft_exit_fail_msg(\"munmap failed\");\n+\t\t}\n+\n+\t\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\t\tif (nr_reserved == ULONG_MAX) {\n+\t\t\tksft_test_result_fail(\"After the munmap, HugePages_Rsvd underflowed!\\n\");\n+\t\t} else if (nr_reserved == 0) {\n+\t\t\tksft_test_result_pass(\"Underflow not present!\\n\");\n+\t\t} else {\n+\t\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\t nr_reserved);\n+\t\t}\n+\t\t/* Make the child exit, this should restore HugePages_Rsvd to 0 */\n+\t\tif (write(pipe_fds[1], \u0026nr_reserved, 1) \u003c 0) {\n+\t\t\tkill(pid, SIGKILL);\n+\t\t\tksft_exit_fail_msg(\"write failed\");\n+\t\t}\n+\t\tclose(pipe_fds[1]);\n+\t\tif (waitpid(pid, NULL, 0) \u003c= 0)\n+\t\t\tksft_exit_fail_msg(\"write failed\");\n+\n+\t\tnr_reserved = hugetlb_nr_resv_pages(default_huge_page_size());\n+\t\tif (nr_reserved == 0) {\n+\t\t\tksft_test_result_pass(\"After the child dies, HugePages_Rsvd is properly set to 0\\n\");\n+\t\t} else {\n+\t\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\t nr_reserved);\n+\t\t}\n+\t}\n \tksft_finished();\n }\n"
} |
| 2/1 | 2026/08/27 18:33 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies selftests and does not make any functional changes to the kernel.",
"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 ae76f2f6259ec53455b094226f08297e67fb8baf
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Aug 27 18:33: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..6aa42f064279d 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"
@@ -86,7 +93,7 @@ int main(void)
int max = 10;
ksft_print_header();
- ksft_set_plan(1);
+ 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",
@@ -120,5 +127,80 @@ int main(void)
}
ksft_test_result_pass("No unexpected huge page allocations\n");
+ 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");
+
+ {
+ pid_t pid;
+ int pipe_fds[2];
+ unsigned long nr_reserved = 0;
+
+ 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 0;
+ }
+
+ /* 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);
+ }
+ }
ksft_finished();
}
|
| 3/2 | 2026/08/27 18:33 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 3761 output: 49 thoughts: 274 Thoughts: **My Assessment of the Patch's Impact** Okay, so I've got this patch here that's touching three files within the selftests directory: `hugepage_settings.c`, `hugepage_settings.h`, and `hugetlb_madv_vs_map.c`. From a quick glance, it looks like they are adding a new function, `hugetlb_nr_resv_pages`, to read the reserved hugepage count from sysfs. And there's a new test case within `hugetlb_madv_vs_map.c` designed to prevent an underflow situation with reserved counts during a parent/child process interaction involving unmapping pages. The important thing is this: based on the files touched and the descriptions provided, it's clear this is *solely* about improving the selftests themselves. It's not altering core kernel logic, nor is it touching drivers or any architecture-specific code. This isn't a functional change that requires fuzzing. We're talking about enhancements to our test suite, which is great, but irrelevant as far as changes that would justify fuzzing. Let me just double-check the diff to be absolutely certain...Yep, it's all within the `tools/testing/selftests/mm/*` directory. No kernel code is being modified. Therefore, I'm going to set `WorthFuzzing` to `false`. My reasoning will be concise but accurate: "The patch only modifies selftests and does not make any functional changes to the kernel." That should be clear and to the point. |
| 4/2 | 2026/08/27 18:33 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch only modifies selftests and does not make any functional changes to the kernel.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies selftests and does not make any functional changes to the kernel.",
"WorthFuzzing": false
} |
| 5/1 | 2026/08/27 18:33 | 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) |
|---|