| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/03 14:08 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"SUNRPC",
"NFSD"
],
"FocusSymbols": [
"svc_addsock",
"__write_ports_addfd"
],
"KMSANReasoning": "The patch adds a validation check in svc_addsock() to ensure so-\u003esk-\u003esk_user_data is NULL before proceeding with svc_setup_socket(), returning -EBUSY if it is already in use. This prevents overwriting sk_user_data and socket callbacks when a socket is already owned, preventing type confusion and use-after-free conditions. The patch does not introduce or modify any uninitialized memory reads, padding/struct copies to userspace, or uninitialized memory logic. Any memory bugs in this path are use-after-free or state corruption issues caught by KASAN, so dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false,
"Reasoning": "The patch adds a validation check in `svc_addsock()` to prevent sockets with existing `sk_user_data` from being registered as RPC service listener sockets. This modifies reachable networking/RPC server code accessible from userspace via the NFSD control interface (writing an FD to /proc/fs/nfsd/portlist).",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/03 14:08 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 0bd3dcbaf408516c01a0c6200f15b4457b7cad92\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Thu Sep 3 14:08:45 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c\nindex 50e5e7f5b762d..e8cc4329f1282 100644\n--- a/net/sunrpc/svcsock.c\n+++ b/net/sunrpc/svcsock.c\n@@ -1541,6 +1541,9 @@ int svc_addsock(struct svc_serv *serv, struct net *net, const int fd,\n \terr = -EISCONN;\n \tif (so-\u003estate \u003e SS_UNCONNECTED)\n \t\tgoto out;\n+\terr = -EBUSY;\n+\tif (so-\u003esk-\u003esk_user_data)\n+\t\tgoto out;\n \terr = -ENOENT;\n \tif (!try_module_get(THIS_MODULE))\n \t\tgoto out;\n"
} |
| 2/1 | 2026/09/03 14:08 | agent | patch-evaluator |
0mModel:core Args: null Results: {
"EnableConfigs": [
"SUNRPC",
"NFSD"
],
"FocusSymbols": [
"svc_addsock",
"__write_ports_addfd"
],
"Reasoning": "The patch adds a validation check in `svc_addsock()` to prevent sockets with existing `sk_user_data` from being registered as RPC service listener sockets. This modifies reachable networking/RPC server code accessible from userspace via the NFSD control interface (writing an FD to /proc/fs/nfsd/portlist).",
"WorthFuzzing": true
}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 0bd3dcbaf408516c01a0c6200f15b4457b7cad92
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Sep 3 14:08:45 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 50e5e7f5b762d..e8cc4329f1282 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1541,6 +1541,9 @@ int svc_addsock(struct svc_serv *serv, struct net *net, const int fd,
err = -EISCONN;
if (so->state > SS_UNCONNECTED)
goto out;
+ err = -EBUSY;
+ if (so->sk->sk_user_data)
+ goto out;
err = -ENOENT;
if (!try_module_get(THIS_MODULE))
goto out;
|
| 3/2 | 2026/09/03 14:08 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2881 output: 39 thoughts: 204 Thoughts: **Analyzing the `svc_addsock` Patch** Okay, let's dive into this diff targeting `net/sunrpc/svcsock.c`. Seems like a straightforward change to `svc_addsock`. I need to understand why this was introduced. The core of it seems to be adding a check: `if (so->sk->sk_user_data) goto out;` right after the existing `so->state` and right before the `try_module_get` call. That's interesting; it's short-circuiting the add operation if `sk_user_data` is set. The previous checks covered connection state and module availability, this is new, and clearly related to resource contention or perhaps preventing double-registration. My initial thought is that this is intended to prevent a socket from being added to the service if it's already associated with some other context. We know that `sk_user_data` is often used to hold private data specific to a socket, so a non-null `sk_user_data` likely indicates the socket is already 'in use'. Makes sense. Preventing this could be related to avoiding race conditions, resource leaks, or preventing double accounting of resources. I need to confirm this assumption. To understand the full implications, I'm going to need to look at the surrounding code in `svc_addsock` and what calls it. I'll fire up my trusty `read-file` or `grepper` and see what else is going on in that area, and where `svc_addsock` gets called from. That should give me the necessary context. |
| 4/2 | 2026/09/03 14:08 | tool | read-file |
0mArgs:{
"File": "net/sunrpc/svcsock.c",
"FirstLine": 1520,
"LineCount": 50
}Results: {
"Contents": "1520:\t\t\tchar *name_return, const size_t len, const struct cred *cred)\n1521:\t{\n1522:\t\tint err = 0;\n1523:\t\tstruct socket *so = sockfd_lookup(fd, \u0026err);\n1524:\t\tstruct svc_sock *svsk = NULL;\n1525:\t\tstruct sockaddr_storage addr;\n1526:\t\tstruct sockaddr *sin = (struct sockaddr *)\u0026addr;\n1527:\t\tint salen;\n1528:\t\n1529:\t\tif (!so)\n1530:\t\t\treturn err;\n1531:\t\terr = -EINVAL;\n1532:\t\tif (sock_net(so-\u003esk) != net)\n1533:\t\t\tgoto out;\n1534:\t\terr = -EAFNOSUPPORT;\n1535:\t\tif ((so-\u003esk-\u003esk_family != PF_INET) \u0026\u0026 (so-\u003esk-\u003esk_family != PF_INET6))\n1536:\t\t\tgoto out;\n1537:\t\terr = -EPROTONOSUPPORT;\n1538:\t\tif (so-\u003esk-\u003esk_protocol != IPPROTO_TCP \u0026\u0026\n1539:\t\t so-\u003esk-\u003esk_protocol != IPPROTO_UDP)\n1540:\t\t\tgoto out;\n1541:\t\terr = -EISCONN;\n1542:\t\tif (so-\u003estate \u003e SS_UNCONNECTED)\n1543:\t\t\tgoto out;\n1544:\t\terr = -EBUSY;\n1545:\t\tif (so-\u003esk-\u003esk_user_data)\n1546:\t\t\tgoto out;\n1547:\t\terr = -ENOENT;\n1548:\t\tif (!try_module_get(THIS_MODULE))\n1549:\t\t\tgoto out;\n1550:\t\tsvsk = svc_setup_socket(serv, so, SVC_SOCK_DEFAULTS);\n1551:\t\tif (IS_ERR(svsk)) {\n1552:\t\t\tmodule_put(THIS_MODULE);\n1553:\t\t\terr = PTR_ERR(svsk);\n1554:\t\t\tgoto out;\n1555:\t\t}\n1556:\t\tsalen = kernel_getsockname(svsk-\u003esk_sock, sin);\n1557:\t\tif (salen \u003e= 0)\n1558:\t\t\tsvc_xprt_set_local(\u0026svsk-\u003esk_xprt, sin, salen);\n1559:\t\tsvsk-\u003esk_xprt.xpt_cred = get_cred(cred);\n1560:\t\tsvc_add_new_perm_xprt(serv, \u0026svsk-\u003esk_xprt);\n1561:\t\treturn svc_one_sock_name(svsk, name_return, len);\n1562:\tout:\n1563:\t\tsockfd_put(so);\n1564:\t\treturn err;\n1565:\t}\n1566:\tEXPORT_SYMBOL_GPL(svc_addsock);\n1567:\t\n1568:\t/*\n1569:\t * Create socket for RPC service.\n"
} |
| 5/2 | 2026/09/03 14:08 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4268 output: 18 thoughts: 28 Thoughts: Here's my take on those thoughts: **Analyzing `svc_addsock` Usage** Alright, time to get down to brass tacks. I need to understand the call graph for `svc_addsock`. I'll use `grep` to quickly identify all the points where that function is invoked within the codebase. This is standard operating procedure for digging into the dependencies of a specific piece of functionality. Knowing where it's called from will be the first step to figuring out its role and any potential impact of modifying it, or for debugging. |
| 6/2 | 2026/09/03 14:08 | tool | grepper |
0mArgs:{
"Expression": "svc_addsock"
}Results: {
"Output": "fs/nfsd/nfsctl.c=732=static ssize_t __write_ports_addfd(char *buf, struct net *net, const struct cred *cred)\n--\nfs/nfsd/nfsctl.c-748-\tserv = nn-\u003enfsd_serv;\nfs/nfsd/nfsctl.c:749:\terr = svc_addsock(serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);\nfs/nfsd/nfsctl.c-750-\n--\ninclude/linux/sunrpc/svcsock.h=65=void\t\tsvc_send(struct svc_rqst *rqstp);\ninclude/linux/sunrpc/svcsock.h:66:int\t\tsvc_addsock(struct svc_serv *serv, struct net *net,\ninclude/linux/sunrpc/svcsock.h-67-\t\t\t const int fd, char *name_return, const size_t len,\n--\nnet/sunrpc/svcsock.c=1439=static struct svc_sock *svc_setup_socket(struct svc_serv *serv,\n--\nnet/sunrpc/svcsock.c-1506-/**\nnet/sunrpc/svcsock.c:1507: * svc_addsock - add a listener socket to an RPC service\nnet/sunrpc/svcsock.c-1508- * @serv: pointer to RPC service to which to add a new listener\n--\nnet/sunrpc/svcsock.c-1518- */\nnet/sunrpc/svcsock.c:1519:int svc_addsock(struct svc_serv *serv, struct net *net, const int fd,\nnet/sunrpc/svcsock.c-1520-\t\tchar *name_return, const size_t len, const struct cred *cred)\n--\nnet/sunrpc/svcsock.c-1565-}\nnet/sunrpc/svcsock.c:1566:EXPORT_SYMBOL_GPL(svc_addsock);\nnet/sunrpc/svcsock.c-1567-\n"
} |
| 7/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4960 output: 39 thoughts: 75 Thoughts: Here's my summary, as though I'm thinking through this process: **Investigating `svc_addsock` Usage** Okay, so `svc_addsock` is exported, and it looks like `fs/nfsd/nfsctl.c` is using it. I need to figure out exactly *how*. The clue is this interaction with `/proc/fs/nfsd/portlist` or something analogous within the `sysfs/nfsctl` interface. Right, so that points me directly to that `nfsctl.c` file. Time to dig in... I'll jump right to line 732, see what's happening around there. This is likely where the relevant `nfsctl` logic or the portlist interaction occurs. I'm expecting to see calls to `svc_addsock` based on that context. Let's see what the code reveals. |
| 8/2 | 2026/09/03 14:09 | tool | read-file |
0mArgs:{
"File": "fs/nfsd/nfsctl.c",
"FirstLine": 725,
"LineCount": 40
}Results: {
"Contents": " 725:\t}\n 726:\t\n 727:\t/*\n 728:\t * A single 'fd' number was written, in which case it must be for\n 729:\t * a socket of a supported family/protocol, and we use it as an\n 730:\t * nfsd listener.\n 731:\t */\n 732:\tstatic ssize_t __write_ports_addfd(char *buf, struct net *net, const struct cred *cred)\n 733:\t{\n 734:\t\tchar *mesg = buf;\n 735:\t\tint fd, err;\n 736:\t\tstruct nfsd_net *nn = net_generic(net, nfsd_net_id);\n 737:\t\tstruct svc_serv *serv;\n 738:\t\n 739:\t\terr = get_int(\u0026mesg, \u0026fd);\n 740:\t\tif (err != 0 || fd \u003c 0)\n 741:\t\t\treturn -EINVAL;\n 742:\t\ttrace_nfsd_ctl_ports_addfd(net, fd);\n 743:\t\n 744:\t\terr = nfsd_create_serv(net);\n 745:\t\tif (err != 0)\n 746:\t\t\treturn err;\n 747:\t\n 748:\t\tserv = nn-\u003enfsd_serv;\n 749:\t\terr = svc_addsock(serv, net, fd, buf, SIMPLE_TRANSACTION_LIMIT, cred);\n 750:\t\n 751:\t\tif (!serv-\u003esv_nrthreads \u0026\u0026 list_empty(\u0026nn-\u003enfsd_serv-\u003esv_permsocks))\n 752:\t\t\tnfsd_destroy_serv(net);\n 753:\t\n 754:\t\treturn err;\n 755:\t}\n 756:\t\n 757:\t/*\n 758:\t * A transport listener is added by writing its transport name and\n 759:\t * a port number.\n 760:\t */\n 761:\tstatic ssize_t __write_ports_addxprt(char *buf, struct net *net, const struct cred *cred)\n 762:\t{\n 763:\t\tchar transport[16];\n 764:\t\tstruct svc_xprt *xprt;\n"
} |
| 9/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5882 output: 32 thoughts: 20 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Tracing the User-Space Entry Point for `__write_ports_addfd`** Okay, so I need to figure out how `__write_ports_addfd` is being invoked from user space. Let's dig in. I'm assuming, given the name, it's involved in some kind of file descriptor management, likely related to writing. The `__` prefix usually indicates an internal kernel function, so it won't be called directly. It's likely a lower-level helper for a more user-facing system call. My immediate plan is to use a combination of techniques. I'll start with source code analysis, grepping for calls to this function, keeping an eye out for how it might be linked to other functions and potentially trace it with a debugger to check that what I thought was happening, is happening. I need to understand the data flow, the arguments passed, and what context triggers its execution. I know I have to consider different system calls that could handle the function as a helper. I'll keep a sharp eye out for likely suspects like `epoll_ctl` (given its FD management nature) or even custom drivers if we're dealing with something specific to hardware or a non-standard device. I know that looking at the function calls through the kernel source is the best place to start. I'll need to look at all possible entry points to see if the calls are made from there. I might even consider looking at the kernel headers, looking for structures and macros that are defined as well. I need to quickly formulate a plan that identifies system calls involved in write operations and then identify the possible internal helper functions that the operations call. From there, I'll be able to identify where it's being used and how it's being reached from userspace. |
| 10/2 | 2026/09/03 14:09 | tool | grepper |
0mArgs:{
"Expression": "__write_ports_addfd",
"PathPrefix": "fs/nfsd"
}Results: {
"Output": "fs/nfsd/nfsctl.c=718=static ssize_t __write_ports_names(char *buf, struct net *net)\n--\nfs/nfsd/nfsctl.c-731- */\nfs/nfsd/nfsctl.c:732:static ssize_t __write_ports_addfd(char *buf, struct net *net, const struct cred *cred)\nfs/nfsd/nfsctl.c-733-{\n--\nfs/nfsd/nfsctl.c=805=static ssize_t __write_ports(struct file *file, char *buf, size_t size,\n--\nfs/nfsd/nfsctl.c-811-\tif (isdigit(buf[0]))\nfs/nfsd/nfsctl.c:812:\t\treturn __write_ports_addfd(buf, net, file-\u003ef_cred);\nfs/nfsd/nfsctl.c-813-\n"
} |
| 11/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 6585 output: 27 thoughts: 54 Thoughts: **Analyzing the NFSD Portlist Handler** Okay, so I'm looking at `__write_ports`, which I see is a helper within the `write_ports` handler specifically for the `/proc/fs/nfsd/portlist` file – that NFS daemon portlist entry. My immediate instinct is to dig into the dependencies. I need to understand the underlying Kconfig requirements for NFSD and SUNRPC. I want to make sure the expected configuration options are set, or I won't understand what this code is supposed to do. A solid grasp of the Kconfig options will tell me if the NFS daemon is built and configured as I would expect, so I have a foundation to understand the `__write_ports` handler. I need to know the prerequisites. |
| 12/2 | 2026/09/03 14:09 | tool | grepper |
0mArgs:{
"Expression": "NFSD",
"PathPrefix": "fs/nfsd"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 5303 lines.\nUse more precise expression if possible.\n\nfs/nfsd/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\nfs/nfsd/Kconfig:2:config NFSD\nfs/nfsd/Kconfig-3-\ttristate \"NFS server support\"\n--\nfs/nfsd/Kconfig-7-\tselect CRC32\nfs/nfsd/Kconfig:8:\tselect CRYPTO_LIB_MD5 if NFSD_LEGACY_CLIENT_TRACKING\nfs/nfsd/Kconfig:9:\tselect CRYPTO_LIB_SHA256 if NFSD_V4\nfs/nfsd/Kconfig-10-\tselect CRYPTO # required by RPCSEC_GSS_KRB5 and signed filehandles\n--\nfs/nfsd/Kconfig-14-\tselect NFS_COMMON\nfs/nfsd/Kconfig:15:\tselect NFS_ACL_SUPPORT if NFSD_V2_ACL\nfs/nfsd/Kconfig:16:\tselect NFS_ACL_SUPPORT if NFSD_V3_ACL\nfs/nfsd/Kconfig-17-\tdepends on MULTIUSER\n--\nfs/nfsd/Kconfig-35-\t Support for NFS version 3 (RFC 1813) is always available when\nfs/nfsd/Kconfig:36:\t CONFIG_NFSD is selected.\nfs/nfsd/Kconfig-37-\n--\nfs/nfsd/Kconfig-39-\nfs/nfsd/Kconfig:40:config NFSD_V2\nfs/nfsd/Kconfig-41-\tbool \"NFS server support for NFS version 2 (DEPRECATED)\"\nfs/nfsd/Kconfig:42:\tdepends on NFSD\nfs/nfsd/Kconfig-43-\tdefault n\n--\nfs/nfsd/Kconfig-50-\nfs/nfsd/Kconfig:51:config NFSD_V2_ACL\nfs/nfsd/Kconfig-52-\tbool \"NFS server support for the NFSv2 ACL protocol extension\"\nfs/nfsd/Kconfig:53:\tdepends on NFSD_V2\nfs/nfsd/Kconfig-54-\nfs/nfsd/Kconfig:55:config NFSD_V3_ACL\nfs/nfsd/Kconfig-56-\tbool \"NFS server support for the NFSv3 ACL protocol extension\"\nfs/nfsd/Kconfig:57:\tdepends on NFSD\nfs/nfsd/Kconfig-58-\thelp\n--\nfs/nfsd/Kconfig-76-\nfs/nfsd/Kconfig:77:config NFSD_V4\nfs/nfsd/Kconfig-78-\tbool \"NFS server support for NFS version 4\"\nfs/nfsd/Kconfig:79:\tdepends on NFSD \u0026\u0026 PROC_FS\nfs/nfsd/Kconfig-80-\tselect FS_POSIX_ACL\n--\nfs/nfsd/Kconfig-93-\nfs/nfsd/Kconfig:94:config NFSD_PNFS\nfs/nfsd/Kconfig-95-\tbool\nfs/nfsd/Kconfig-96-\nfs/nfsd/Kconfig:97:config NFSD_BLOCKLAYOUT\nfs/nfsd/Kconfig-98-\tbool \"NFSv4.1 server support for pNFS block layouts\"\nfs/nfsd/Kconfig:99:\tdepends on NFSD_V4 \u0026\u0026 BLOCK\nfs/nfsd/Kconfig:100:\tselect NFSD_PNFS\nfs/nfsd/Kconfig-101-\tselect EXPORTFS_BLOCK_OPS\n--\nfs/nfsd/Kconfig-109-\nfs/nfsd/Kconfig:110:config NFSD_SCSILAYOUT\nfs/nfsd/Kconfig-111-\tbool \"NFSv4.1 server support for pNFS SCSI layouts\"\nfs/nfsd/Kconfig:112:\tdepends on NFSD_V4 \u0026\u0026 BLOCK\nfs/nfsd/Kconfig:113:\tselect NFSD_PNFS\nfs/nfsd/Kconfig-114-\tselect EXPORTFS_BLOCK_OPS\n--\nfs/nfsd/Kconfig-123-\nfs/nfsd/Kconfig:124:config NFSD_FLEXFILELAYOUT\nfs/nfsd/Kconfig-125-\tbool \"NFSv4.1 server support for pNFS Flex File layouts\"\nfs/nfsd/Kconfig:126:\tdepends on NFSD_V4\nfs/nfsd/Kconfig:127:\tselect NFSD_PNFS\nfs/nfsd/Kconfig-128-\thelp\n--\nfs/nfsd/Kconfig-140-\nfs/nfsd/Kconfig:141:config NFSD_V4_2_INTER_SSC\nfs/nfsd/Kconfig-142-\tbool \"NFSv4.2 inter server to server COPY\"\nfs/nfsd/Kconfig:143:\tdepends on NFSD_V4 \u0026\u0026 NFS_V4_2\nfs/nfsd/Kconfig-144-\thelp\n--\nfs/nfsd/Kconfig-150-\nfs/nfsd/Kconfig:151:config NFSD_V4_SECURITY_LABEL\nfs/nfsd/Kconfig-152-\tbool \"Provide Security Label support for NFSv4 server\"\nfs/nfsd/Kconfig:153:\tdepends on NFSD_V4 \u0026\u0026 SECURITY\nfs/nfsd/Kconfig-154-\thelp\n--\nfs/nfsd/Kconfig-163-\nfs/nfsd/Kconfig:164:config NFSD_LEGACY_CLIENT_TRACKING\nfs/nfsd/Kconfig-165-\tbool \"Support legacy NFSv4 client tracking methods (DEPRECATED)\"\nfs/nfsd/Kconfig:166:\tdepends on NFSD_V4\nfs/nfsd/Kconfig-167-\tdefault n\n--\nfs/nfsd/Kconfig-179-\nfs/nfsd/Kconfig:180:config NFSD_V4_POSIX_ACLS\nfs/nfsd/Kconfig-181-\tbool \"Support NFSv4 POSIX draft ACLs\"\nfs/nfsd/Kconfig:182:\tdepends on NFSD_V4\nfs/nfsd/Kconfig-183-\tdefault n\n--\nfs/nfsd/Makefile=6=ccflags-y += -I$(src)\t\t\t# needed for trace events\nfs/nfsd/Makefile-7-\nfs/nfsd/Makefile:8:obj-$(CONFIG_NFSD)\t+= nfsd.o\nfs/nfsd/Makefile-9-\n--\nfs/nfsd/Makefile=13=nfsd-y \t\t\t+= nfssvc.o nfsctl.o nfsfh.o vfs.o \\\n--\nfs/nfsd/Makefile-16-\t\t\t netlink.o\nfs/nfsd/Makefile:17:nfsd-$(CONFIG_NFSD_V2) += nfsproc.o nfsxdr.o\nfs/nfsd/Makefile:18:nfsd-$(CONFIG_NFSD_V2_ACL) += nfs2acl.o\nfs/nfsd/Makefile:19:nfsd-$(CONFIG_NFSD_V3_ACL) += nfs3acl.o\nfs/nfsd/Makefile:20:nfsd-$(CONFIG_NFSD_V4)\t+= nfs4proc.o nfs4xdr.o nfs4state.o nfs4idmap.o \\\nfs/nfsd/Makefile-21-\t\t\t nfs4acl.o nfs4callback.o nfs4recover.o nfs4xdr_gen.o\nfs/nfsd/Makefile:22:nfsd-$(CONFIG_NFSD_PNFS) += nfs4layouts.o\nfs/nfsd/Makefile:23:nfsd-$(CONFIG_NFSD_BLOCKLAYOUT) += blocklayout.o blocklayoutxdr.o\nfs/nfsd/Makefile:24:nfsd-$(CONFIG_NFSD_SCSILAYOUT) += blocklayout.o blocklayoutxdr.o\nfs/nfsd/Makefile:25:nfsd-$(CONFIG_NFSD_FLEXFILELAYOUT) += flexfilelayout.o flexfilelayoutxdr.o\nfs/nfsd/Makefile-26-nfsd-$(CONFIG_NFS_LOCALIO) += localio.o\n--\nfs/nfsd/attr4.h-5-\nfs/nfsd/attr4.h:6:#ifndef _LINUX_NFSD_ATTR4_H\nfs/nfsd/attr4.h:7:#define _LINUX_NFSD_ATTR4_H\nfs/nfsd/attr4.h-8-\n--\nfs/nfsd/attr4.h-12-/*\nfs/nfsd/attr4.h:13: * The following attributes are not implemented by NFSD:\nfs/nfsd/attr4.h-14- * ARCHIVE (deprecated anyway)\n--\nfs/nfsd/attr4.h-20- */\nfs/nfsd/attr4.h:21:#define NFSD4_SUPPORTED_ATTRS_WORD0 \\\nfs/nfsd/attr4.h-22-(FATTR4_WORD0_SUPPORTED_ATTRS | FATTR4_WORD0_TYPE | FATTR4_WORD0_FH_EXPIRE_TYPE \\\n--\nfs/nfsd/attr4.h-32-\nfs/nfsd/attr4.h:33:#define NFSD4_SUPPORTED_ATTRS_WORD1 \\\nfs/nfsd/attr4.h-34-(FATTR4_WORD1_MODE | FATTR4_WORD1_NO_TRUNC | FATTR4_WORD1_NUMLINKS \\\n--\nfs/nfsd/attr4.h-40-\nfs/nfsd/attr4.h:41:#define NFSD4_SUPPORTED_ATTRS_WORD2 0\nfs/nfsd/attr4.h-42-\nfs/nfsd/attr4.h-43-/* 4.1 */\nfs/nfsd/attr4.h:44:#ifdef CONFIG_NFSD_PNFS\nfs/nfsd/attr4.h:45:#define PNFSD_SUPPORTED_ATTRS_WORD1\tFATTR4_WORD1_FS_LAYOUT_TYPES\nfs/nfsd/attr4.h:46:#define PNFSD_SUPPORTED_ATTRS_WORD2 \\\nfs/nfsd/attr4.h-47-(FATTR4_WORD2_LAYOUT_BLKSIZE\t| FATTR4_WORD2_LAYOUT_TYPES)\nfs/nfsd/attr4.h-48-#else\nfs/nfsd/attr4.h:49:#define PNFSD_SUPPORTED_ATTRS_WORD1\t0\nfs/nfsd/attr4.h:50:#define PNFSD_SUPPORTED_ATTRS_WORD2\t0\nfs/nfsd/attr4.h:51:#endif /* CONFIG_NFSD_PNFS */\nfs/nfsd/attr4.h-52-\nfs/nfsd/attr4.h:53:#define NFSD4_1_SUPPORTED_ATTRS_WORD0 \\\nfs/nfsd/attr4.h:54:\tNFSD4_SUPPORTED_ATTRS_WORD0\nfs/nfsd/attr4.h-55-\nfs/nfsd/attr4.h:56:#define NFSD4_1_SUPPORTED_ATTRS_WORD1 \\\nfs/nfsd/attr4.h:57:\t(NFSD4_SUPPORTED_ATTRS_WORD1\t| PNFSD_SUPPORTED_ATTRS_WORD1)\nfs/nfsd/attr4.h-58-\nfs/nfsd/attr4.h:59:#define NFSD4_1_SUPPORTED_ATTRS_WORD2 \\\nfs/nfsd/attr4.h:60:\t(NFSD4_SUPPORTED_ATTRS_WORD2\t| PNFSD_SUPPORTED_ATTRS_WORD2 | \\\nfs/nfsd/attr4.h-61-\t FATTR4_WORD2_SUPPATTR_EXCLCREAT)\n--\nfs/nfsd/attr4.h-63-/* 4.2 */\nfs/nfsd/attr4.h:64:#ifdef CONFIG_NFSD_V4_SECURITY_LABEL\nfs/nfsd/attr4.h:65:#define NFSD4_2_SECURITY_ATTRS\t\tFATTR4_WORD2_SECURITY_LABEL\nfs/nfsd/attr4.h-66-#else\nfs/nfsd/attr4.h:67:#define NFSD4_2_SECURITY_ATTRS\t\t0\nfs/nfsd/attr4.h-68-#endif\nfs/nfsd/attr4.h-69-\nfs/nfsd/attr4.h:70:#ifdef CONFIG_NFSD_V4_POSIX_ACLS\nfs/nfsd/attr4.h:71:#define NFSD4_2_POSIX_ACL_ATTRS \\\nfs/nfsd/attr4.h-72-\t(FATTR4_WORD2_ACL_TRUEFORM | \\\n--\nfs/nfsd/attr4.h-76-#else\nfs/nfsd/attr4.h:77:#define NFSD4_2_POSIX_ACL_ATTRS\t\t0\nfs/nfsd/attr4.h-78-#endif\nfs/nfsd/attr4.h-79-\nfs/nfsd/attr4.h:80:#define NFSD4_2_SUPPORTED_ATTRS_WORD2 \\\nfs/nfsd/attr4.h:81:\t(NFSD4_1_SUPPORTED_ATTRS_WORD2 | \\\nfs/nfsd/attr4.h-82-\tFATTR4_WORD2_MODE_UMASK | \\\nfs/nfsd/attr4.h-83-\tFATTR4_WORD2_CLONE_BLKSIZE | \\\nfs/nfsd/attr4.h:84:\tNFSD4_2_SECURITY_ATTRS | \\\nfs/nfsd/attr4.h-85-\tFATTR4_WORD2_XATTR_SUPPORT | \\\n--\nfs/nfsd/attr4.h-88-\tFATTR4_WORD2_OPEN_ARGUMENTS | \\\nfs/nfsd/attr4.h:89:\tNFSD4_2_POSIX_ACL_ATTRS)\nfs/nfsd/attr4.h-90-\nfs/nfsd/attr4.h-91-/* These will return ERR_INVAL if specified in GETATTR or READDIR. */\nfs/nfsd/attr4.h:92:#define NFSD_WRITEONLY_ATTRS_WORD1 \\\nfs/nfsd/attr4.h-93-\t(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET)\n--\nfs/nfsd/attr4.h-99- */\nfs/nfsd/attr4.h:100:#define NFSD_WRITEABLE_ATTRS_WORD0 \\\nfs/nfsd/attr4.h-101-\t(FATTR4_WORD0_SIZE | FATTR4_WORD0_ACL)\nfs/nfsd/attr4.h:102:#define NFSD_WRITEABLE_ATTRS_WORD1 \\\nfs/nfsd/attr4.h-103-\t(FATTR4_WORD1_MODE | FATTR4_WORD1_OWNER | FATTR4_WORD1_OWNER_GROUP \\\n--\nfs/nfsd/attr4.h-105-\t| FATTR4_WORD1_TIME_MODIFY_SET)\nfs/nfsd/attr4.h:106:#ifdef CONFIG_NFSD_V4_SECURITY_LABEL\nfs/nfsd/attr4.h-107-#define MAYBE_FATTR4_WORD2_SECURITY_LABEL \\\n--\nfs/nfsd/attr4.h-111-#endif\nfs/nfsd/attr4.h:112:#ifdef CONFIG_NFSD_V4_POSIX_ACLS\nfs/nfsd/attr4.h-113-#define MAYBE_FATTR4_WORD2_POSIX_ACL_ATTRS \\\n--\nfs/nfsd/attr4.h-117-#endif\nfs/nfsd/attr4.h:118:#define NFSD_WRITEABLE_ATTRS_WORD2 \\\nfs/nfsd/attr4.h-119-\t(FATTR4_WORD2_MODE_UMASK \\\n--\nfs/nfsd/attr4.h-125-\nfs/nfsd/attr4.h:126:#define NFSD_SUPPATTR_EXCLCREAT_WORD0 \\\nfs/nfsd/attr4.h:127:\tNFSD_WRITEABLE_ATTRS_WORD0\nfs/nfsd/attr4.h-128-/*\n--\nfs/nfsd/attr4.h-131- */\nfs/nfsd/attr4.h:132:#define NFSD_SUPPATTR_EXCLCREAT_WORD1 \\\nfs/nfsd/attr4.h:133:\t(NFSD_WRITEABLE_ATTRS_WORD1 \u0026 \\\nfs/nfsd/attr4.h-134-\t ~(FATTR4_WORD1_TIME_ACCESS_SET | FATTR4_WORD1_TIME_MODIFY_SET))\n--\nfs/nfsd/attr4.h-143- */\nfs/nfsd/attr4.h:144:#define NFSD_SUPPATTR_EXCLCREAT_WORD2 \\\nfs/nfsd/attr4.h:145:\t(NFSD_WRITEABLE_ATTRS_WORD2 \u0026 \\\nfs/nfsd/attr4.h-146-\t~(FATTR4_WORD2_TIME_DELEG_ACCESS | FATTR4_WORD2_TIME_DELEG_MODIFY))\n--\nfs/nfsd/attr4.h=157=static inline bool nfsd_attrs_supported(u32 minorversion, const u32 *bmval)\n--\nfs/nfsd/attr4.h-161-\nfs/nfsd/attr4.h:162:#endif /* _LINUX_NFSD_ATTR4_H */\n--\nfs/nfsd/auth.h-7-\nfs/nfsd/auth.h:8:#ifndef LINUX_NFSD_AUTH_H\nfs/nfsd/auth.h:9:#define LINUX_NFSD_AUTH_H\nfs/nfsd/auth.h-10-\n--\nfs/nfsd/auth.h=21=struct user_namespace *nfsd_user_namespace(const struct svc_rqst *rqstp);\nfs/nfsd/auth.h-22-\nfs/nfsd/auth.h:23:#endif /* LINUX_NFSD_AUTH_H */\n--\nfs/nfsd/blocklayout.c-17-\nfs/nfsd/blocklayout.c:18:#define NFSDDBG_FACILITY\tNFSDDBG_PNFS\nfs/nfsd/blocklayout.c-19-\n--\nfs/nfsd/blocklayout.c=179=nfsd4_block_commit_blocks(struct inode *inode, struct nfsd4_layoutcommit *lcp,\n--\nfs/nfsd/blocklayout.c-199-\nfs/nfsd/blocklayout.c:200:#ifdef CONFIG_NFSD_BLOCKLAYOUT\nfs/nfsd/blocklayout.c-201-static int\n--\nfs/nfsd/blocklayout.c=252=const struct nfsd4_layout_ops bl_layout_ops = {\n--\nfs/nfsd/blocklayout.c-269-};\nfs/nfsd/blocklayout.c:270:#endif /* CONFIG_NFSD_BLOCKLAYOUT */\nfs/nfsd/blocklayout.c-271-\nfs/nfsd/blocklayout.c:272:#ifdef CONFIG_NFSD_SCSILAYOUT\nfs/nfsd/blocklayout.c-273-\nfs/nfsd/blocklayout.c:274:#define NFSD_MDS_PR_FENCED\tXA_MARK_0\nfs/nfsd/blocklayout.c-275-\n--\nfs/nfsd/blocklayout.c=284=static inline int nfsd4_scsi_fence_insert(struct nfs4_client *clp,\n--\nfs/nfsd/blocklayout.c-292-\tif (ret == -EBUSY) {\nfs/nfsd/blocklayout.c:293:\t\t__xa_clear_mark(xa, device, NFSD_MDS_PR_FENCED);\nfs/nfsd/blocklayout.c-294-\t\tret = 0;\n--\nfs/nfsd/blocklayout.c=301=static inline bool nfsd4_scsi_fence_set(struct nfs4_client *clp, dev_t device)\n--\nfs/nfsd/blocklayout.c-306-\txa_lock(xa);\nfs/nfsd/blocklayout.c:307:\tskip = xa_get_mark(xa, device, NFSD_MDS_PR_FENCED);\nfs/nfsd/blocklayout.c-308-\tif (!skip)\nfs/nfsd/blocklayout.c:309:\t\t__xa_set_mark(xa, device, NFSD_MDS_PR_FENCED);\nfs/nfsd/blocklayout.c-310-\txa_unlock(xa);\n--\nfs/nfsd/blocklayout.c=314=static inline void nfsd4_scsi_fence_clear(struct nfs4_client *clp, dev_t device)\nfs/nfsd/blocklayout.c-315-{\nfs/nfsd/blocklayout.c:316:\txa_clear_mark(\u0026clp-\u003ecl_dev_fences, device, NFSD_MDS_PR_FENCED);\nfs/nfsd/blocklayout.c-317-}\nfs/nfsd/blocklayout.c-318-\nfs/nfsd/blocklayout.c:319:#define NFSD_MDS_PR_KEY\t\t0x0100000000000000ULL\nfs/nfsd/blocklayout.c-320-\n--\nfs/nfsd/blocklayout.c=356=nfsd4_block_get_device_info_scsi(struct super_block *sb,\n--\nfs/nfsd/blocklayout.c-391-\nfs/nfsd/blocklayout.c:392:\tret = ops-\u003epr_register(sb-\u003es_bdev, 0, NFSD_MDS_PR_KEY, true);\nfs/nfsd/blocklayout.c-393-\tif (ret) {\n--\nfs/nfsd/blocklayout.c-398-\nfs/nfsd/blocklayout.c:399:\tret = ops-\u003epr_reserve(sb-\u003es_bdev, NFSD_MDS_PR_KEY,\nfs/nfsd/blocklayout.c-400-\t\t\tPR_EXCLUSIVE_ACCESS_REG_ONLY, 0);\n--\nfs/nfsd/blocklayout.c=426=nfsd4_scsi_proc_layoutcommit(struct inode *inode, struct svc_rqst *rqstp,\n--\nfs/nfsd/blocklayout.c-446- * block device. If a fence operation is already in progress, wait for\nfs/nfsd/blocklayout.c:447: * it to complete before checking the NFSD_MDS_PR_FENCED flag. Once the\nfs/nfsd/blocklayout.c:448: * operation is complete, check the flag. If NFSD_MDS_PR_FENCED is set,\nfs/nfsd/blocklayout.c-449- * update the layout stateid by setting the ls_fenced flag to indicate\n--\nfs/nfsd/blocklayout.c=459=nfsd4_scsi_fence_client(struct nfs4_layout_stateid *ls, struct nfsd_file *file)\n--\nfs/nfsd/blocklayout.c-471-\nfs/nfsd/blocklayout.c:472:\tstatus = bdev-\u003ebd_disk-\u003efops-\u003epr_ops-\u003epr_preempt(bdev, NFSD_MDS_PR_KEY,\nfs/nfsd/blocklayout.c-473-\t\t\tnfsd4_scsi_pr_key(clp),\n--\nfs/nfsd/blocklayout.c=507=const struct nfsd4_layout_ops scsi_layout_ops = {\n--\nfs/nfsd/blocklayout.c-525-};\nfs/nfsd/blocklayout.c:526:#endif /* CONFIG_NFSD_SCSILAYOUT */\n--\nfs/nfsd/blocklayoutxdr.c-13-\nfs/nfsd/blocklayoutxdr.c:14:#define NFSDDBG_FACILITY\tNFSDDBG_PNFS\nfs/nfsd/blocklayoutxdr.c-15-\n--\nfs/nfsd/blocklayoutxdr.h-1-/* SPDX-License-Identifier: GPL-2.0 */\nfs/nfsd/blocklayoutxdr.h:2:#ifndef _NFSD_BLOCKLAYOUTXDR_H\nfs/nfsd/blocklayoutxdr.h:3:#define _NFSD_BLOCKLAYOUTXDR_H 1\nfs/nfsd/blocklayoutxdr.h-4-\n--\nfs/nfsd/blocklayoutxdr.h=73=__be32 nfsd4_scsi_decode_layoutupdate(struct xdr_stream *xdr,\n--\nfs/nfsd/blocklayoutxdr.h-75-\nfs/nfsd/blocklayoutxdr.h:76:#endif /* _NFSD_BLOCKLAYOUTXDR_H */\n--\nfs/nfsd/current_stateid.h-1-/* SPDX-License-Identifier: GPL-2.0 */\nfs/nfsd/current_stateid.h:2:#ifndef _NFSD4_CURRENT_STATE_H\nfs/nfsd/current_stateid.h:3:#define _NFSD4_CURRENT_STATE_H\nfs/nfsd/current_stateid.h-4-\n--\nfs/nfsd/current_stateid.h=38=extern void nfsd4_get_writestateid(struct nfsd4_compound_state *,\n--\nfs/nfsd/current_stateid.h-40-\nfs/nfsd/current_stateid.h:41:#endif /* _NFSD4_CURRENT_STATE_H */\n--\nfs/nfsd/debugfs.c=7=static struct dentry *nfsd_top_dir __read_mostly;\n--\nfs/nfsd/debugfs.c-17- * allowed). This setting takes immediate effect for all NFS\nfs/nfsd/debugfs.c:18: * versions, all exports, and in all NFSD net namespaces.\nfs/nfsd/debugfs.c-19- */\n--\nfs/nfsd/debugfs.c=27=static int nfsd_dsr_set(void *data, u64 val)\n--\nfs/nfsd/debugfs.c-33-\t\t */\nfs/nfsd/debugfs.c:34:\t\tnfsd_io_cache_read = NFSD_IO_BUFFERED;\nfs/nfsd/debugfs.c-35-\t}\n--\nfs/nfsd/debugfs.c=39=DEFINE_DEBUGFS_ATTRIBUTE(nfsd_dsr_fops, nfsd_dsr_get, nfsd_dsr_set, \"%llu\\n\");\n--\nfs/nfsd/debugfs.c-49- * This setting takes immediate effect for all NFS versions,\nfs/nfsd/debugfs.c:50: * all exports, and in all NFSD net namespaces.\nfs/nfsd/debugfs.c-51- */\n--\nfs/nfsd/debugfs.c=59=static int nfsd_io_cache_read_set(void *data, u64 val)\n--\nfs/nfsd/debugfs.c-63-\tswitch (val) {\nfs/nfsd/debugfs.c:64:\tcase NFSD_IO_BUFFERED:\nfs/nfsd/debugfs.c:65:\t\tnfsd_io_cache_read = NFSD_IO_BUFFERED;\nfs/nfsd/debugfs.c-66-\t\tbreak;\nfs/nfsd/debugfs.c:67:\tcase NFSD_IO_DONTCACHE:\nfs/nfsd/debugfs.c:68:\tcase NFSD_IO_DIRECT:\nfs/nfsd/debugfs.c-69-\t\t/*\nfs/nfsd/debugfs.c-70-\t\t * Must disable splice_read when enabling\nfs/nfsd/debugfs.c:71:\t\t * NFSD_IO_DONTCACHE.\nfs/nfsd/debugfs.c-72-\t\t */\n--\nfs/nfsd/debugfs.c=84=DEFINE_DEBUGFS_ATTRIBUTE(nfsd_io_cache_read_fops, nfsd_io_cache_read_get,\n--\nfs/nfsd/debugfs.c-94- * This setting takes immediate effect for all NFS versions,\nfs/nfsd/debugfs.c:95: * all exports, and in all NFSD net namespaces.\nfs/nfsd/debugfs.c-96- */\n--\nfs/nfsd/debugfs.c=104=static int nfsd_io_cache_write_set(void *data, u64 val)\n--\nfs/nfsd/debugfs.c-108-\tswitch (val) {\nfs/nfsd/debugfs.c:109:\tcase NFSD_IO_BUFFERED:\nfs/nfsd/debugfs.c:110:\tcase NFSD_IO_DONTCACHE:\nfs/nfsd/debugfs.c:111:\tcase NFSD_IO_DIRECT:\nfs/nfsd/debugfs.c-112-\t\tnfsd_io_cache_write = val;\n--\nfs/nfsd/debugfs.c=131=void nfsd_debugfs_init(void)\n--\nfs/nfsd/debugfs.c-142-\t\t\t \u0026nfsd_io_cache_write_fops);\nfs/nfsd/debugfs.c:143:#ifdef CONFIG_NFSD_V4\nfs/nfsd/debugfs.c-144-\tdebugfs_create_bool(\"delegated_timestamps\", 0644, nfsd_top_dir,\n--\nfs/nfsd/export.c-30-\nfs/nfsd/export.c:31:#define NFSDDBG_FACILITY\tNFSDDBG_EXPORT\nfs/nfsd/export.c-32-\n--\nfs/nfsd/export.c=258=static int expkey_notify(struct cache_detail *cd, struct cache_head *h)\nfs/nfsd/export.c-259-{\nfs/nfsd/export.c:260:\treturn nfsd_cache_notify(cd, h, NFSD_CACHE_TYPE_EXPKEY);\nfs/nfsd/export.c-261-}\n--\nfs/nfsd/export.c=334=int nfsd_nl_expkey_get_reqs_dumpit(struct sk_buff *skb,\n--\nfs/nfsd/export.c-376-\t\t\t cb-\u003enlh-\u003enlmsg_seq, \u0026nfsd_nl_family,\nfs/nfsd/export.c:377:\t\t\t NLM_F_MULTI, NFSD_CMD_EXPKEY_GET_REQS);\nfs/nfsd/export.c-378-\tif (!hdr) {\n--\nfs/nfsd/export.c-389-\nfs/nfsd/export.c:390:\t\tnest = nla_nest_start(skb, NFSD_A_EXPKEY_REQS_REQUESTS);\nfs/nfsd/export.c-391-\t\tif (!nest)\n--\nfs/nfsd/export.c-393-\nfs/nfsd/export.c:394:\t\tif (nla_put_u64_64bit(skb, NFSD_A_EXPKEY_SEQNO,\nfs/nfsd/export.c-395-\t\t\t\t seqnos[i], 0) ||\nfs/nfsd/export.c:396:\t\t nla_put_string(skb, NFSD_A_EXPKEY_CLIENT,\nfs/nfsd/export.c-397-\t\t\t\t ek-\u003eek_client-\u003ename) ||\nfs/nfsd/export.c:398:\t\t nla_put_u8(skb, NFSD_A_EXPKEY_FSIDTYPE,\nfs/nfsd/export.c-399-\t\t\t ek-\u003eek_fsidtype) ||\nfs/nfsd/export.c:400:\t\t nla_put(skb, NFSD_A_EXPKEY_FSID,\nfs/nfsd/export.c-401-\t\t\t key_len(ek-\u003eek_fsidtype), ek-\u003eek_fsid)) {\n--\nfs/nfsd/export.c=440=static int nfsd_nl_parse_one_expkey(struct cache_detail *cd,\n--\nfs/nfsd/export.c-442-{\nfs/nfsd/export.c:443:\tstruct nlattr *tb[NFSD_A_EXPKEY_PATH + 1];\nfs/nfsd/export.c-444-\tstruct auth_domain *dom = NULL;\n--\nfs/nfsd/export.c-451-\nfs/nfsd/export.c:452:\terr = nla_parse_nested(tb, NFSD_A_EXPKEY_PATH, attr,\nfs/nfsd/export.c-453-\t\t\t nfsd_expkey_nl_policy, NULL);\n--\nfs/nfsd/export.c-457-\t/* client (required) */\nfs/nfsd/export.c:458:\tif (!tb[NFSD_A_EXPKEY_CLIENT])\nfs/nfsd/export.c-459-\t\treturn -EINVAL;\nfs/nfsd/export.c-460-\nfs/nfsd/export.c:461:\tdom = auth_domain_find(nla_data(tb[NFSD_A_EXPKEY_CLIENT]));\nfs/nfsd/export.c-462-\tif (!dom)\n--\nfs/nfsd/export.c-465-\t/* fsidtype (required) */\nfs/nfsd/export.c:466:\tif (!tb[NFSD_A_EXPKEY_FSIDTYPE]) {\nfs/nfsd/export.c-467-\t\terr = -EINVAL;\n--\nfs/nfsd/export.c-469-\t}\nfs/nfsd/export.c:470:\tfsidtype = nla_get_u8(tb[NFSD_A_EXPKEY_FSIDTYPE]);\nfs/nfsd/export.c-471-\tif (key_len(fsidtype) == 0) {\n--\nfs/nfsd/export.c-476-\t/* fsid (required) */\nfs/nfsd/export.c:477:\tif (!tb[NFSD_A_EXPKEY_FSID]) {\nfs/nfsd/export.c-478-\t\terr = -EINVAL;\n--\nfs/nfsd/export.c-480-\t}\nfs/nfsd/export.c:481:\tfsid_len = nla_len(tb[NFSD_A_EXPKEY_FSID]);\nfs/nfsd/export.c-482-\tif (fsid_len != key_len(fsidtype)) {\n--\nfs/nfsd/export.c-487-\t/* expiry (required, wallclock seconds) */\nfs/nfsd/export.c:488:\tif (!tb[NFSD_A_EXPKEY_EXPIRY]) {\nfs/nfsd/export.c-489-\t\terr = -EINVAL;\n--\nfs/nfsd/export.c-494-\tgetboottime64(\u0026boot);\nfs/nfsd/export.c:495:\tkey.h.expiry_time = nla_get_u64(tb[NFSD_A_EXPKEY_EXPIRY]) -\nfs/nfsd/export.c-496-\t\t\t boot.tv_sec;\n--\nfs/nfsd/export.c-498-\tkey.ek_fsidtype = fsidtype;\nfs/nfsd/export.c:499:\tmemcpy(key.ek_fsid, nla_data(tb[NFSD_A_EXPKEY_FSID]), fsid_len);\nfs/nfsd/export.c-500-\n--\nfs/nfsd/export.c-506-\nfs/nfsd/export.c:507:\tif (tb[NFSD_A_EXPKEY_NEGATIVE]) {\nfs/nfsd/export.c-508-\t\tset_bit(CACHE_NEGATIVE, \u0026key.h.flags);\n--\nfs/nfsd/export.c-513-\t\t\terr = -ENOMEM;\nfs/nfsd/export.c:514:\t} else if (tb[NFSD_A_EXPKEY_PATH]) {\nfs/nfsd/export.c:515:\t\terr = kern_path(nla_data(tb[NFSD_A_EXPKEY_PATH]), 0,\nfs/nfsd/export.c-516-\t\t\t\t\u0026key.ek_path);\n--\nfs/nfsd/export.c-521-\t\t\ttrace_nfsd_expkey_update(ek,\nfs/nfsd/export.c:522:\t\t\t\t\tnla_data(tb[NFSD_A_EXPKEY_PATH]));\nfs/nfsd/export.c-523-\t\telse\n--\nfs/nfsd/export.c=551=int nfsd_nl_expkey_set_reqs_doit(struct sk_buff *skb,\n--\nfs/nfsd/export.c-568-\nfs/nfsd/export.c:569:\tnlmsg_for_each_attr_type(attr, NFSD_A_EXPKEY_REQS_REQUESTS,\nfs/nfsd/export.c-570-\t\t\t\t info-\u003enlhdr, GENL_HDRLEN, rem) {\n--\nfs/nfsd/export.c=660=int nfsd_nl_svc_export_get_reqs_dumpit(struct sk_buff *skb,\n--\nfs/nfsd/export.c-704-\t\t\t cb-\u003enlh-\u003enlmsg_seq, \u0026nfsd_nl_family,\nfs/nfsd/export.c:705:\t\t\t NLM_F_MULTI, NFSD_CMD_SVC_EXPORT_GET_REQS);\nfs/nfsd/export.c-706-\tif (!hdr) {\n--\nfs/nfsd/export.c-723-\t\tnest = nla_nest_start(skb,\nfs/nfsd/export.c:724:\t\t\t\t NFSD_A_SVC_EXPORT_REQS_REQUESTS);\nfs/nfsd/export.c-725-\t\tif (!nest)\n--\nfs/nfsd/export.c-727-\nfs/nfsd/export.c:728:\t\tif (nla_put_u64_64bit(skb, NFSD_A_SVC_EXPORT_SEQNO,\nfs/nfsd/export.c-729-\t\t\t\t seqnos[i], 0) ||\nfs/nfsd/export.c:730:\t\t nla_put_string(skb, NFSD_A_SVC_EXPORT_CLIENT,\nfs/nfsd/export.c-731-\t\t\t\t exp-\u003eex_client-\u003ename) ||\nfs/nfsd/export.c:732:\t\t nla_put_string(skb, NFSD_A_SVC_EXPORT_PATH, pth)) {\nfs/nfsd/export.c-733-\t\t\tnla_nest_cancel(skb, nest);\n--\nfs/nfsd/export.c-763- * nfsd_nl_parse_fslocations - parse fslocations from netlink\nfs/nfsd/export.c:764: * @attr: NFSD_A_SVC_EXPORT_FSLOCATIONS nested attribute\nfs/nfsd/export.c-765- * @fsloc: fslocations struct to fill in\n--\nfs/nfsd/export.c=769=static int nfsd_nl_parse_fslocations(struct nlattr *attr,\n--\nfs/nfsd/export.c-779-\t/* Count locations first */\nfs/nfsd/export.c:780:\tnla_for_each_nested_type(loc_attr, NFSD_A_FSLOCATIONS_LOCATION,\nfs/nfsd/export.c-781-\t\t\t\t attr, rem)\n--\nfs/nfsd/export.c-793-\nfs/nfsd/export.c:794:\tnla_for_each_nested_type(loc_attr, NFSD_A_FSLOCATIONS_LOCATION,\nfs/nfsd/export.c-795-\t\t\t\t attr, rem) {\nfs/nfsd/export.c:796:\t\tstruct nlattr *tb[NFSD_A_FSLOCATION_PATH + 1];\nfs/nfsd/export.c-797-\t\tstruct nfsd4_fs_location *loc;\nfs/nfsd/export.c-798-\nfs/nfsd/export.c:799:\t\terr = nla_parse_nested(tb, NFSD_A_FSLOCATION_PATH, loc_attr,\nfs/nfsd/export.c-800-\t\t\t\t nfsd_fslocation_nl_policy, NULL);\n--\nfs/nfsd/export.c-803-\nfs/nfsd/export.c:804:\t\tif (!tb[NFSD_A_FSLOCATION_HOST] ||\n\n"
} |
| 13/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 17674 output: 27 thoughts: 20 Thoughts: Here's my thought process, as if I were considering this search: **Investigating SUNRPC Configuration Options** Okay, so I'm diving into this. My initial instinct is to track down all the relevant configuration options for `SUNRPC`. I know the kernel build system uses Kconfig files to manage these, so that's the obvious place to start. And if I want a comprehensive overview of how `SUNRPC` is configured within the kernel, the most logical first stop is probably the `net/sunrpc/Kconfig` file. I'm thinking that's where I'll find the main declaration or perhaps a top-level aggregation of all the `SUNRPC`-related config symbols. From there, I can get a better feel for the dependencies and relationships within the module. |
| 14/2 | 2026/09/03 14:09 | tool | grepper |
0mArgs:{
"Expression": "config SUNRPC",
"PathPrefix": "net/sunrpc"
}Results: {
"Output": "net/sunrpc/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\nnet/sunrpc/Kconfig:2:config SUNRPC\nnet/sunrpc/Kconfig-3-\ttristate\n--\nnet/sunrpc/Kconfig-5-\nnet/sunrpc/Kconfig:6:config SUNRPC_GSS\nnet/sunrpc/Kconfig-7-\ttristate\n--\nnet/sunrpc/Kconfig-10-\nnet/sunrpc/Kconfig:11:config SUNRPC_BACKCHANNEL\nnet/sunrpc/Kconfig-12-\tbool\n--\nnet/sunrpc/Kconfig-14-\nnet/sunrpc/Kconfig:15:config SUNRPC_SWAP\nnet/sunrpc/Kconfig-16-\tbool\n--\nnet/sunrpc/Kconfig=19=config RPCSEC_GSS_KRB5\n--\nnet/sunrpc/Kconfig-35-\nnet/sunrpc/Kconfig:36:config SUNRPC_DEBUG\nnet/sunrpc/Kconfig-37-\tbool \"RPC: Enable dprintk debugging\"\n--\nnet/sunrpc/Kconfig-49-\nnet/sunrpc/Kconfig:50:config SUNRPC_DEBUG_TRACE\nnet/sunrpc/Kconfig-51-\tbool \"RPC: Send dfprintk() output to the trace buffer\"\n--\nnet/sunrpc/Kconfig-63-\nnet/sunrpc/Kconfig:64:config SUNRPC_XPRT_RDMA\nnet/sunrpc/Kconfig-65-\ttristate \"RPC-over-RDMA transport\"\n"
} |
| 15/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 18287 output: 18 thoughts: 51 Thoughts: Here's my take on those thoughts: **Investigating NFSd and SUNRPC Dependencies** Okay, so I'm trying to figure out the exact relationship between `CONFIG_NFSD` and `CONFIG_SUNRPC` in the kernel configuration. It seems like enabling the NFS daemon (`CONFIG_NFSD`) might automatically pull in SUNRPC, but I need to confirm that. The question is, is `CONFIG_SUNRPC` a dependency of `CONFIG_NFSD`, or is it enabled some other way? I need to check the Kconfig files to be sure. Time to dig into `fs/nfsd/Kconfig` and `net/sunrpc/Kconfig` to see how those dependencies are structured and how `CONFIG_SUNRPC` is actually enabled. Hopefully, that will clarify the control flow and dependencies I'm interested in! |
| 16/2 | 2026/09/03 14:09 | tool | grepper |
0mArgs:{
"Expression": "select.*SUNRPC"
}Results: {
"Output": "fs/Kconfig=380=config NFS_COMMON_LOCALIO_SUPPORT\n--\nfs/Kconfig-384-\tdefault m if NFSD=m \u0026\u0026 NFS_FS=m\nfs/Kconfig:385:\tselect SUNRPC\nfs/Kconfig-386-\n--\nfs/nfs/Kconfig=2=config NFS_FS\n--\nfs/nfs/Kconfig-6-\tselect LOCKD\nfs/nfs/Kconfig:7:\tselect SUNRPC\nfs/nfs/Kconfig-8-\tselect NFS_COMMON\n--\nfs/nfs/Kconfig=77=config NFS_V4\n--\nfs/nfs/Kconfig-80-\tselect KEYS\nfs/nfs/Kconfig:81:\tselect SUNRPC_BACKCHANNEL\nfs/nfs/Kconfig-82-\thelp\n--\nfs/nfs/Kconfig=92=config NFS_SWAP\n--\nfs/nfs/Kconfig-95-\tdepends on NFS_FS \u0026\u0026 SWAP\nfs/nfs/Kconfig:96:\tselect SUNRPC_SWAP\nfs/nfs/Kconfig-97-\thelp\n--\nfs/nfsd/Kconfig=2=config NFSD\n--\nfs/nfsd/Kconfig-11-\tselect LOCKD\nfs/nfsd/Kconfig:12:\tselect SUNRPC\nfs/nfsd/Kconfig-13-\tselect EXPORTFS\n--\nnet/sunrpc/Kconfig=19=config RPCSEC_GSS_KRB5\n--\nnet/sunrpc/Kconfig-22-\tdefault y\nnet/sunrpc/Kconfig:23:\tselect SUNRPC_GSS\nnet/sunrpc/Kconfig-24-\tselect CRYPTO_KRB5\n"
} |
| 17/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 18977 output: 27 thoughts: 44 Thoughts: Okay, let's break this down. **Investigating the NFS Server Configuration Dependencies** Alright, so `CONFIG_NFSD` being selected automatically brings in `CONFIG_SUNRPC`. I know this means the Network File System Daemon is reliant on the Sun Remote Procedure Call system. So, I need to understand how the NFS server is built and how those RPC components are linked. To do that, I'll go straight to `net/sunrpc/Makefile`. That file should give me the build rules for core objects, specifically the creation of `svcsock.o`, which I expect will be crucial for the network socket management used by the server. Time to dig into the makefile and see what's what. |
| 18/2 | 2026/09/03 14:09 | tool | grepper |
0mArgs:{
"Expression": "svcsock",
"PathPrefix": "net/sunrpc"
}Results: {
"Output": "net/sunrpc/Makefile=11=sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \\\nnet/sunrpc/Makefile-12-\t auth.o auth_null.o auth_tls.o auth_unix.o \\\nnet/sunrpc/Makefile:13:\t svc.o svcsock.o svcauth.o svcauth_unix.o \\\nnet/sunrpc/Makefile-14-\t addr.o rpcb_clnt.o timer.o xdr.o \\\n--\nnet/sunrpc/stats.c-23-#include \u003clinux/sunrpc/clnt.h\u003e\nnet/sunrpc/stats.c:24:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/stats.c-25-#include \u003clinux/sunrpc/metrics.h\u003e\n--\nnet/sunrpc/sunrpc_syms.c-19-#include \u003clinux/sunrpc/svc.h\u003e\nnet/sunrpc/sunrpc_syms.c:20:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/sunrpc_syms.c-21-#include \u003clinux/sunrpc/auth.h\u003e\n--\nnet/sunrpc/svc.c-27-#include \u003clinux/sunrpc/stats.h\u003e\nnet/sunrpc/svc.c:28:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/svc.c-29-#include \u003clinux/sunrpc/clnt.h\u003e\n--\nnet/sunrpc/svc_xprt.c-16-#include \u003clinux/sunrpc/svc_xprt.h\u003e\nnet/sunrpc/svc_xprt.c:17:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/svc_xprt.c-18-#include \u003clinux/sunrpc/xprt.h\u003e\n--\nnet/sunrpc/svcauth.c-16-#include \u003clinux/sunrpc/xdr.h\u003e\nnet/sunrpc/svcauth.c:17:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/svcauth.c-18-#include \u003clinux/sunrpc/svcauth.h\u003e\n--\nnet/sunrpc/svcauth_unix.c-6-#include \u003clinux/sunrpc/xdr.h\u003e\nnet/sunrpc/svcauth_unix.c:7:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/svcauth_unix.c-8-#include \u003clinux/sunrpc/svcauth.h\u003e\n--\nnet/sunrpc/svcsock.c-2-/*\nnet/sunrpc/svcsock.c:3: * linux/net/sunrpc/svcsock.c\nnet/sunrpc/svcsock.c-4- *\n--\nnet/sunrpc/svcsock.c-58-#include \u003clinux/sunrpc/msg_prot.h\u003e\nnet/sunrpc/svcsock.c:59:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/svcsock.c-60-#include \u003clinux/sunrpc/stats.h\u003e\n--\nnet/sunrpc/svcsock.c=401=static void svc_data_ready(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-410-\t\tsvsk-\u003esk_odata(sk);\nnet/sunrpc/svcsock.c:411:\t\ttrace_svcsock_data_ready(\u0026svsk-\u003esk_xprt, 0);\nnet/sunrpc/svcsock.c-412-\t\tif (test_bit(XPT_HANDSHAKE, \u0026svsk-\u003esk_xprt.xpt_flags))\n--\nnet/sunrpc/svcsock.c=422=static void svc_write_space(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-428-\t\trmb();\nnet/sunrpc/svcsock.c:429:\t\ttrace_svcsock_write_space(\u0026svsk-\u003esk_xprt, 0);\nnet/sunrpc/svcsock.c-430-\t\tsvsk-\u003esk_owspace(sk);\n--\nnet/sunrpc/svcsock.c=608=static int svc_udp_recvfrom(struct svc_rqst *rqstp)\n--\nnet/sunrpc/svcsock.c-659-\trqstp-\u003erq_arg.len = len;\nnet/sunrpc/svcsock.c:660:\ttrace_svcsock_udp_recv(\u0026svsk-\u003esk_xprt, len);\nnet/sunrpc/svcsock.c-661-\n--\nnet/sunrpc/svcsock.c-703-\t}\nnet/sunrpc/svcsock.c:704:\ttrace_svcsock_udp_recv_err(\u0026svsk-\u003esk_xprt, err);\nnet/sunrpc/svcsock.c-705-\tgoto out_clear_busy;\n--\nnet/sunrpc/svcsock.c=728=static int svc_udp_sendto(struct svc_rqst *rqstp)\n--\nnet/sunrpc/svcsock.c-774-out_trace:\nnet/sunrpc/svcsock.c:775:\ttrace_svcsock_udp_send(xprt, err);\nnet/sunrpc/svcsock.c-776-\n--\nnet/sunrpc/svcsock.c=910=static void svc_tcp_state_change(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-917-\t\tsvsk-\u003esk_ostate(sk);\nnet/sunrpc/svcsock.c:918:\t\ttrace_svcsock_tcp_state(\u0026svsk-\u003esk_xprt, svsk-\u003esk_sock);\nnet/sunrpc/svcsock.c-919-\t\tif (sk-\u003esk_state != TCP_ESTABLISHED)\n--\nnet/sunrpc/svcsock.c=927=static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)\n--\nnet/sunrpc/svcsock.c-944-\t\tif (err != -EAGAIN)\nnet/sunrpc/svcsock.c:945:\t\t\ttrace_svcsock_accept_err(xprt, serv-\u003esv_name, err);\nnet/sunrpc/svcsock.c-946-\t\treturn NULL;\n--\nnet/sunrpc/svcsock.c-954-\tif (err \u003c 0) {\nnet/sunrpc/svcsock.c:955:\t\ttrace_svcsock_getpeername_err(xprt, serv-\u003esv_name, err);\nnet/sunrpc/svcsock.c-956-\t\tgoto failed;\t\t/* aborted connection or whatever */\n--\nnet/sunrpc/svcsock.c=1054=static ssize_t svc_tcp_read_marker(struct svc_sock *svsk,\n--\nnet/sunrpc/svcsock.c-1077-\t\t}\nnet/sunrpc/svcsock.c:1078:\t\ttrace_svcsock_marker(\u0026svsk-\u003esk_xprt, svsk-\u003esk_marker);\nnet/sunrpc/svcsock.c-1079-\t\tif (svc_sock_reclen(svsk) + svsk-\u003esk_datalen \u003e\n--\nnet/sunrpc/svcsock.c=1155=static int svc_tcp_recvfrom(struct svc_rqst *rqstp)\n--\nnet/sunrpc/svcsock.c-1173-\tif (len \u003e= 0) {\nnet/sunrpc/svcsock.c:1174:\t\ttrace_svcsock_tcp_recv(\u0026svsk-\u003esk_xprt, len);\nnet/sunrpc/svcsock.c-1175-\t\tsvsk-\u003esk_tcplen += len;\n--\nnet/sunrpc/svcsock.c-1224-\telse\nnet/sunrpc/svcsock.c:1225:\t\ttrace_svcsock_tcp_recv_short(\u0026svsk-\u003esk_xprt,\nnet/sunrpc/svcsock.c-1226-\t\t\t\tsvc_sock_reclen(svsk),\n--\nnet/sunrpc/svcsock.c-1231-\t\tgoto err_delete;\nnet/sunrpc/svcsock.c:1232:\ttrace_svcsock_tcp_recv_eagain(\u0026svsk-\u003esk_xprt, 0);\nnet/sunrpc/svcsock.c-1233-\tgoto err_noclose;\n--\nnet/sunrpc/svcsock.c-1236-err_delete:\nnet/sunrpc/svcsock.c:1237:\ttrace_svcsock_tcp_recv_err(\u0026svsk-\u003esk_xprt, len);\nnet/sunrpc/svcsock.c-1238-\tsvc_xprt_deferred_close(\u0026svsk-\u003esk_xprt);\n--\nnet/sunrpc/svcsock.c=1293=static int svc_tcp_sendto(struct svc_rqst *rqstp)\n--\nnet/sunrpc/svcsock.c-1308-\tsent = svc_tcp_sendmsg(svsk, rqstp, marker);\nnet/sunrpc/svcsock.c:1309:\ttrace_svcsock_tcp_send(xprt, sent);\nnet/sunrpc/svcsock.c-1310-\tif (sent \u003c 0 || sent != (xdr-\u003elen + sizeof(marker)))\n--\nnet/sunrpc/svcsock.c=1439=static struct svc_sock *svc_setup_socket(struct svc_serv *serv,\n--\nnet/sunrpc/svcsock.c-1501-\nnet/sunrpc/svcsock.c:1502:\ttrace_svcsock_new(svsk, sock);\nnet/sunrpc/svcsock.c-1503-\treturn svsk;\n--\nnet/sunrpc/svcsock.c=1684=static void svc_sock_free(struct svc_xprt *xprt)\n--\nnet/sunrpc/svcsock.c-1688-\nnet/sunrpc/svcsock.c:1689:\ttrace_svcsock_free(svsk, sock);\nnet/sunrpc/svcsock.c-1690-\n--\nnet/sunrpc/xprtsock.c-38-#include \u003clinux/sunrpc/sched.h\u003e\nnet/sunrpc/xprtsock.c:39:#include \u003clinux/sunrpc/svcsock.h\u003e\nnet/sunrpc/xprtsock.c-40-#include \u003clinux/sunrpc/xprtsock.h\u003e\n"
} |
| 19/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 21926 output: 39 thoughts: 51 Thoughts: Here's my analysis of the provided snippet, framed as my own thought process: **Diving into the `svc_setup_socket` Function** Okay, so I see this line of code: `svc_setup_socket` sets `sk->sk_user_data = svsk;`. Immediately, my brain starts working through the implications. `sk->sk_user_data` – that's a classic location for attaching private, module-specific data to a socket structure. The fact that it's being set to `svsk` tells me that this function, `svc_setup_socket`, is clearly associating a service-specific socket structure (`svsk`) with the underlying kernel socket (`sk`). This association is critical for almost any network service. Now I need to know exactly what the `svsk` structure contains. To be sure about the function and `svsk`, I should look at the source. Let me check the `svc_setup_socket` function in `net/sunrpc/svcsock.c` to see how it's used. This should give me the whole picture. I'm especially interested in the surrounding logic, so I can understand the context and intent of this association. This is a crucial step in understanding how this part of the RPC stack is managing sockets and potentially how it's managing concurrent connections. |
| 20/2 | 2026/09/03 14:09 | tool | read-file |
0mArgs:{
"File": "net/sunrpc/svcsock.c",
"FirstLine": 1439,
"LineCount": 70
}Results: {
"Contents": "1439:\tstatic struct svc_sock *svc_setup_socket(struct svc_serv *serv,\n1440:\t\t\t\t\t\t\tstruct socket *sock,\n1441:\t\t\t\t\t\t\tint flags)\n1442:\t{\n1443:\t\tstruct svc_sock\t*svsk;\n1444:\t\tstruct sock\t*inet;\n1445:\t\tint\t\tpmap_register = !(flags \u0026 SVC_SOCK_ANONYMOUS);\n1446:\t\tint\t\tsendpages;\n1447:\t\tunsigned long\tpages;\n1448:\t\n1449:\t\tsendpages = svc_sock_sendpages(serv, sock, flags);\n1450:\t\tif (sendpages \u003c 0)\n1451:\t\t\treturn ERR_PTR(sendpages);\n1452:\t\n1453:\t\tpages = svc_serv_maxpages(serv);\n1454:\t\tsvsk = kzalloc_flex(*svsk, sk_pages, pages);\n1455:\t\tif (!svsk)\n1456:\t\t\treturn ERR_PTR(-ENOMEM);\n1457:\t\n1458:\t\tif (sendpages) {\n1459:\t\t\tsvsk-\u003esk_bvec = kzalloc_objs(*svsk-\u003esk_bvec, sendpages);\n1460:\t\t\tif (!svsk-\u003esk_bvec) {\n1461:\t\t\t\tkfree(svsk);\n1462:\t\t\t\treturn ERR_PTR(-ENOMEM);\n1463:\t\t\t}\n1464:\t\t}\n1465:\t\n1466:\t\tsvsk-\u003esk_maxpages = pages;\n1467:\t\n1468:\t\tinet = sock-\u003esk;\n1469:\t\n1470:\t\tif (pmap_register) {\n1471:\t\t\tint err;\n1472:\t\n1473:\t\t\terr = svc_register(serv, sock_net(sock-\u003esk), inet-\u003esk_family,\n1474:\t\t\t\t\t inet-\u003esk_protocol,\n1475:\t\t\t\t\t ntohs(inet_sk(inet)-\u003einet_sport));\n1476:\t\t\tif (err \u003c 0) {\n1477:\t\t\t\tkfree(svsk-\u003esk_bvec);\n1478:\t\t\t\tkfree(svsk);\n1479:\t\t\t\treturn ERR_PTR(err);\n1480:\t\t\t}\n1481:\t\t}\n1482:\t\n1483:\t\tsvsk-\u003esk_sock = sock;\n1484:\t\tsvsk-\u003esk_sk = inet;\n1485:\t\tsvsk-\u003esk_ostate = inet-\u003esk_state_change;\n1486:\t\tsvsk-\u003esk_odata = inet-\u003esk_data_ready;\n1487:\t\tsvsk-\u003esk_owspace = inet-\u003esk_write_space;\n1488:\t\t/*\n1489:\t\t * This barrier is necessary in order to prevent race condition\n1490:\t\t * with svc_data_ready(), svc_tcp_listen_data_ready(), and others\n1491:\t\t * when calling callbacks above.\n1492:\t\t */\n1493:\t\twmb();\n1494:\t\tinet-\u003esk_user_data = svsk;\n1495:\t\n1496:\t\t/* Initialize the socket */\n1497:\t\tif (sock-\u003etype == SOCK_DGRAM)\n1498:\t\t\tsvc_udp_init(svsk, serv);\n1499:\t\telse\n1500:\t\t\tsvc_tcp_init(svsk, serv);\n1501:\t\n1502:\t\ttrace_svcsock_new(svsk, sock);\n1503:\t\treturn svsk;\n1504:\t}\n1505:\t\n1506:\t/**\n1507:\t * svc_addsock - add a listener socket to an RPC service\n1508:\t * @serv: pointer to RPC service to which to add a new listener\n"
} |
| 21/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 23316 output: 39 thoughts: 766 Thoughts: **Analyzing a Potential Kernel Vulnerability in NFS Server** Okay, let's break this down. My initial assessment is that this patch is addressing a potential vulnerability related to socket ownership within the NFS server, specifically when adding sockets. The code in question, `inet->sk_user_data = svsk;`, highlights a potential overwrite issue. If a socket already has `sk_user_data` assigned (perhaps from another RPC service, KCM, TLS, SCTP, BPF, or a duplicate addition), `svc_setup_socket` could corrupt that ownership or state. The patch itself is straightforward: it adds a check in `svc_addsock`: ```c err = -EBUSY; if (so->sk->sk_user_data) goto out; ``` to prevent the overwrite. Now, I need to confirm if this is reachable and exploitable. First, is this code path accessible? Yes, `svc_addsock` can be called from userspace by writing a file descriptor to `/proc/fs/nfsd/portlist` (nfsctl). This is standard NFS server functionality, and thus reachable. Second, is this code in a core subsystem or a commonly reachable protocol? Absolutely. SunRPC and NFSd are fundamental parts of the Linux kernel's NFS implementation. Third, is this patch "WorthFuzzing"? Definitely. The patch introduces a new validation check within reachable kernel code, specifically in `net/sunrpc/svcsock.c`, making it a prime candidate for fuzzing. Now, let's identify the key focus symbols and necessary configurations. The primary function of interest is `svc_addsock` because that's where the change is. Now, for the caller, is it `__write_ports_addfd`? Yes, it appears to be `__write_ports_addfd` in `fs/nfsd/nfsctl.c`, which calls `svc_addsock`. I'll double-check to make sure there are no other callers of `svc_addsock`. A quick grep confirms this. Let's move onto the Kconfig dependencies. What configurations are required for `svc_addsock` and nfsd to function? By examining `net/sunrpc/Kconfig` and `fs/nfsd/Kconfig`, I see: - `SUNRPC` (either compiled in the kernel or as a module, selected by `NFSD`) - `NFSD` (required to reach `svc_addsock` through `/proc/fs/nfsd/portlist` or write_ports) Furthermore, `NFSD` depends on `MULTIUSER`, which is default 'y', in addition to `SUNRPC` and other select options. To be extra clear: my key focus symbols are: * `svc_addsock` * `__write_ports_addfd` Finally, I'll confirm that `__write_ports_addfd` isn't static in `fs/nfsd/nfsctl.c`. I'll also double check the name of the write function in the code around lines 800-830. |
| 22/2 | 2026/09/03 14:09 | tool | read-file |
0mArgs:{
"File": "fs/nfsd/nfsctl.c",
"FirstLine": 800,
"LineCount": 40
}Results: {
"Contents": " 800:\t\t\tnfsd_destroy_serv(net);\n 801:\t\n 802:\t\treturn err;\n 803:\t}\n 804:\t\n 805:\tstatic ssize_t __write_ports(struct file *file, char *buf, size_t size,\n 806:\t\t\t\t struct net *net)\n 807:\t{\n 808:\t\tif (size == 0)\n 809:\t\t\treturn __write_ports_names(buf, net);\n 810:\t\n 811:\t\tif (isdigit(buf[0]))\n 812:\t\t\treturn __write_ports_addfd(buf, net, file-\u003ef_cred);\n 813:\t\n 814:\t\tif (isalpha(buf[0]))\n 815:\t\t\treturn __write_ports_addxprt(buf, net, file-\u003ef_cred);\n 816:\t\n 817:\t\treturn -EINVAL;\n 818:\t}\n 819:\t\n 820:\t/*\n 821:\t * write_ports - Pass a socket file descriptor or transport name to listen on\n 822:\t *\n 823:\t * Input:\n 824:\t *\t\t\tbuf:\t\tignored\n 825:\t *\t\t\tsize:\t\tzero\n 826:\t * Output:\n 827:\t *\tOn success:\tpassed-in buffer filled with a '\\n'-terminated C\n 828:\t *\t\t\tstring containing a whitespace-separated list of\n 829:\t *\t\t\tnamed NFSD listeners;\n 830:\t *\t\t\treturn code is the size in bytes of the string\n 831:\t *\tOn error:\treturn code is zero or a negative errno value\n 832:\t *\n 833:\t * OR\n 834:\t *\n 835:\t * Input:\n 836:\t *\t\t\tbuf:\t\tC string containing an unsigned\n 837:\t *\t\t\t\t\tinteger value representing a bound\n 838:\t *\t\t\t\t\tbut unconnected socket that is to be\n 839:\t *\t\t\t\t\tused as an NFSD listener; listen(3)\n"
} |
| 23/2 | 2026/09/03 14:09 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 25373 output: 125 thoughts: 82 Thoughts: Here's my thought process on this modification: **Analyzing the `svc_addsock` Modification** Okay, so I'm looking at a patch where the specific function being altered is `svc_addsock`. I need to figure out the impact of this. Based on the file context, the entry point for nfsctl operations here seems to be either `__write_ports_addfd` or potentially `write_ports`. Those are the usual suspects, and I'll need to keep those functions in mind as the likely places where this change will manifest. Now, before I dig too deeply into the code itself, let's just confirm the scope. I'll quickly check if the patch touches any other files. Often these patches will affect a suite of files to achieve the end result. Ah, good, the change is limited to just `net/sunrpc/svcsock.c`. That simplifies things. Alright, I've got the context, I understand the function being modified, and I've confirmed the scope of the change. Time to run the `set-results` tool and start collating my findings. Let's see what that spits out, and then I can dive into the code more methodically. |
| 24/2 | 2026/09/03 14:09 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"SUNRPC",
"NFSD"
],
"FocusSymbols": [
"svc_addsock",
"__write_ports_addfd"
],
"Reasoning": "The patch adds a validation check in `svc_addsock()` to prevent sockets with existing `sk_user_data` from being registered as RPC service listener sockets. This modifies reachable networking/RPC server code accessible from userspace via the NFSD control interface (writing an FD to /proc/fs/nfsd/portlist).",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"SUNRPC",
"NFSD"
],
"FocusSymbols": [
"svc_addsock",
"__write_ports_addfd"
],
"Reasoning": "The patch adds a validation check in `svc_addsock()` to prevent sockets with existing `sk_user_data` from being registered as RPC service listener sockets. This modifies reachable networking/RPC server code accessible from userspace via the NFSD control interface (writing an FD to /proc/fs/nfsd/portlist).",
"WorthFuzzing": true
} |
| 25/1 | 2026/09/03 14:09 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 26/2 | 2026/09/03 14:09 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch adds a validation check in svc_addsock() to ensure so-\u003esk-\u003esk_user_data is NULL before proceeding with svc_setup_socket(), returning -EBUSY if it is already in use. This prevents overwriting sk_user_data and socket callbacks when a socket is already owned, preventing type confusion and use-after-free conditions. The patch does not introduce or modify any uninitialized memory reads, padding/struct copies to userspace, or uninitialized memory logic. Any memory bugs in this path are use-after-free or state corruption issues caught by KASAN, so dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
}Instruction: You are an expert Linux kernel security engineer specializing in kernel memory
error detectors (KASAN and KMSAN). Your job is to review the provided patch series and
determine if the code changes justify spawning a dedicated KMSAN (KernelMemorySanitizer)
fuzzing session in addition to standard KASAN fuzzing.
CRITICAL DISTINCTION BETWEEN KASAN AND KMSAN:
- Standard KASAN kernel builds (upstream-apparmor-kasan.config) already enable
a comprehensive suite of debugging tools and sanitizers, including KASAN
(out-of-bounds accesses, use-after-free, double free, invalid free), LOCKDEP
(locking bugs and deadlocks), UB-sanitizers, and memory corruption checks.
- KMSAN (KernelMemorySanitizer) detects reads of UNINITIALIZED memory (stack, heap,
or page allocations) and kernel-to-user memory info-leaks.
Rule: THERE IS NO SENSE IN RUNNING A KMSAN SESSION IF A BUG CAN BE CAUGHT BY KASAN,
LOCKDEP, OR OTHER STANDARD BUG DETECTORS.
A dedicated KMSAN fuzzing session incurs significant resource costs. You must ONLY
set NeedsKMSAN=true if the code changes introduce or expose UNINITIALIZED MEMORY risks
that are detected ONLY by KMSAN.
Look holistically at the patch series and surrounding code. Even if no direct
uninitialized field accesses or new buffer allocations are added in the diff itself,
a patch may alter control flow, bounds checking, or data length calculations in ways
that change how the rest of the code operates on existing buffers (e.g. allowing
uninitialized stack/heap memory to be read, copied to user space, or used in control
flow). Do not hesitate to use your code access tools to inspect the surrounding code,
called functions, and callers.
Set NeedsKMSAN=true ONLY IF the patch introduces or modifies:
1. Kernel structures sent to user space (via copy_to_user, put_user, netlink skb
attributes, ioctl output arguments, socket options, or BPF buffers) where fields
or structure padding might not be fully initialized/zeroed.
2. Conditional logic or branching that depends on potentially uninitialized variables
or struct fields.
3. Allocation or initialization of complex data structures where uninitialized fields
could be read later in reachable code paths.
4. Bounds checks, lengths, or logic in a way that allows surrounding code to access
uninitialized bytes of existing buffers.
Set NeedsKMSAN=false IF:
- The code changes primarily risk out-of-bounds access, array overflows, NULL pointer
dereferences, locking deadlocks, or use-after-free bugs (these are already caught
by KASAN, LOCKDEP, or standard bug detectors).
- All stack/heap structures touched or introduced by the patch are fully zeroed
or initialized (e.g. using = {0}, memset, kzalloc) before being read or copied.
- The patch does not introduce any risk of uninitialized memory usage or info-leaks.
Use your code access tools to inspect the surrounding code if necessary, then provide
detailed KMSANReasoning contrasting KASAN vs KMSAN applicability for this patch.
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 0bd3dcbaf408516c01a0c6200f15b4457b7cad92
Author: syz-cluster <triage@syzkaller.com>
Date: Thu Sep 3 14:08:45 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 50e5e7f5b762d..e8cc4329f1282 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1541,6 +1541,9 @@ int svc_addsock(struct svc_serv *serv, struct net *net, const int fd,
err = -EISCONN;
if (so->state > SS_UNCONNECTED)
goto out;
+ err = -EBUSY;
+ if (so->sk->sk_user_data)
+ goto out;
err = -ENOENT;
if (!try_module_get(THIS_MODULE))
goto out;
|
| 27/3 | 2026/09/03 14:09 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 2093 output: 39 thoughts: 58 Thoughts: Here's my analysis of the provided text, rendered in the first person, assuming I'm an expert in the field: **Diving into svcsock.c for Patch Analysis** Okay, so we need to analyze this patch, and it looks like the action starts in `net/sunrpc/svcsock.c`. Right, let's get down to brass tacks. The first thing I'm going to do is use my trusty `read-file` command to immediately pull up the code around line 1541 in `net/sunrpc/svcsock.c`. That's the best way to grasp the context of the patch. I need to understand what's happening around that line to see how this change fits in and to assess any potential interactions or dependencies. Context is everything when digging into network code! Once I have the surrounding code, I can make a proper assessment. |
| 28/3 | 2026/09/03 14:09 | tool | read-file |
0mArgs:{
"File": "net/sunrpc/svcsock.c",
"FirstLine": 1520,
"LineCount": 60
}Results: {
"Contents": "1520:\t\t\tchar *name_return, const size_t len, const struct cred *cred)\n1521:\t{\n1522:\t\tint err = 0;\n1523:\t\tstruct socket *so = sockfd_lookup(fd, \u0026err);\n1524:\t\tstruct svc_sock *svsk = NULL;\n1525:\t\tstruct sockaddr_storage addr;\n1526:\t\tstruct sockaddr *sin = (struct sockaddr *)\u0026addr;\n1527:\t\tint salen;\n1528:\t\n1529:\t\tif (!so)\n1530:\t\t\treturn err;\n1531:\t\terr = -EINVAL;\n1532:\t\tif (sock_net(so-\u003esk) != net)\n1533:\t\t\tgoto out;\n1534:\t\terr = -EAFNOSUPPORT;\n1535:\t\tif ((so-\u003esk-\u003esk_family != PF_INET) \u0026\u0026 (so-\u003esk-\u003esk_family != PF_INET6))\n1536:\t\t\tgoto out;\n1537:\t\terr = -EPROTONOSUPPORT;\n1538:\t\tif (so-\u003esk-\u003esk_protocol != IPPROTO_TCP \u0026\u0026\n1539:\t\t so-\u003esk-\u003esk_protocol != IPPROTO_UDP)\n1540:\t\t\tgoto out;\n1541:\t\terr = -EISCONN;\n1542:\t\tif (so-\u003estate \u003e SS_UNCONNECTED)\n1543:\t\t\tgoto out;\n1544:\t\terr = -EBUSY;\n1545:\t\tif (so-\u003esk-\u003esk_user_data)\n1546:\t\t\tgoto out;\n1547:\t\terr = -ENOENT;\n1548:\t\tif (!try_module_get(THIS_MODULE))\n1549:\t\t\tgoto out;\n1550:\t\tsvsk = svc_setup_socket(serv, so, SVC_SOCK_DEFAULTS);\n1551:\t\tif (IS_ERR(svsk)) {\n1552:\t\t\tmodule_put(THIS_MODULE);\n1553:\t\t\terr = PTR_ERR(svsk);\n1554:\t\t\tgoto out;\n1555:\t\t}\n1556:\t\tsalen = kernel_getsockname(svsk-\u003esk_sock, sin);\n1557:\t\tif (salen \u003e= 0)\n1558:\t\t\tsvc_xprt_set_local(\u0026svsk-\u003esk_xprt, sin, salen);\n1559:\t\tsvsk-\u003esk_xprt.xpt_cred = get_cred(cred);\n1560:\t\tsvc_add_new_perm_xprt(serv, \u0026svsk-\u003esk_xprt);\n1561:\t\treturn svc_one_sock_name(svsk, name_return, len);\n1562:\tout:\n1563:\t\tsockfd_put(so);\n1564:\t\treturn err;\n1565:\t}\n1566:\tEXPORT_SYMBOL_GPL(svc_addsock);\n1567:\t\n1568:\t/*\n1569:\t * Create socket for RPC service.\n1570:\t */\n1571:\tstatic struct svc_xprt *svc_create_socket(struct svc_serv *serv,\n1572:\t\t\t\t\t\t int protocol,\n1573:\t\t\t\t\t\t struct net *net,\n1574:\t\t\t\t\t\t struct sockaddr *sin, int len,\n1575:\t\t\t\t\t\t int flags)\n1576:\t{\n1577:\t\tstruct svc_sock\t*svsk;\n1578:\t\tstruct socket\t*sock;\n1579:\t\tint\t\terror;\n"
} |
| 29/3 | 2026/09/03 14:09 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3320 output: 30 thoughts: 54 Thoughts: Okay, let's dive into this. I need to understand this new `svc_addsock` function and, more importantly, the reasoning behind the introduction of this particular check. My immediate instinct is to trace the execution. **Diving into `svc_addsock` and Its Context** First, I see `svc_setup_socket(serv, so, SVC_SOCK_DEFAULTS);`. This is where the socket configuration appears to be happening. I recognize this; I've used this similar call often. Given its central role, I need to check the exact implementation details of `svc_setup_socket`. I need to figure out how it sets up sockets. Hopefully, the source code is well documented. I need to see if there are any subtle side effects or potential gotchas that this new check in `svc_addsock` is attempting to mitigate. Right now, this all seems a little vague until I check the functions that are called. Let's start digging deeper into `svc_setup_socket`. |
| 30/3 | 2026/09/03 14:09 | tool | grepper |
0mArgs:{
"Expression": "svc_setup_socket",
"PathPrefix": "net/sunrpc/"
}Results: {
"Output": "net/sunrpc/svcsock.c=85=enum {\n--\nnet/sunrpc/svcsock.c-88-\nnet/sunrpc/svcsock.c:89:static struct svc_sock *svc_setup_socket(struct svc_serv *, struct socket *,\nnet/sunrpc/svcsock.c-90-\t\t\t\t\t int flags);\n--\nnet/sunrpc/svcsock.c=401=static void svc_data_ready(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-407-\tif (svsk) {\nnet/sunrpc/svcsock.c:408:\t\t/* Refer to svc_setup_socket() for details. */\nnet/sunrpc/svcsock.c-409-\t\trmb();\n--\nnet/sunrpc/svcsock.c=422=static void svc_write_space(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-426-\tif (svsk) {\nnet/sunrpc/svcsock.c:427:\t\t/* Refer to svc_setup_socket() for details. */\nnet/sunrpc/svcsock.c-428-\t\trmb();\n--\nnet/sunrpc/svcsock.c=878=static void svc_tcp_listen_data_ready(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-898-\tif (svsk) {\nnet/sunrpc/svcsock.c:899:\t\t/* Refer to svc_setup_socket() for details. */\nnet/sunrpc/svcsock.c-900-\t\trmb();\n--\nnet/sunrpc/svcsock.c=910=static void svc_tcp_state_change(struct sock *sk)\n--\nnet/sunrpc/svcsock.c-914-\tif (svsk) {\nnet/sunrpc/svcsock.c:915:\t\t/* Refer to svc_setup_socket() for details. */\nnet/sunrpc/svcsock.c-916-\t\trmb();\n--\nnet/sunrpc/svcsock.c=927=static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)\n--\nnet/sunrpc/svcsock.c-959-\nnet/sunrpc/svcsock.c:960:\t/* Reset the inherited callbacks before calling svc_setup_socket */\nnet/sunrpc/svcsock.c-961-\tnewsock-\u003esk-\u003esk_state_change = svsk-\u003esk_ostate;\n--\nnet/sunrpc/svcsock.c-969-\nnet/sunrpc/svcsock.c:970:\tnewsvsk = svc_setup_socket(serv, newsock,\nnet/sunrpc/svcsock.c-971-\t\t\t\t (SVC_SOCK_ANONYMOUS | SVC_SOCK_TEMPORARY));\n--\nnet/sunrpc/svcsock.c=1422=static int svc_sock_sendpages(struct svc_serv *serv, struct socket *sock, int flags)\n--\nnet/sunrpc/svcsock.c-1438- */\nnet/sunrpc/svcsock.c:1439:static struct svc_sock *svc_setup_socket(struct svc_serv *serv,\nnet/sunrpc/svcsock.c-1440-\t\t\t\t\t\tstruct socket *sock,\n--\nnet/sunrpc/svcsock.c=1519=int svc_addsock(struct svc_serv *serv, struct net *net, const int fd,\n--\nnet/sunrpc/svcsock.c-1549-\t\tgoto out;\nnet/sunrpc/svcsock.c:1550:\tsvsk = svc_setup_socket(serv, so, SVC_SOCK_DEFAULTS);\nnet/sunrpc/svcsock.c-1551-\tif (IS_ERR(svsk)) {\n--\nnet/sunrpc/svcsock.c=1571=static struct svc_xprt *svc_create_socket(struct svc_serv *serv,\n--\nnet/sunrpc/svcsock.c-1633-\nnet/sunrpc/svcsock.c:1634:\tsvsk = svc_setup_socket(serv, sock, flags);\nnet/sunrpc/svcsock.c-1635-\tif (IS_ERR(svsk)) {\n"
} |
| 31/3 | 2026/09/03 14:09 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4734 output: 39 thoughts: 47 Thoughts: Here's my take on the process, framed as a first-person expert analysis: **Diving into `svc_setup_socket` and `sk_user_data`** Okay, let's get down to brass tacks. I need to understand exactly how `svc_setup_socket` in `net/sunrpc/svcsock.c` handles `sk_user_data`. This is a critical point for any custom RPC implementation and how we interface with the underlying socket. Grabbing lines 1439-1510 will be the best way to get a solid grasp of it and see how it's used in practice. I need to know: what's being stored there, what context it represents (client, server, individual request, session etc.), and how it's initialized and subsequently accessed/manipulated within the RPC framework. This is crucial for understanding the state machine and connection management logic. I'm hoping to understand if it's holding per-socket-specific RPC context or some more general networking metadata. Time to dig in! |
| 32/3 | 2026/09/03 14:09 | tool | read-file |
0mArgs:{
"File": "net/sunrpc/svcsock.c",
"FirstLine": 1438,
"LineCount": 60
}Results: {
"Contents": "1438:\t */\n1439:\tstatic struct svc_sock *svc_setup_socket(struct svc_serv *serv,\n1440:\t\t\t\t\t\t\tstruct socket *sock,\n1441:\t\t\t\t\t\t\tint flags)\n1442:\t{\n1443:\t\tstruct svc_sock\t*svsk;\n1444:\t\tstruct sock\t*inet;\n1445:\t\tint\t\tpmap_register = !(flags \u0026 SVC_SOCK_ANONYMOUS);\n1446:\t\tint\t\tsendpages;\n1447:\t\tunsigned long\tpages;\n1448:\t\n1449:\t\tsendpages = svc_sock_sendpages(serv, sock, flags);\n1450:\t\tif (sendpages \u003c 0)\n1451:\t\t\treturn ERR_PTR(sendpages);\n1452:\t\n1453:\t\tpages = svc_serv_maxpages(serv);\n1454:\t\tsvsk = kzalloc_flex(*svsk, sk_pages, pages);\n1455:\t\tif (!svsk)\n1456:\t\t\treturn ERR_PTR(-ENOMEM);\n1457:\t\n1458:\t\tif (sendpages) {\n1459:\t\t\tsvsk-\u003esk_bvec = kzalloc_objs(*svsk-\u003esk_bvec, sendpages);\n1460:\t\t\tif (!svsk-\u003esk_bvec) {\n1461:\t\t\t\tkfree(svsk);\n1462:\t\t\t\treturn ERR_PTR(-ENOMEM);\n1463:\t\t\t}\n1464:\t\t}\n1465:\t\n1466:\t\tsvsk-\u003esk_maxpages = pages;\n1467:\t\n1468:\t\tinet = sock-\u003esk;\n1469:\t\n1470:\t\tif (pmap_register) {\n1471:\t\t\tint err;\n1472:\t\n1473:\t\t\terr = svc_register(serv, sock_net(sock-\u003esk), inet-\u003esk_family,\n1474:\t\t\t\t\t inet-\u003esk_protocol,\n1475:\t\t\t\t\t ntohs(inet_sk(inet)-\u003einet_sport));\n1476:\t\t\tif (err \u003c 0) {\n1477:\t\t\t\tkfree(svsk-\u003esk_bvec);\n1478:\t\t\t\tkfree(svsk);\n1479:\t\t\t\treturn ERR_PTR(err);\n1480:\t\t\t}\n1481:\t\t}\n1482:\t\n1483:\t\tsvsk-\u003esk_sock = sock;\n1484:\t\tsvsk-\u003esk_sk = inet;\n1485:\t\tsvsk-\u003esk_ostate = inet-\u003esk_state_change;\n1486:\t\tsvsk-\u003esk_odata = inet-\u003esk_data_ready;\n1487:\t\tsvsk-\u003esk_owspace = inet-\u003esk_write_space;\n1488:\t\t/*\n1489:\t\t * This barrier is necessary in order to prevent race condition\n1490:\t\t * with svc_data_ready(), svc_tcp_listen_data_ready(), and others\n1491:\t\t * when calling callbacks above.\n1492:\t\t */\n1493:\t\twmb();\n1494:\t\tinet-\u003esk_user_data = svsk;\n1495:\t\n1496:\t\t/* Initialize the socket */\n1497:\t\tif (sock-\u003etype == SOCK_DGRAM)\n"
} |
| 33/3 | 2026/09/03 14:09 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5923 output: 161 thoughts: 513 Thoughts: **KMSAN Assessment: This is KASAN territory** Okay, let's break this down. That `svc_addsock` function... it's doing a check, and it's a critical one. If `so->sk->sk_user_data` is already set, it bails out with `-EBUSY`. The problem, as I see it, is that `svc_setup_socket` was overwriting this, which would absolutely stomp on whatever data or subsystem was *already* using that `sk_user_data` field, leading to a classic UAF or, worse, arbitrary pointer or memory corruption. Nasty. That `-EBUSY` check is a crucial safeguard. So, where does this bug sit on the spectrum of memory safety tools? Let's tick through the KMSAN criteria. Does it create or modify any kernel structures that are sent to user space? Nope. No uninitialized variable branching introduced? Also no. Complex data structures with uninitialized fields? Negative. Are any bounds checks altered that would allow access to uninitialized bytes? Not in this case. What's happening here is the prevention of a socket from being reused, or a use-after-free, or `sk_user_data` being overwritten - it's directly leading to type confusion, UAF, and data corruption. That's *textbook* KASAN territory. These are the kinds of memory safety issues KASAN is built to find. There's no uninitialized memory being read, no new exposure of uninitialized memory. It's about data integrity and preventing misuse. Therefore, `NeedsKMSAN` is clearly `false`. Here's my rationale for the change: The patch inserts a check within `svc_addsock()`. This returns `-EBUSY` if the socket is already in use by another part of the system or an RPC service, and this prevents overwriting `sk_user_data`. Preventing this is the *key* here. Overwriting `sk_user_data` could lead to type confusion, use-after-free conditions, or outright memory corruption, which is avoided here. Critically, there are no uninitialized memory reads, stack or heap allocations without initialization, or user-space info leaks introduced or modified by *this* change. The potential problems here, are use-after-free situations or misuse of the socket state, and that sort of stuff is very well handled by KASAN and the standard kernel debugging tools. No need for any special KMSAN fuzzing. Let's call `set-results`. |
| 34/3 | 2026/09/03 14:09 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch adds a validation check in svc_addsock() to ensure so-\u003esk-\u003esk_user_data is NULL before proceeding with svc_setup_socket(), returning -EBUSY if it is already in use. This prevents overwriting sk_user_data and socket callbacks when a socket is already owned, preventing type confusion and use-after-free conditions. The patch does not introduce or modify any uninitialized memory reads, padding/struct copies to userspace, or uninitialized memory logic. Any memory bugs in this path are use-after-free or state corruption issues caught by KASAN, so dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch adds a validation check in svc_addsock() to ensure so-\u003esk-\u003esk_user_data is NULL before proceeding with svc_setup_socket(), returning -EBUSY if it is already in use. This prevents overwriting sk_user_data and socket callbacks when a socket is already owned, preventing type confusion and use-after-free conditions. The patch does not introduce or modify any uninitialized memory reads, padding/struct copies to userspace, or uninitialized memory logic. Any memory bugs in this path are use-after-free or state corruption issues caught by KASAN, so dedicated KMSAN fuzzing is not needed.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|