| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/08 17:18 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any functional changes to the kernel code.",
"WorthFuzzing": false
} |
| 1/1 | 2026/07/08 17:18 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 9bfe25fefb0fbc98f05c4614543041bfbb06b491\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Jul 8 17:18:00 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 2eab2110ac6a46..d7917dce3abac7 100644\n--- a/tools/testing/selftests/mm/hugepage_settings.c\n+++ b/tools/testing/selftests/mm/hugepage_settings.c\n@@ -437,7 +437,7 @@ void hugetlb_set_nr_pages(unsigned long size, unsigned long nr)\n \n \thugetlb_sysfs_path(path, sizeof(path), size, \"nr_hugepages\");\n \n-\twrite_num(path, nr);\n+\twrite_num_ignore_einval(path, nr);\n }\n \n unsigned long hugetlb_free_pages(unsigned long size)\ndiff --git a/tools/testing/selftests/mm/ksm_tests.c b/tools/testing/selftests/mm/ksm_tests.c\nindex a050f4840cfa3a..5fd7792a0d4794 100644\n--- a/tools/testing/selftests/mm/ksm_tests.c\n+++ b/tools/testing/selftests/mm/ksm_tests.c\n@@ -288,8 +288,8 @@ static bool assert_ksm_pages_count(long dupl_page_count)\n static int ksm_save_def(struct ksm_sysfs *ksm_sysfs)\n {\n \tif (ksm_read_sysfs(KSM_FP(\"max_page_sharing\"), \u0026ksm_sysfs-\u003emax_page_sharing) ||\n-\t numa_available() ? 0 :\n-\t\tksm_read_sysfs(KSM_FP(\"merge_across_nodes\"), \u0026ksm_sysfs-\u003emerge_across_nodes) ||\n+\t (numa_available() ? 0 :\n+\t\tksm_read_sysfs(KSM_FP(\"merge_across_nodes\"), \u0026ksm_sysfs-\u003emerge_across_nodes)) ||\n \t ksm_read_sysfs(KSM_FP(\"sleep_millisecs\"), \u0026ksm_sysfs-\u003esleep_millisecs) ||\n \t ksm_read_sysfs(KSM_FP(\"pages_to_scan\"), \u0026ksm_sysfs-\u003epages_to_scan) ||\n \t ksm_read_sysfs(KSM_FP(\"run\"), \u0026ksm_sysfs-\u003erun) ||\n@@ -304,8 +304,8 @@ static int ksm_save_def(struct ksm_sysfs *ksm_sysfs)\n static int ksm_restore(struct ksm_sysfs *ksm_sysfs)\n {\n \tif (ksm_write_sysfs(KSM_FP(\"max_page_sharing\"), ksm_sysfs-\u003emax_page_sharing) ||\n-\t numa_available() ? 0 :\n-\t\tksm_write_sysfs(KSM_FP(\"merge_across_nodes\"), ksm_sysfs-\u003emerge_across_nodes) ||\n+\t (numa_available() ? 0 :\n+\t\tksm_write_sysfs(KSM_FP(\"merge_across_nodes\"), ksm_sysfs-\u003emerge_across_nodes)) ||\n \t ksm_write_sysfs(KSM_FP(\"pages_to_scan\"), ksm_sysfs-\u003epages_to_scan) ||\n \t ksm_write_sysfs(KSM_FP(\"run\"), ksm_sysfs-\u003erun) ||\n \t ksm_write_sysfs(KSM_FP(\"sleep_millisecs\"), ksm_sysfs-\u003esleep_millisecs) ||\n@@ -440,9 +440,9 @@ static int get_next_mem_node(int node)\n \t\tmem_node = i % (max_node + 1);\n \t\tnode_size = numa_node_size(mem_node, NULL);\n \t\tif (node_size \u003e 0)\n-\t\t\tbreak;\n+\t\t\treturn mem_node;\n \t}\n-\treturn mem_node;\n+\treturn -ENODEV;\n }\n \n static int get_first_mem_node(void)\n@@ -455,8 +455,8 @@ static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeo\n {\n \tvoid *numa1_map_ptr, *numa2_map_ptr;\n \tstruct timespec start_time;\n+\tint first_node, second_node;\n \tint page_count = 2;\n-\tint first_node;\n \n \tif (clock_gettime(CLOCK_MONOTONIC_RAW, \u0026start_time)) {\n \t\tksft_perror(\"clock_gettime\");\n@@ -467,17 +467,19 @@ static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeo\n \t\tksft_print_msg(\"NUMA support not enabled\\n\");\n \t\treturn KSFT_SKIP;\n \t}\n-\tif (numa_num_configured_nodes() \u003c= 1) {\n-\t\tksft_print_msg(\"At least 2 NUMA nodes must be available\\n\");\n+\tfirst_node = get_first_mem_node();\n+\tsecond_node = get_next_mem_node(first_node);\n+\n+\tif (second_node \u003c 0) {\n+\t\tksft_print_msg(\"At least 2 NUMA nodes with memory must be available\\n\");\n \t\treturn KSFT_SKIP;\n \t}\n \tif (ksm_write_sysfs(KSM_FP(\"merge_across_nodes\"), merge_across_nodes))\n \t\treturn KSFT_FAIL;\n \n \t/* allocate 2 pages in 2 different NUMA nodes and fill them with the same data */\n-\tfirst_node = get_first_mem_node();\n \tnuma1_map_ptr = numa_alloc_onnode(page_size, first_node);\n-\tnuma2_map_ptr = numa_alloc_onnode(page_size, get_next_mem_node(first_node));\n+\tnuma2_map_ptr = numa_alloc_onnode(page_size, second_node);\n \tif (!numa1_map_ptr || !numa2_map_ptr) {\n \t\tksft_perror(\"numa_alloc_onnode\");\n \t\treturn KSFT_FAIL;\n@@ -844,8 +846,8 @@ int main(int argc, char *argv[])\n \n \tif (ksm_write_sysfs(KSM_FP(\"run\"), 2) ||\n \t ksm_write_sysfs(KSM_FP(\"sleep_millisecs\"), 0) ||\n-\t numa_available() ? 0 :\n-\t\tksm_write_sysfs(KSM_FP(\"merge_across_nodes\"), 1) ||\n+\t (numa_available() ? 0 :\n+\t\tksm_write_sysfs(KSM_FP(\"merge_across_nodes\"), 1)) ||\n \t ksm_write_sysfs(KSM_FP(\"pages_to_scan\"), page_count))\n \t\tksft_exit_fail_msg(\"Cannot set up KSM tunables\\n\");\n \ndiff --git a/tools/testing/selftests/mm/vm_util.c b/tools/testing/selftests/mm/vm_util.c\nindex 311fc5b4513eb4..ef1ea11981a740 100644\n--- a/tools/testing/selftests/mm/vm_util.c\n+++ b/tools/testing/selftests/mm/vm_util.c\n@@ -719,7 +719,7 @@ int read_file(const char *path, char *buf, size_t buflen)\n \treturn (unsigned int) numread;\n }\n \n-void write_file(const char *path, const char *buf, size_t buflen)\n+static void __write_file(const char *path, const char *buf, size_t buflen, bool ignore_einval)\n {\n \tint fd, saved_errno;\n \tssize_t numwritten;\n@@ -735,14 +735,22 @@ void write_file(const char *path, const char *buf, size_t buflen)\n \tsaved_errno = errno;\n \tclose(fd);\n \terrno = saved_errno;\n-\tif (numwritten \u003c 0)\n+\tif (numwritten \u003c 0) {\n+\t\tif (ignore_einval \u0026\u0026 errno == EINVAL)\n+\t\t\treturn;\n \t\tksft_exit_fail_msg(\"%s write(%.*s) failed: %s\\n\", path, (int)(buflen - 1),\n \t\t\t\tbuf, strerror(errno));\n+\t}\n \tif (numwritten != buflen - 1)\n \t\tksft_exit_fail_msg(\"%s write(%.*s) is truncated, expected %zu bytes, got %zd bytes\\n\",\n \t\t\t\tpath, (int)(buflen - 1), buf, buflen - 1, numwritten);\n }\n \n+void write_file(const char *path, const char *buf, size_t buflen)\n+{\n+\t__write_file(path, buf, buflen, /* ignore_einval = */ false);\n+}\n+\n unsigned long read_num(const char *path)\n {\n \tchar buf[21];\n@@ -753,12 +761,22 @@ unsigned long read_num(const char *path)\n \treturn strtoul(buf, NULL, 10);\n }\n \n-void write_num(const char *path, unsigned long num)\n+static void __write_num(const char *path, unsigned long num, bool ignore_einval)\n {\n \tchar buf[21];\n \n \tsprintf(buf, \"%lu\", num);\n-\twrite_file(path, buf, strlen(buf) + 1);\n+\t__write_file(path, buf, strlen(buf) + 1, ignore_einval);\n+}\n+\n+void write_num(const char *path, unsigned long num)\n+{\n+\treturn __write_num(path, num, /* ignore_einval = */ false);\n+}\n+\n+void write_num_ignore_einval(const char *path, unsigned long num)\n+{\n+\treturn __write_num(path, num, /* ignore_einval = */ true);\n }\n \n static unsigned long shmall, shmmax;\ndiff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h\nindex ea8fc8fdf0eb0b..7799154b67eed0 100644\n--- a/tools/testing/selftests/mm/vm_util.h\n+++ b/tools/testing/selftests/mm/vm_util.h\n@@ -168,6 +168,7 @@ void write_file(const char *path, const char *buf, size_t buflen);\n int read_file(const char *path, char *buf, size_t buflen);\n unsigned long read_num(const char *path);\n void write_num(const char *path, unsigned long num);\n+void write_num_ignore_einval(const char *path, unsigned long num);\n \n void shm_limits_prepare(unsigned long length);\n void __shm_limits_restore(void);\n"
} |
| 2/1 | 2026/07/08 17:18 | agent | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any functional changes to the kernel 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). 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. 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. Do not list too generic configs (we already have them enabled). Only list those that specifically cover the modified code. 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 9bfe25fefb0fbc98f05c4614543041bfbb06b491
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Jul 8 17:18:00 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 2eab2110ac6a46..d7917dce3abac7 100644
--- a/tools/testing/selftests/mm/hugepage_settings.c
+++ b/tools/testing/selftests/mm/hugepage_settings.c
@@ -437,7 +437,7 @@ void hugetlb_set_nr_pages(unsigned long size, unsigned long nr)
hugetlb_sysfs_path(path, sizeof(path), size, "nr_hugepages");
- write_num(path, nr);
+ write_num_ignore_einval(path, nr);
}
unsigned long hugetlb_free_pages(unsigned long size)
diff --git a/tools/testing/selftests/mm/ksm_tests.c b/tools/testing/selftests/mm/ksm_tests.c
index a050f4840cfa3a..5fd7792a0d4794 100644
--- a/tools/testing/selftests/mm/ksm_tests.c
+++ b/tools/testing/selftests/mm/ksm_tests.c
@@ -288,8 +288,8 @@ static bool assert_ksm_pages_count(long dupl_page_count)
static int ksm_save_def(struct ksm_sysfs *ksm_sysfs)
{
if (ksm_read_sysfs(KSM_FP("max_page_sharing"), &ksm_sysfs->max_page_sharing) ||
- numa_available() ? 0 :
- ksm_read_sysfs(KSM_FP("merge_across_nodes"), &ksm_sysfs->merge_across_nodes) ||
+ (numa_available() ? 0 :
+ ksm_read_sysfs(KSM_FP("merge_across_nodes"), &ksm_sysfs->merge_across_nodes)) ||
ksm_read_sysfs(KSM_FP("sleep_millisecs"), &ksm_sysfs->sleep_millisecs) ||
ksm_read_sysfs(KSM_FP("pages_to_scan"), &ksm_sysfs->pages_to_scan) ||
ksm_read_sysfs(KSM_FP("run"), &ksm_sysfs->run) ||
@@ -304,8 +304,8 @@ static int ksm_save_def(struct ksm_sysfs *ksm_sysfs)
static int ksm_restore(struct ksm_sysfs *ksm_sysfs)
{
if (ksm_write_sysfs(KSM_FP("max_page_sharing"), ksm_sysfs->max_page_sharing) ||
- numa_available() ? 0 :
- ksm_write_sysfs(KSM_FP("merge_across_nodes"), ksm_sysfs->merge_across_nodes) ||
+ (numa_available() ? 0 :
+ ksm_write_sysfs(KSM_FP("merge_across_nodes"), ksm_sysfs->merge_across_nodes)) ||
ksm_write_sysfs(KSM_FP("pages_to_scan"), ksm_sysfs->pages_to_scan) ||
ksm_write_sysfs(KSM_FP("run"), ksm_sysfs->run) ||
ksm_write_sysfs(KSM_FP("sleep_millisecs"), ksm_sysfs->sleep_millisecs) ||
@@ -440,9 +440,9 @@ static int get_next_mem_node(int node)
mem_node = i % (max_node + 1);
node_size = numa_node_size(mem_node, NULL);
if (node_size > 0)
- break;
+ return mem_node;
}
- return mem_node;
+ return -ENODEV;
}
static int get_first_mem_node(void)
@@ -455,8 +455,8 @@ static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeo
{
void *numa1_map_ptr, *numa2_map_ptr;
struct timespec start_time;
+ int first_node, second_node;
int page_count = 2;
- int first_node;
if (clock_gettime(CLOCK_MONOTONIC_RAW, &start_time)) {
ksft_perror("clock_gettime");
@@ -467,17 +467,19 @@ static int check_ksm_numa_merge(int merge_type, int mapping, int prot, int timeo
ksft_print_msg("NUMA support not enabled\n");
return KSFT_SKIP;
}
- if (numa_num_configured_nodes() <= 1) {
- ksft_print_msg("At least 2 NUMA nodes must be available\n");
+ first_node = get_first_mem_node();
+ second_node = get_next_mem_node(first_node);
+
+ if (second_node < 0) {
+ ksft_print_msg("At least 2 NUMA nodes with memory must be available\n");
return KSFT_SKIP;
}
if (ksm_write_sysfs(KSM_FP("merge_across_nodes"), merge_across_nodes))
return KSFT_FAIL;
/* allocate 2 pages in 2 different NUMA nodes and fill them with the same data */
- first_node = get_first_mem_node();
numa1_map_ptr = numa_alloc_onnode(page_size, first_node);
- numa2_map_ptr = numa_alloc_onnode(page_size, get_next_mem_node(first_node));
+ numa2_map_ptr = numa_alloc_onnode(page_size, second_node);
if (!numa1_map_ptr || !numa2_map_ptr) {
ksft_perror("numa_alloc_onnode");
return KSFT_FAIL;
@@ -844,8 +846,8 @@ int main(int argc, char *argv[])
if (ksm_write_sysfs(KSM_FP("run"), 2) ||
ksm_write_sysfs(KSM_FP("sleep_millisecs"), 0) ||
- numa_available() ? 0 :
- ksm_write_sysfs(KSM_FP("merge_across_nodes"), 1) ||
+ (numa_available() ? 0 :
+ ksm_write_sysfs(KSM_FP("merge_across_nodes"), 1)) ||
ksm_write_sysfs(KSM_FP("pages_to_scan"), page_count))
ksft_exit_fail_msg("Cannot set up KSM tunables\n");
diff --git a/tools/testing/selftests/mm/vm_util.c b/tools/testing/selftests/mm/vm_util.c
index 311fc5b4513eb4..ef1ea11981a740 100644
--- a/tools/testing/selftests/mm/vm_util.c
+++ b/tools/testing/selftests/mm/vm_util.c
@@ -719,7 +719,7 @@ int read_file(const char *path, char *buf, size_t buflen)
return (unsigned int) numread;
}
-void write_file(const char *path, const char *buf, size_t buflen)
+static void __write_file(const char *path, const char *buf, size_t buflen, bool ignore_einval)
{
int fd, saved_errno;
ssize_t numwritten;
@@ -735,14 +735,22 @@ void write_file(const char *path, const char *buf, size_t buflen)
saved_errno = errno;
close(fd);
errno = saved_errno;
- if (numwritten < 0)
+ if (numwritten < 0) {
+ if (ignore_einval && errno == EINVAL)
+ return;
ksft_exit_fail_msg("%s write(%.*s) failed: %s\n", path, (int)(buflen - 1),
buf, strerror(errno));
+ }
if (numwritten != buflen - 1)
ksft_exit_fail_msg("%s write(%.*s) is truncated, expected %zu bytes, got %zd bytes\n",
path, (int)(buflen - 1), buf, buflen - 1, numwritten);
}
+void write_file(const char *path, const char *buf, size_t buflen)
+{
+ __write_file(path, buf, buflen, /* ignore_einval = */ false);
+}
+
unsigned long read_num(const char *path)
{
char buf[21];
@@ -753,12 +761,22 @@ unsigned long read_num(const char *path)
return strtoul(buf, NULL, 10);
}
-void write_num(const char *path, unsigned long num)
+static void __write_num(const char *path, unsigned long num, bool ignore_einval)
{
char buf[21];
sprintf(buf, "%lu", num);
- write_file(path, buf, strlen(buf) + 1);
+ __write_file(path, buf, strlen(buf) + 1, ignore_einval);
+}
+
+void write_num(const char *path, unsigned long num)
+{
+ return __write_num(path, num, /* ignore_einval = */ false);
+}
+
+void write_num_ignore_einval(const char *path, unsigned long num)
+{
+ return __write_num(path, num, /* ignore_einval = */ true);
}
static unsigned long shmall, shmmax;
diff --git a/tools/testing/selftests/mm/vm_util.h b/tools/testing/selftests/mm/vm_util.h
index ea8fc8fdf0eb0b..7799154b67eed0 100644
--- a/tools/testing/selftests/mm/vm_util.h
+++ b/tools/testing/selftests/mm/vm_util.h
@@ -168,6 +168,7 @@ void write_file(const char *path, const char *buf, size_t buflen);
int read_file(const char *path, char *buf, size_t buflen);
unsigned long read_num(const char *path);
void write_num(const char *path, unsigned long num);
+void write_num_ignore_einval(const char *path, unsigned long num);
void shm_limits_prepare(unsigned long length);
void __shm_limits_restore(void);
|
| 3/2 | 2026/07/08 17:18 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 4510 output: 63 thoughts: 442 Thoughts: **Patch Analysis: WorthFuzzing Evaluation** Okay, so I've got this patch here, and it's touching files within `tools/testing/selftests/mm/`. I immediately recognize these as userspace test programs, selftests, essentially. My initial reaction, given the context, is that this *shouldn't* be worth fuzzing, but I need to be sure. The instructions, while not explicitly naming `tools/testing/selftests/`, outline specific scenarios where we should return `WorthFuzzing=false`. These include documentation changes, Kconfig edits, code comments, cosmetic logging changes, tweaks to numeric constants (that don't affect execution), and modifications to unreachable code paths in virtualized environments. From my understanding of kernel fuzzing, the goal is to find bugs within the kernel itself, not in the userspace tools that are testing it. Therefore, changes limited to these test programs are unlikely to introduce vulnerabilities within the *kernel*. These selftests are not going to functionally change the kernel's execution. I need to confirm though. Let's make absolutely sure this patch is *only* within those test files. I'm going to quickly scan the diff again to be 100% certain. Alright, the diff confirms it. The changes are exclusively within that `tools/testing/selftests/mm/` directory. Therefore, my conclusion is that `WorthFuzzing` should definitely be `false`. The reasoning is straightforward: this patch only modifies userspace selftests within the `tools/testing/selftests/mm/` directory and it makes no functional changes to the kernel's core code. So, let's go ahead and set the results accordingly. I'll call `set-results` with `WorthFuzzing=false`. |
| 4/2 | 2026/07/08 17:18 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any functional changes to the kernel code.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch only modifies userspace selftests in tools/testing/selftests/mm/ and does not make any functional changes to the kernel code.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|