| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/11 00:42 | flow | patch-triage |
1mArgs:null Results: {
"EnableConfigs": [
"INET_PSP",
"TLS",
"TLS_DEVICE",
"NETDEVSIM"
],
"FocusSymbols": [
"sk_has_decrypt_user",
"tcp_set_ulp",
"__tcp_set_ulp",
"psp_sock_assoc_set_rx",
"psp_nl_rx_assoc_doit"
],
"KMSANReasoning": "The patch adds mutual exclusivity checks (sk_has_decrypt_user and sk_has_validate_xmit_skb) to prevent incompatible socket states when configuring TCP ULP (e.g. kTLS) and PSP (PSP security protocol) on the same socket. \n\nIt does not introduce or modify any data structures, allocations, or copies to user space, nor does it access or expose any uninitialized memory. Standard testing and sanitizers like KASAN are sufficient to catch any memory safety or state management issues. A dedicated KMSAN session is not needed.",
"NeedsKMSAN": false,
"Reasoning": "The patch introduces socket state exclusivity checks between PSP (PSP Security Protocol) socket associations, TCP ULP (e.g., kTLS), and sockets with transmit validation handlers (sk_validate_xmit_skb). It adds sk_has_decrypt_user() and sk_has_validate_xmit_skb() validations in __tcp_set_ulp() and psp_sock_assoc_set_rx() to prevent conflicting socket offload states. These code paths are reachable via TCP setsockopt(TCP_ULP) and PSP Netlink commands.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/11 00:42 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 3b4f22e1d2e2fb823d82bb64a1e19434847512c0\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Sep 11 00:42:56 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/include/net/sock.h b/include/net/sock.h\nindex 51185222aac29..ba5e5092f192c 100644\n--- a/include/net/sock.h\n+++ b/include/net/sock.h\n@@ -2312,6 +2312,17 @@ static inline void sk_gso_disable(struct sock *sk)\n \tsk-\u003esk_route_caps \u0026= ~NETIF_F_GSO_MASK;\n }\n \n+static inline bool sk_has_validate_xmit_skb(const struct sock *sk)\n+{\n+#ifdef CONFIG_SOCK_VALIDATE_XMIT\n+\treturn !!sk-\u003esk_validate_xmit_skb;\n+#else\n+\treturn false;\n+#endif\n+}\n+\n+bool sk_has_decrypt_user(const struct sock *sk);\n+\n static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,\n \t\t\t\t\t struct iov_iter *from, char *to,\n \t\t\t\t\t int copy, int offset)\ndiff --git a/net/core/sock.c b/net/core/sock.c\nindex fa60b7494c586..9489d9c479493 100644\n--- a/net/core/sock.c\n+++ b/net/core/sock.c\n@@ -142,6 +142,7 @@\n \n #include \u003ctrace/events/sock.h\u003e\n \n+#include \u003cnet/psp.h\u003e\n #include \u003cnet/tcp.h\u003e\n #include \u003cnet/busy_poll.h\u003e\n #include \u003cnet/phonet/phonet.h\u003e\n@@ -2670,6 +2671,12 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst)\n }\n EXPORT_SYMBOL_GPL(sk_setup_caps);\n \n+bool sk_has_decrypt_user(const struct sock *sk)\n+{\n+\treturn psp_sk_assoc(sk) ||\n+\t (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)); /* for tls */\n+}\n+\n /*\n *\tSimple resource managers for sockets.\n */\ndiff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c\nindex 2aa442128630e..f3e0c9d379bb6 100644\n--- a/net/ipv4/tcp_ulp.c\n+++ b/net/ipv4/tcp_ulp.c\n@@ -136,6 +136,10 @@ static int __tcp_set_ulp(struct sock *sk, const struct tcp_ulp_ops *ulp_ops)\n \tif (icsk-\u003eicsk_ulp_ops)\n \t\tgoto out_err;\n \n+\terr = -EINVAL;\n+\tif (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk))\n+\t\tgoto out_err;\n+\n \tif (sk-\u003esk_socket)\n \t\tclear_bit(SOCK_SUPPORT_ZC, \u0026sk-\u003esk_socket-\u003eflags);\n \ndiff --git a/net/psp/psp_sock.c b/net/psp/psp_sock.c\nindex 1a2a6b7516b0f..509035617894a 100644\n--- a/net/psp/psp_sock.c\n+++ b/net/psp/psp_sock.c\n@@ -143,6 +143,10 @@ int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,\n \t\tNL_SET_ERR_MSG(extack, \"Socket already has PSP state\");\n \t\terr = -EBUSY;\n \t\tgoto exit_unlock;\n+\t} else if (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk)) {\n+\t\tNL_SET_ERR_MSG(extack, \"Socket has incompatible state\");\n+\t\terr = -EINVAL;\n+\t\tgoto exit_unlock;\n \t}\n \n \trefcount_inc(\u0026pas-\u003erefcnt);\ndiff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config\nindex b6989c7d3d9d1..4838adf27fa1b 100644\n--- a/tools/testing/selftests/drivers/net/config\n+++ b/tools/testing/selftests/drivers/net/config\n@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y\n CONFIG_NET_SCH_PRIO=m\n CONFIG_PPP=y\n CONFIG_PPPOE=y\n+CONFIG_TLS=y\n CONFIG_VLAN_8021Q=m\n CONFIG_XDP_SOCKETS=y\ndiff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py\nindex 315648a770d00..12b27f2a3fa1b 100755\n--- a/tools/testing/selftests/drivers/net/psp.py\n+++ b/tools/testing/selftests/drivers/net/psp.py\n@@ -23,6 +23,8 @@ from lib.py import NetNSEnter\n from lib.py import bkg, rand_port, wait_port_listen\n from lib.py import ip\n \n+TCP_ULP = 31\n+\n \n def _get_outq(s):\n one = b'\\0' * 4\n@@ -333,6 +335,50 @@ def assoc_version_mismatch(cfg):\n ksft_eq(the_exception.nl_msg.error, -errno.EINVAL)\n \n \n+def _require_tls_ulp():\n+ with socket.create_server((\"localhost\", 0)) as srv:\n+ with socket.create_connection(srv.getsockname()) as s:\n+ try:\n+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b\"tls\")\n+ except OSError as exc:\n+ raise KsftSkipEx(\"kTLS not available\") from exc\n+\n+\n+def assoc_psp_ulp_exclusive(cfg):\n+ \"\"\" Test that a TCP ULP cannot be attached to a PSP socket \"\"\"\n+ _init_psp_dev(cfg)\n+ _require_tls_ulp()\n+\n+ with _make_clr_conn(cfg) as s:\n+ try:\n+ cfg.pspnl.rx_assoc({\"version\": 0,\n+ \"dev-id\": cfg.psp_dev_id,\n+ \"sock-fd\": s.fileno()})\n+ with ksft_raises(OSError) as cm:\n+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b\"tls\")\n+ ksft_eq(cm.exception.errno, errno.EINVAL)\n+ finally:\n+ _close_conn(cfg, s)\n+\n+\n+def assoc_ulp_psp_exclusive(cfg):\n+ \"\"\" Test that a PSP assoc cannot be added to a socket with a TCP ULP \"\"\"\n+ _init_psp_dev(cfg)\n+ _require_tls_ulp()\n+\n+ with _make_clr_conn(cfg) as s:\n+ try:\n+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b\"tls\")\n+ with ksft_raises(NlError) as cm:\n+ cfg.pspnl.rx_assoc({\"version\": 0,\n+ \"dev-id\": cfg.psp_dev_id,\n+ \"sock-fd\": s.fileno()})\n+ ksft_eq(cm.exception.nl_msg.error, -errno.EINVAL)\n+ ksft_eq(cm.exception.nl_msg.extack['bad-attr'], \".sock-fd\")\n+ finally:\n+ _close_conn(cfg, s)\n+\n+\n def assoc_twice(cfg):\n \"\"\" Test reusing Tx assoc for two sockets \"\"\"\n _init_psp_dev(cfg)\n"
} |
| 2/1 | 2026/09/11 00:43 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"INET_PSP",
"TLS",
"TLS_DEVICE",
"NETDEVSIM"
],
"FocusSymbols": [
"sk_has_decrypt_user",
"tcp_set_ulp",
"__tcp_set_ulp",
"psp_sock_assoc_set_rx",
"psp_nl_rx_assoc_doit"
],
"Reasoning": "The patch introduces socket state exclusivity checks between PSP (PSP Security Protocol) socket associations, TCP ULP (e.g., kTLS), and sockets with transmit validation handlers (sk_validate_xmit_skb). It adds sk_has_decrypt_user() and sk_has_validate_xmit_skb() validations in __tcp_set_ulp() and psp_sock_assoc_set_rx() to prevent conflicting socket offload states. These code paths are reachable via TCP setsockopt(TCP_ULP) and PSP Netlink commands.",
"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 3b4f22e1d2e2fb823d82bb64a1e19434847512c0
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 11 00:42:56 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/net/sock.h b/include/net/sock.h
index 51185222aac29..ba5e5092f192c 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2312,6 +2312,17 @@ static inline void sk_gso_disable(struct sock *sk)
sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
}
+static inline bool sk_has_validate_xmit_skb(const struct sock *sk)
+{
+#ifdef CONFIG_SOCK_VALIDATE_XMIT
+ return !!sk->sk_validate_xmit_skb;
+#else
+ return false;
+#endif
+}
+
+bool sk_has_decrypt_user(const struct sock *sk);
+
static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
struct iov_iter *from, char *to,
int copy, int offset)
diff --git a/net/core/sock.c b/net/core/sock.c
index fa60b7494c586..9489d9c479493 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -142,6 +142,7 @@
#include <trace/events/sock.h>
+#include <net/psp.h>
#include <net/tcp.h>
#include <net/busy_poll.h>
#include <net/phonet/phonet.h>
@@ -2670,6 +2671,12 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
}
EXPORT_SYMBOL_GPL(sk_setup_caps);
+bool sk_has_decrypt_user(const struct sock *sk)
+{
+ return psp_sk_assoc(sk) ||
+ (sk_is_inet(sk) && inet_csk_has_ulp(sk)); /* for tls */
+}
+
/*
* Simple resource managers for sockets.
*/
diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c
index 2aa442128630e..f3e0c9d379bb6 100644
--- a/net/ipv4/tcp_ulp.c
+++ b/net/ipv4/tcp_ulp.c
@@ -136,6 +136,10 @@ static int __tcp_set_ulp(struct sock *sk, const struct tcp_ulp_ops *ulp_ops)
if (icsk->icsk_ulp_ops)
goto out_err;
+ err = -EINVAL;
+ if (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk))
+ goto out_err;
+
if (sk->sk_socket)
clear_bit(SOCK_SUPPORT_ZC, &sk->sk_socket->flags);
diff --git a/net/psp/psp_sock.c b/net/psp/psp_sock.c
index 1a2a6b7516b0f..509035617894a 100644
--- a/net/psp/psp_sock.c
+++ b/net/psp/psp_sock.c
@@ -143,6 +143,10 @@ int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,
NL_SET_ERR_MSG(extack, "Socket already has PSP state");
err = -EBUSY;
goto exit_unlock;
+ } else if (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk)) {
+ NL_SET_ERR_MSG(extack, "Socket has incompatible state");
+ err = -EINVAL;
+ goto exit_unlock;
}
refcount_inc(&pas->refcnt);
diff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config
index b6989c7d3d9d1..4838adf27fa1b 100644
--- a/tools/testing/selftests/drivers/net/config
+++ b/tools/testing/selftests/drivers/net/config
@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCH_PRIO=m
CONFIG_PPP=y
CONFIG_PPPOE=y
+CONFIG_TLS=y
CONFIG_VLAN_8021Q=m
CONFIG_XDP_SOCKETS=y
diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py
index 315648a770d00..12b27f2a3fa1b 100755
--- a/tools/testing/selftests/drivers/net/psp.py
+++ b/tools/testing/selftests/drivers/net/psp.py
@@ -23,6 +23,8 @@ from lib.py import NetNSEnter
from lib.py import bkg, rand_port, wait_port_listen
from lib.py import ip
+TCP_ULP = 31
+
def _get_outq(s):
one = b'\0' * 4
@@ -333,6 +335,50 @@ def assoc_version_mismatch(cfg):
ksft_eq(the_exception.nl_msg.error, -errno.EINVAL)
+def _require_tls_ulp():
+ with socket.create_server(("localhost", 0)) as srv:
+ with socket.create_connection(srv.getsockname()) as s:
+ try:
+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+ except OSError as exc:
+ raise KsftSkipEx("kTLS not available") from exc
+
+
+def assoc_psp_ulp_exclusive(cfg):
+ """ Test that a TCP ULP cannot be attached to a PSP socket """
+ _init_psp_dev(cfg)
+ _require_tls_ulp()
+
+ with _make_clr_conn(cfg) as s:
+ try:
+ cfg.pspnl.rx_assoc({"version": 0,
+ "dev-id": cfg.psp_dev_id,
+ "sock-fd": s.fileno()})
+ with ksft_raises(OSError) as cm:
+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+ ksft_eq(cm.exception.errno, errno.EINVAL)
+ finally:
+ _close_conn(cfg, s)
+
+
+def assoc_ulp_psp_exclusive(cfg):
+ """ Test that a PSP assoc cannot be added to a socket with a TCP ULP """
+ _init_psp_dev(cfg)
+ _require_tls_ulp()
+
+ with _make_clr_conn(cfg) as s:
+ try:
+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+ with ksft_raises(NlError) as cm:
+ cfg.pspnl.rx_assoc({"version": 0,
+ "dev-id": cfg.psp_dev_id,
+ "sock-fd": s.fileno()})
+ ksft_eq(cm.exception.nl_msg.error, -errno.EINVAL)
+ ksft_eq(cm.exception.nl_msg.extack['bad-attr'], ".sock-fd")
+ finally:
+ _close_conn(cfg, s)
+
+
def assoc_twice(cfg):
""" Test reusing Tx assoc for two sockets """
_init_psp_dev(cfg)
|
| 3/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 4743 output: 17 thoughts: 200 Thoughts: **Assessing the Fuzzing Potential of This Patch Series** Okay, so I've been given a patch series and asked to determine if it's a good candidate for fuzzing with syzkaller. My immediate thought is, let's dive in. The first step is to quickly analyze the changes. Looks like we've got modifications to `include/net/sock.h`, `net/core/sock.c`, `net/ipv4/tcp_ulp.c`, `net/psp/psp_sock.c`, and some selftests. The addition of `sk_has_validate_xmit_skb` and `sk_has_decrypt_user` in `sock.h` and their subsequent definition and use, along with the checks in `__tcp_set_ulp` and `psp_sock_assoc_set_rx`, are the breadcrumbs. It seems we're dealing with something related to socket handling, potentially encryption or some kind of packet processing with PSP, and it makes me think about potential for interesting behaviors, and possible vulnerabilities. To properly gauge the fuzzing potential, I need a deeper understanding of this PSP part. I need to figure out what PSP actually *is*. What configuration flags are involved? What other code calls these functions or uses these structures? We'll need to identify the focus symbols and the necessary configurations for a full evaluation. Time to dust off the `git grep` skills and start hunting down relevant code within the kernel. I'll be looking for references to PSP, any related configuration options, and anything that might give insight into how these new functions are used. We need to identify all relevant entry points for fuzzing. This should get us a good picture of the attack surface here and if this deserves more attention. |
| 4/2 | 2026/09/11 00:43 | tool | grepper |
0mError:no matches Args: {
"Expression": "CONFIG_PSP"
}Results: {
"error": "no matches"
} |
| 5/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5348 output: 21 thoughts: 17 Thoughts: Here's my summary, as I see it: **Digging into the `net/psp/` Directory** Okay, so I need to understand how this network functionality is configured and built. My first move is to head straight into the `net/psp/` directory. This seems like the logical place to start digging for the core of the implementation. I'm going to want to understand its configuration options, any dependencies it might have, and how it gets integrated into the overall build process. To do that, I'm going to zero in on either a Kconfig file, or potentially a Makefile, within this directory. Those are the usual suspects. Depending on what I find, I'll then move onto analysing other files and directories, but these are my starting points. |
| 6/2 | 2026/09/11 00:43 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "net/psp"
}Results: {
"Files": [
"psp-nl-gen.c",
"psp-nl-gen.h",
"psp.h",
"psp_main.c",
"psp_nl.c",
"psp_sock.c"
],
"Subdirs": null
} |
| 7/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5612 output: 24 thoughts: 26 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Investigating the Build Process for `net/psp`** Alright, so I need to figure out how the `net/psp` directory, and presumably its code, gets built into the kernel. The most logical place to start digging would be within the network subsystem's configuration and build files. My first instinct is to check `net/Kconfig` to see if there's a configuration option that enables `net/psp`. Then, I'll need to look at `net/Makefile` to understand the build rules and dependencies. Knowing which Kconfig option enables it will help me find the associated `obj-` lines in the Makefile and see how the source files within `net/psp` are compiled, linked, and incorporated into the kernel image. I need to understand the big picture; is this a module, built-in, or something else entirely? Ultimately, understanding the build process is key to modifying, debugging, or enabling this functionality. |
| 8/2 | 2026/09/11 00:43 | tool | grepper |
0mArgs:{
"Expression": "psp",
"PathPrefix": "net/Makefile"
}Results: {
"Output": "net/Makefile=20=obj-$(CONFIG_UNIX)\t\t+= unix/\nnet/Makefile:21:obj-$(CONFIG_INET_PSP)\t\t+= psp/\nnet/Makefile-22-obj-y\t\t\t\t+= ipv6/\n"
} |
| 9/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 5951 output: 17 thoughts: 30 Thoughts: Here's my take on those thoughts: **Investigating the Configuration for PSP Support** Okay, so I need to figure out if PSP is enabled. My first instinct is to dive into the kernel configuration files. I'll start by checking `CONFIG_INET_PSP`. I know the networking configuration is spread across a few different `Kconfig` files – it's likely in `net/Kconfig`, `net/ipv4/Kconfig`, or something similar. I'll need to look through those to pinpoint where `CONFIG_INET_PSP` is defined and what its dependencies might be. Time to get my grep on and navigate those config structures! Let's see what we can find. |
| 10/2 | 2026/09/11 00:43 | tool | grepper |
0mArgs:{
"Expression": "INET_PSP"
}Results: {
"Output": "drivers/net/ethernet/mellanox/mlx5/core/Kconfig=210=config MLX5_EN_PSP\ndrivers/net/ethernet/mellanox/mlx5/core/Kconfig-211-\tbool \"Mellanox Technologies support for PSP cryptography-offload acceleration\"\ndrivers/net/ethernet/mellanox/mlx5/core/Kconfig:212:\tdepends on INET_PSP\ndrivers/net/ethernet/mellanox/mlx5/core/Kconfig-213-\tdepends on MLX5_CORE_EN\n--\ndrivers/net/netdevsim/Makefile=19=endif\ndrivers/net/netdevsim/Makefile-20-\ndrivers/net/netdevsim/Makefile:21:ifneq ($(CONFIG_INET_PSP),)\ndrivers/net/netdevsim/Makefile-22-netdevsim-objs += psp.o\n--\ndrivers/net/netdevsim/netdevsim.h=445=static inline void nsim_macsec_teardown(struct netdevsim *ns)\n--\ndrivers/net/netdevsim/netdevsim.h-449-\ndrivers/net/netdevsim/netdevsim.h:450:#if IS_ENABLED(CONFIG_INET_PSP)\ndrivers/net/netdevsim/netdevsim.h-451-int nsim_psp_init(struct netdevsim *ns);\n--\ninclude/linux/netdevice.h=2158=struct net_device {\n--\ninclude/linux/netdevice.h-2388-#endif\ninclude/linux/netdevice.h:2389:#if IS_ENABLED(CONFIG_INET_PSP)\ninclude/linux/netdevice.h-2390-\tstruct psp_dev __rcu\t*psp_dev;\n--\ninclude/linux/skbuff.h=5043=enum skb_ext_id {\n--\ninclude/linux/skbuff.h-5058-#endif\ninclude/linux/skbuff.h:5059:#if IS_ENABLED(CONFIG_INET_PSP)\ninclude/linux/skbuff.h-5060-\tSKB_EXT_PSP,\n--\ninclude/net/inet_timewait_sock.h=33=struct inet_timewait_sock {\n--\ninclude/net/inet_timewait_sock.h-84-\tstruct inet_bind2_bucket\t*tw_tb2;\ninclude/net/inet_timewait_sock.h:85:#if IS_ENABLED(CONFIG_INET_PSP)\ninclude/net/inet_timewait_sock.h-86-\tstruct psp_assoc __rcu\t *psp_assoc;\n--\ninclude/net/psp/functions.h=27=static inline void *psp_assoc_drv_data(struct psp_assoc *pas)\n--\ninclude/net/psp/functions.h-31-\ninclude/net/psp/functions.h:32:#if IS_ENABLED(CONFIG_INET_PSP)\ninclude/net/psp/functions.h-33-unsigned int psp_key_size(u32 version);\n--\ninclude/net/sock.h=365=struct sock {\n--\ninclude/net/sock.h-466-#endif\ninclude/net/sock.h:467:#if IS_ENABLED(CONFIG_INET_PSP)\ninclude/net/sock.h-468-\tstruct psp_assoc __rcu\t*psp_assoc;\n--\nnet/Makefile=20=obj-$(CONFIG_UNIX)\t\t+= unix/\nnet/Makefile:21:obj-$(CONFIG_INET_PSP)\t\t+= psp/\nnet/Makefile-22-obj-y\t\t\t\t+= ipv6/\n--\nnet/core/skbuff.c=5150=static const u8 skb_ext_type_len[] = {\n--\nnet/core/skbuff.c-5165-#endif\nnet/core/skbuff.c:5166:#if IS_ENABLED(CONFIG_INET_PSP)\nnet/core/skbuff.c-5167-\t[SKB_EXT_PSP] = SKB_EXT_CHUNKSIZEOF(struct psp_skb_ext),\n--\nnet/core/sock.c=2480=struct sock *sk_clone(const struct sock *sk, const gfp_t priority,\n--\nnet/core/sock.c-2497-#endif\nnet/core/sock.c:2498:#if IS_ENABLED(CONFIG_INET_PSP)\nnet/core/sock.c-2499-\tRCU_INIT_POINTER(newsk-\u003epsp_assoc, NULL);\n--\nnet/psp/Kconfig-4-#\nnet/psp/Kconfig:5:config INET_PSP\nnet/psp/Kconfig-6-\tbool \"PSP Security Protocol support\"\n--\nnet/psp/Makefile-2-\nnet/psp/Makefile:3:obj-$(CONFIG_INET_PSP) += psp.o\nnet/psp/Makefile-4-\n--\ntools/testing/selftests/drivers/net/config=3=CONFIG_DEBUG_INFO_BTF_MODULES=n\ntools/testing/selftests/drivers/net/config:4:CONFIG_INET_PSP=y\ntools/testing/selftests/drivers/net/config-5-CONFIG_IPV6=y\n"
} |
| 11/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 7462 output: 32 thoughts: 12 Thoughts: Here's a summary of my thought process, as if I were the one thinking it: **Diving into the PSP Kconfig** Alright, time to get started. My initial instinct is to go straight to `net/psp/Kconfig`. It's the logical place to begin, given what we're working on. I need to understand the configuration options related to the PSP network stack first. Knowing the available parameters and their dependencies will be crucial for the work ahead. This Kconfig file should give me a good overview of the design choices and potentially reveal any existing limitations or features that might influence my approach. Let's see what we can learn. |
| 12/2 | 2026/09/11 00:43 | tool | read-file |
0mArgs:{
"File": "net/psp/Kconfig",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# PSP configuration\n 4:\t#\n 5:\tconfig INET_PSP\n 6:\t\tbool \"PSP Security Protocol support\"\n 7:\t\tdepends on INET\n 8:\t\tselect SKB_DECRYPTED\n 9:\t\tselect SKB_EXTENSIONS\n 10:\t\tselect SOCK_VALIDATE_XMIT\n 11:\t\thelp\n 12:\t\tEnable kernel support for the PSP Security Protocol (PSP).\n 13:\t\tFor more information see:\n 14:\t\t https://raw.githubusercontent.com/google/psp/main/doc/PSP_Arch_Spec.pdf\n 15:\t\n 16:\t\tIf unsure, say N.\n"
} |
| 13/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 7848 output: 21 thoughts: 18 Thoughts: Here's my summary, as though I'm thinking through it: **Checking Socket Transmission Validation** Okay, so we're diving into this network code, and before we proceed too far, I need to make sure we've looked at the implications of `CONFIG_SOCK_VALIDATE_XMIT`. It's crucial we don't overlook this particular configuration option; its impact on the data transmission flow could be significant. It's often easy to miss details, so a quick check now could save a big headache later on. Let's trace how that's handled. Good practice is to always account for this kind of configuration option early in the process. |
| 14/2 | 2026/09/11 00:43 | tool | grepper |
0mArgs:{
"Expression": "SOCK_VALIDATE_XMIT"
}Results: {
"Output": "include/net/inet_timewait_sock.h=33=struct inet_timewait_sock {\n--\ninclude/net/inet_timewait_sock.h-87-#endif\ninclude/net/inet_timewait_sock.h:88:#ifdef CONFIG_SOCK_VALIDATE_XMIT\ninclude/net/inet_timewait_sock.h-89-\tstruct sk_buff*\t\t(*tw_validate_xmit_skb)(struct sock *sk,\n--\ninclude/net/sock.h=365=struct sock {\n--\ninclude/net/sock.h-515-\tnetdev_features_t\tsk_route_caps;\ninclude/net/sock.h:516:#ifdef CONFIG_SOCK_VALIDATE_XMIT\ninclude/net/sock.h-517-\tstruct sk_buff*\t\t(*sk_validate_xmit_skb)(struct sock *sk,\n--\ninclude/net/sock.h=2315=static inline bool sk_has_validate_xmit_skb(const struct sock *sk)\ninclude/net/sock.h-2316-{\ninclude/net/sock.h:2317:#ifdef CONFIG_SOCK_VALIDATE_XMIT\ninclude/net/sock.h-2318-\treturn !!sk-\u003esk_validate_xmit_skb;\n--\nnet/Kconfig=465=config GRO_CELLS\n--\nnet/Kconfig-468-\nnet/Kconfig:469:config SOCK_VALIDATE_XMIT\nnet/Kconfig-470-\tbool\n--\nnet/core/dev.c=4011=static struct sk_buff *sk_validate_xmit_skb(struct sk_buff *skb,\n--\nnet/core/dev.c-4013-{\nnet/core/dev.c:4014:#ifdef CONFIG_SOCK_VALIDATE_XMIT\nnet/core/dev.c-4015-\tstruct sk_buff *(*sk_validate)(struct sock *sk, struct net_device *dev,\n--\nnet/ipv4/inet_timewait_sock.c=168=struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,\n--\nnet/ipv4/inet_timewait_sock.c-204-\t\ttimer_setup(\u0026tw-\u003etw_timer, tw_timer_handler, 0);\nnet/ipv4/inet_timewait_sock.c:205:#ifdef CONFIG_SOCK_VALIDATE_XMIT\nnet/ipv4/inet_timewait_sock.c-206-\t\ttw-\u003etw_validate_xmit_skb = NULL;\n--\nnet/psp/Kconfig=5=config INET_PSP\n--\nnet/psp/Kconfig-9-\tselect SKB_EXTENSIONS\nnet/psp/Kconfig:10:\tselect SOCK_VALIDATE_XMIT\nnet/psp/Kconfig-11-\thelp\n--\nnet/tls/Kconfig=19=config TLS_DEVICE\n--\nnet/tls/Kconfig-22-\tselect SKB_DECRYPTED\nnet/tls/Kconfig:23:\tselect SOCK_VALIDATE_XMIT\nnet/tls/Kconfig-24-\tselect SOCK_RX_QUEUE_MAPPING\n"
} |
| 15/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 8842 output: 38 thoughts: 304 Thoughts: **Analyzing Patch Changes for Network Socket Functionality** Okay, let's dive into these patch changes. I see we're modifying the socket-related code, specifically focusing on data validation and potential decryption functionalities. The first change, in `include/net/sock.h`, introduces a helper function, `sk_has_validate_xmit_skb`. This seems to check for a specific `sk_validate_xmit_skb` flag, likely controlled by a `CONFIG_SOCK_VALIDATE_XMIT` preprocessor define. Makes sense; conditional compilation for performance and feature enablement. If the flag is set, it's checking if the socket is configured to validate SKBs during transmission. Next, in `net/core/sock.c`, the `sk_has_decrypt_user` function's definition reveals its logic. It's checking if a socket is associated with a PSP (presumably some kind of protection scheme) *or* if it's an internet socket with a configured ULP (User-Level Protocol), likely for TLS support. Interesting interplay between different security layers and protocol handlers. Finally, the most interesting change is in `net/ipv4/tcp_ulp.c`, within the `__tcp_set_ulp` function. It seems to be preventing the setting of a ULP if either `sk_has_decrypt_user` *or* `sk_has_validate_xmit_skb` returns true. The code includes a check that throws an `EINVAL` error and jumps out if the aforementioned functions evaluate to true. Therefore, this patch is establishing a constraint on when ULP (specifically TLS) can be applied to TCP sockets. It seems we're guarding against situations where the socket's data needs to be validated or decrypted. This probably means a specific data validation or security scheme is already enabled on that socket and the ULP setup would be redundant or would cause issues (possibly due to incompatible security models or an order of operations conflict). I need to dig deeper into the broader context of `__tcp_set_ulp` to understand the full implications and the exact reasoning behind this constraint. It seems we are trying to prevent a potential conflict or security vulnerability. |
| 16/2 | 2026/09/11 00:43 | tool | read-file |
0mArgs:{
"File": "net/ipv4/tcp_ulp.c",
"FirstLine": 120,
"LineCount": 50
}Results: {
"Contents": " 120:\t\tif (!icsk-\u003eicsk_ulp_ops)\n 121:\t\t\treturn;\n 122:\t\n 123:\t\tif (icsk-\u003eicsk_ulp_ops-\u003erelease)\n 124:\t\t\ticsk-\u003eicsk_ulp_ops-\u003erelease(sk);\n 125:\t\tmodule_put(icsk-\u003eicsk_ulp_ops-\u003eowner);\n 126:\t\n 127:\t\ticsk-\u003eicsk_ulp_ops = NULL;\n 128:\t}\n 129:\t\n 130:\tstatic int __tcp_set_ulp(struct sock *sk, const struct tcp_ulp_ops *ulp_ops)\n 131:\t{\n 132:\t\tstruct inet_connection_sock *icsk = inet_csk(sk);\n 133:\t\tint err;\n 134:\t\n 135:\t\terr = -EEXIST;\n 136:\t\tif (icsk-\u003eicsk_ulp_ops)\n 137:\t\t\tgoto out_err;\n 138:\t\n 139:\t\terr = -EINVAL;\n 140:\t\tif (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk))\n 141:\t\t\tgoto out_err;\n 142:\t\n 143:\t\tif (sk-\u003esk_socket)\n 144:\t\t\tclear_bit(SOCK_SUPPORT_ZC, \u0026sk-\u003esk_socket-\u003eflags);\n 145:\t\n 146:\t\terr = -ENOTCONN;\n 147:\t\tif (!ulp_ops-\u003eclone \u0026\u0026 sk-\u003esk_state == TCP_LISTEN)\n 148:\t\t\tgoto out_err;\n 149:\t\n 150:\t\terr = ulp_ops-\u003einit(sk);\n 151:\t\tif (err)\n 152:\t\t\tgoto out_err;\n 153:\t\n 154:\t\ticsk-\u003eicsk_ulp_ops = ulp_ops;\n 155:\t\treturn 0;\n 156:\tout_err:\n 157:\t\tmodule_put(ulp_ops-\u003eowner);\n 158:\t\treturn err;\n 159:\t}\n 160:\t\n 161:\tint tcp_set_ulp(struct sock *sk, const char *name)\n 162:\t{\n 163:\t\tconst struct tcp_ulp_ops *ulp_ops;\n 164:\t\n 165:\t\tsock_owned_by_me(sk);\n 166:\t\n 167:\t\tulp_ops = __tcp_ulp_find_autoload(name);\n 168:\t\tif (!ulp_ops)\n 169:\t\t\treturn -ENOENT;\n"
} |
| 17/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 10371 output: 37 thoughts: 28 Thoughts: Here's my take on the thought process, as if it were my own: **Investigating Network Socket Association** Okay, so we're diving back into the `net/psp` directory. Specifically, I'm thinking we need to check out `psp_sock.c` and zero in on the `psp_sock_assoc_set_rx` function. My instinct is that this area is crucial for understanding how the system sets up and manages the association between sockets and receive paths. We need to really understand the implications of that association, and how it is managed within the receive processing path. Let's see if this function reveals something we're missing. I suspect a detailed review of this section might provide insights into the root cause we are chasing. |
| 18/2 | 2026/09/11 00:43 | tool | read-file |
0mArgs:{
"File": "net/psp/psp_sock.c",
"FirstLine": 130,
"LineCount": 40
}Results: {
"Contents": " 130:\t}\n 131:\t\n 132:\tint psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,\n 133:\t\t\t\t struct psp_key_parsed *key,\n 134:\t\t\t\t struct netlink_ext_ack *extack)\n 135:\t{\n 136:\t\tint err;\n 137:\t\n 138:\t\tmemcpy(\u0026pas-\u003erx, key, sizeof(*key));\n 139:\t\n 140:\t\tlock_sock(sk);\n 141:\t\n 142:\t\tif (psp_sk_assoc(sk)) {\n 143:\t\t\tNL_SET_ERR_MSG(extack, \"Socket already has PSP state\");\n 144:\t\t\terr = -EBUSY;\n 145:\t\t\tgoto exit_unlock;\n 146:\t\t} else if (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk)) {\n 147:\t\t\tNL_SET_ERR_MSG(extack, \"Socket has incompatible state\");\n 148:\t\t\terr = -EINVAL;\n 149:\t\t\tgoto exit_unlock;\n 150:\t\t}\n 151:\t\n 152:\t\trefcount_inc(\u0026pas-\u003erefcnt);\n 153:\t\trcu_assign_pointer(sk-\u003epsp_assoc, pas);\n 154:\t\terr = 0;\n 155:\t\n 156:\texit_unlock:\n 157:\t\trelease_sock(sk);\n 158:\t\n 159:\t\treturn err;\n 160:\t}\n 161:\t\n 162:\tstatic int psp_sock_recv_queue_check(struct sock *sk, struct psp_assoc *pas)\n 163:\t{\n 164:\t\tstruct psp_skb_ext *pse;\n 165:\t\tstruct sk_buff *skb;\n 166:\t\n 167:\t\tskb_rbtree_walk(skb, \u0026tcp_sk(sk)-\u003eout_of_order_queue) {\n 168:\t\t\tpse = skb_ext_find(skb, SKB_EXT_PSP);\n 169:\t\t\tif (!psp_pse_matches_pas(pse, pas))\n"
} |
| 19/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 11210 output: 23 thoughts: 39 Thoughts: Okay, here's my take on those thoughts, framed as my own mental process, given my expertise: **Diving into the PSP Socket Association Logic** Alright, time to dig into this `net/psp/` directory. First things first, need to refresh my memory on what exactly PSP is in this context. Is it a custom protocol, a particular hardware abstraction, or something else entirely? Understanding the *purpose* of PSP is critical before I can make sense of its usage. Gotta get the high-level context. How is it *designed* to be used? Next, let's zero in on the function `psp_sock_assoc_set_rx`. This likely plays a key role in associating incoming traffic with a specific socket, and the "rx" part tells me it's handling the receiving side of things. So, I need to understand *how* the system identifies and routes incoming packets or data streams based on PSP. I'll need to use `grep` (or my preferred search tool) to find the calling locations of `psp_sock_assoc_set_rx`. This will paint the bigger picture: what other components are involved, what triggers this association process, and where it fits in the data flow. Finding those callers will give me valuable clues to its function and structure within the whole system. |
| 20/2 | 2026/09/11 00:43 | tool | grepper |
0mArgs:{
"Expression": "psp_sock_assoc_set_rx"
}Results: {
"Output": "net/psp/psp.h=25=void psp_dev_tx_key_del(struct psp_dev *psd, struct psp_assoc *pas);\nnet/psp/psp.h:26:int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,\nnet/psp/psp.h-27-\t\t\t struct psp_key_parsed *key,\n--\nnet/psp/psp_nl.c=770=int psp_nl_rx_assoc_doit(struct sk_buff *skb, struct genl_info *info)\n--\nnet/psp/psp_nl.c-809-\nnet/psp/psp_nl.c:810:\terr = psp_sock_assoc_set_rx(socket-\u003esk, pas, \u0026key, info-\u003eextack);\nnet/psp/psp_nl.c-811-\tif (err) {\n--\nnet/psp/psp_sock.c=124=void psp_sk_assoc_free(struct sock *sk)\n--\nnet/psp/psp_sock.c-131-\nnet/psp/psp_sock.c:132:int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,\nnet/psp/psp_sock.c-133-\t\t\t struct psp_key_parsed *key,\n"
} |
| 21/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 11906 output: 18 thoughts: 121 Thoughts: **Investigating Netlink and PSP Interactions** Okay, let's dive into this netlink PSP business. I need to refresh my understanding of how it all hangs together. I should start by looking at the netlink implementation of PSP, and while I'm at it, I'll refresh my memory of `sk_has_decrypt_user`, and the inner workings of `__tcp_set_ulp`, and similar related functions. Ah, right! `tcp_set_ulp` is invoked through `setsockopt` with the `SOL_TCP` and `TCP_ULP` options. That's a good starting point. Now, where does the PSP netlink processing actually happen? Ah, yes, `psp_nl_rx_assoc_doit` is what's called when receiving traffic from the PSP netlink family. This gives me a clearer picture of the data path. I wonder… can we leverage netdevsim for testing PSP? It would be great to isolate and test this without having to deal with real hardware. I'll need to see if there's any mention of `nsim_psp`, or how PSP-related devices are registered within netdevsim. Time to break out grep and see what the kernel source has to offer! |
| 22/2 | 2026/09/11 00:43 | tool | grepper |
0mArgs:{
"Expression": "nsim_psp"
}Results: {
"Output": "drivers/net/netdevsim/netdev.c=103=static int nsim_forward_skb(struct net_device *tx_dev,\n--\ndrivers/net/netdevsim/netdev.c-117-\ndrivers/net/netdevsim/netdev.c:118:\tnsim_psp_handle_ext(skb, psp_ext);\ndrivers/net/netdevsim/netdev.c-119-\n--\ndrivers/net/netdevsim/netdev.c=1040=static int nsim_init_netdevsim(struct netdevsim *ns)\n--\ndrivers/net/netdevsim/netdev.c-1076-\ndrivers/net/netdevsim/netdev.c:1077:\terr = nsim_psp_init(ns);\ndrivers/net/netdevsim/netdev.c-1078-\tif (err)\n--\ndrivers/net/netdevsim/netdev.c=1175=void nsim_destroy(struct netdevsim *ns)\n--\ndrivers/net/netdevsim/netdev.c-1190-\tif (nsim_dev_port_is_pf(ns-\u003ensim_dev_port))\ndrivers/net/netdevsim/netdev.c:1191:\t\tnsim_psp_uninit(ns);\ndrivers/net/netdevsim/netdev.c-1192-\n--\ndrivers/net/netdevsim/netdevsim.h=445=static inline void nsim_macsec_teardown(struct netdevsim *ns)\n--\ndrivers/net/netdevsim/netdevsim.h-450-#if IS_ENABLED(CONFIG_INET_PSP)\ndrivers/net/netdevsim/netdevsim.h:451:int nsim_psp_init(struct netdevsim *ns);\ndrivers/net/netdevsim/netdevsim.h:452:void nsim_psp_uninit(struct netdevsim *ns);\ndrivers/net/netdevsim/netdevsim.h:453:void nsim_psp_handle_ext(struct sk_buff *skb, struct skb_ext *psp_ext);\ndrivers/net/netdevsim/netdevsim.h-454-enum skb_drop_reason\ndrivers/net/netdevsim/netdevsim.h=455=nsim_do_psp(struct sk_buff *skb, struct netdevsim *ns,\n--\ndrivers/net/netdevsim/netdevsim.h-457-#else\ndrivers/net/netdevsim/netdevsim.h:458:static inline int nsim_psp_init(struct netdevsim *ns) { return 0; }\ndrivers/net/netdevsim/netdevsim.h:459:static inline void nsim_psp_uninit(struct netdevsim *ns) {}\ndrivers/net/netdevsim/netdevsim.h-460-static inline enum skb_drop_reason\n--\ndrivers/net/netdevsim/netdevsim.h=467=static inline void\ndrivers/net/netdevsim/netdevsim.h:468:nsim_psp_handle_ext(struct sk_buff *skb, struct skb_ext *psp_ext) {}\ndrivers/net/netdevsim/netdevsim.h-469-#endif\n--\ndrivers/net/netdevsim/psp.c-10-\ndrivers/net/netdevsim/psp.c:11:void nsim_psp_handle_ext(struct sk_buff *skb, struct skb_ext *psp_ext)\ndrivers/net/netdevsim/psp.c-12-{\n--\ndrivers/net/netdevsim/psp.c=123=static int\ndrivers/net/netdevsim/psp.c:124:nsim_psp_set_config(struct psp_dev *psd, struct psp_dev_config *conf,\ndrivers/net/netdevsim/psp.c-125-\t\t struct netlink_ext_ack *extack)\n--\ndrivers/net/netdevsim/psp.c=189=static void nsim_get_stats(struct psp_dev *psd, struct psp_dev_stats *stats)\n--\ndrivers/net/netdevsim/psp.c-203-\ndrivers/net/netdevsim/psp.c:204:static struct psp_dev_ops nsim_psp_ops = {\ndrivers/net/netdevsim/psp.c:205:\t.set_config\t= nsim_psp_set_config,\ndrivers/net/netdevsim/psp.c-206-\t.rx_spi_alloc\t= nsim_rx_spi_alloc,\n--\ndrivers/net/netdevsim/psp.c-212-\ndrivers/net/netdevsim/psp.c:213:static struct psp_dev_caps nsim_psp_caps = {\ndrivers/net/netdevsim/psp.c-214-\t.versions = 1 \u003c\u003c PSP_VERSION_HDR0_AES_GCM_128 |\n--\ndrivers/net/netdevsim/psp.c-220-\ndrivers/net/netdevsim/psp.c:221:static void __nsim_psp_uninit(struct netdevsim *ns, bool teardown)\ndrivers/net/netdevsim/psp.c-222-{\n--\ndrivers/net/netdevsim/psp.c-235-\ndrivers/net/netdevsim/psp.c:236:void nsim_psp_uninit(struct netdevsim *ns)\ndrivers/net/netdevsim/psp.c-237-{\n--\ndrivers/net/netdevsim/psp.c-239-\tmutex_destroy(\u0026ns-\u003epsp.rereg_lock);\ndrivers/net/netdevsim/psp.c:240:\t__nsim_psp_uninit(ns, true);\ndrivers/net/netdevsim/psp.c-241-}\n--\ndrivers/net/netdevsim/psp.c=243=static ssize_t\ndrivers/net/netdevsim/psp.c:244:nsim_psp_rereg_write(struct file *file, const char __user *data, size_t count,\ndrivers/net/netdevsim/psp.c-245-\t\t loff_t *ppos)\n--\ndrivers/net/netdevsim/psp.c-251-\tmutex_lock(\u0026ns-\u003epsp.rereg_lock);\ndrivers/net/netdevsim/psp.c:252:\t__nsim_psp_uninit(ns, false);\ndrivers/net/netdevsim/psp.c-253-\ndrivers/net/netdevsim/psp.c:254:\tpsd = psp_dev_create(ns-\u003enetdev, \u0026nsim_psp_ops, \u0026nsim_psp_caps, ns);\ndrivers/net/netdevsim/psp.c-255-\tif (IS_ERR(psd)) {\n--\ndrivers/net/netdevsim/psp.c-266-\ndrivers/net/netdevsim/psp.c:267:static const struct file_operations nsim_psp_rereg_fops = {\ndrivers/net/netdevsim/psp.c-268-\t.open = simple_open,\ndrivers/net/netdevsim/psp.c:269:\t.write = nsim_psp_rereg_write,\ndrivers/net/netdevsim/psp.c-270-\t.llseek = generic_file_llseek,\n--\ndrivers/net/netdevsim/psp.c-273-\ndrivers/net/netdevsim/psp.c:274:int nsim_psp_init(struct netdevsim *ns)\ndrivers/net/netdevsim/psp.c-275-{\n--\ndrivers/net/netdevsim/psp.c-278-\ndrivers/net/netdevsim/psp.c:279:\tpsd = psp_dev_create(ns-\u003enetdev, \u0026nsim_psp_ops, \u0026nsim_psp_caps, ns);\ndrivers/net/netdevsim/psp.c-280-\tif (IS_ERR(psd))\n--\ndrivers/net/netdevsim/psp.c-286-\tns-\u003epsp.rereg = debugfs_create_file(\"psp_rereg\", 0200, ddir, ns,\ndrivers/net/netdevsim/psp.c:287:\t\t\t\t\t \u0026nsim_psp_rereg_fops);\ndrivers/net/netdevsim/psp.c-288-\treturn 0;\n--\ntools/testing/selftests/drivers/net/psp.py=538=def data_stale_key(cfg):\n--\ntools/testing/selftests/drivers/net/psp.py-571-\ntools/testing/selftests/drivers/net/psp.py:572:def __nsim_psp_rereg(cfg):\ntools/testing/selftests/drivers/net/psp.py-573- # The PSP dev ID will change, remember what was there before\n--\ntools/testing/selftests/drivers/net/psp.py=585=def removal_device_rx(cfg):\n--\ntools/testing/selftests/drivers/net/psp.py-599-\ntools/testing/selftests/drivers/net/psp.py:600: __nsim_psp_rereg(cfg)\ntools/testing/selftests/drivers/net/psp.py-601- finally:\n--\ntools/testing/selftests/drivers/net/psp.py=605=def removal_device_bi(cfg):\n--\ntools/testing/selftests/drivers/net/psp.py-621- \"sock-fd\": s.fileno()})\ntools/testing/selftests/drivers/net/psp.py:622: __nsim_psp_rereg(cfg)\ntools/testing/selftests/drivers/net/psp.py-623- finally:\n"
} |
| 23/2 | 2026/09/11 00:43 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 14833 output: 18 thoughts: 403 Thoughts: **My Assessment of the PSP/TCP ULP Interaction** Okay, let's break this down. From what I'm seeing, PSP is handled through `netdevsim`, which is essentially a virtualized environment within QEMU and syzkaller. TCP ULP, and I'm thinking about things like kTLS, BPF, and MPTCP, are accessed using standard socket syscalls, specifically `setsockopt(..., SOL_TCP, TCP_ULP, ...)`. Right, I recall those functions: `sk_has_decrypt_user` is in `sock.c`, `__tcp_set_ulp` in `tcp_ulp.c`, and `psp_sock_assoc_set_rx` in `psp_sock.c`. Now, the important question: does the modified code interact with the core networking stack and the PSP side of things? Yep, it hits core networking, TCP ULP, and PSP sockets. The code's introducing checks to avoid conflicts – specifically, it's preventing the combination of PSP with TCP ULP or sockets employing `sk_validate_xmit_skb`, which I think of with kTLS device offload or PSP. It's essentially ensuring that offload and decryption states don't clash on the same socket. That makes sense. Next, I need to figure out if it's "WorthFuzzing". First, is it reachable in a typical QEMU/virtualized setup? Yes, TCP ULP is part of standard networking (we've got `CONFIG_INET`, `CONFIG_TCP_ULP`), kTLS is there (`CONFIG_TLS`), and PSP is configured (`CONFIG_INET_PSP`, `CONFIG_NETDEVSIM`). Now, is it *worth* fuzzing? Absolutely. These refactorings and checks in crucial subsystems (TCP ULP, socket management, PSP) are directly reachable and are altering socket state checks. It's prime territory for finding edge cases. Finally, what are the relevant configurations I need to set up? I'm thinking: * `INET_PSP` * `TLS` (or at least `INET_ULP` or `TCP_ULP` – I need to double-check `Kconfig` for the dependencies of `TCP_ULP`, `TLS`, etc.) * `NETDEVSIM` Let me just quickly consult the `Kconfig` files for `TCP_ULP` and `TLS` to confirm dependencies and their relations. |
| 24/2 | 2026/09/11 00:43 | tool | grepper |
0mArgs:{
"Expression": "TCP_ULP"
}Results: {
"Output": "Documentation/networking/tls.rst=20=TLS ULP.\n--\nDocumentation/networking/tls.rst-25- connect(sock, addr, addrlen);\nDocumentation/networking/tls.rst:26: setsockopt(sock, SOL_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\nDocumentation/networking/tls.rst-27-\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c=95=static bool src_proto(enum protocol_type type)\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-96-{\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:97:\treturn type == PROTOCOLID_TCP_ULP ||\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-98-\t type == PROTOCOLID_FCOE ||\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c=102=static bool tm_cid_proto(enum protocol_type type)\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-103-{\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:104:\treturn type == PROTOCOLID_TCP_ULP ||\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-105-\t type == PROTOCOLID_FCOE ||\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c=2016=int qed_cxt_set_pf_params(struct qed_hwfn *p_hwfn, u32 rdma_tasks)\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2078-\t\t\tqed_cxt_set_proto_cid_count(p_hwfn,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2079:\t\t\t\t\t\t PROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2080-\t\t\t\t\t\t p_params-\u003enum_cons,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2082-\t\t\tqed_cxt_set_proto_tid_count(p_hwfn,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2083:\t\t\t\t\t\t PROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2084:\t\t\t\t\t\t QED_CXT_TCP_ULP_TID_SEG,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2085-\t\t\t\t\t\t 0,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2101-\t\t\tqed_cxt_set_proto_cid_count(p_hwfn,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2102:\t\t\t\t\t\t PROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2103-\t\t\t\t\t\t p_params-\u003enum_cons,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2105-\t\t\tqed_cxt_set_proto_tid_count(p_hwfn,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2106:\t\t\t\t\t\t PROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2107:\t\t\t\t\t\t QED_CXT_TCP_ULP_TID_SEG,\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2108-\t\t\t\t\t\t 0,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c=2124=int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2140-\tcase QED_PCI_NVMETCP:\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2141:\t\tproto = PROTOCOLID_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2142:\t\tseg = QED_CXT_TCP_ULP_TID_SEG;\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2143-\t\tbreak;\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c=2448=int qed_cxt_get_task_ctx(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2467-\tcase QED_PCI_NVMETCP:\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2468:\t\tproto = PROTOCOLID_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c:2469:\t\tseg = QED_CXT_TCP_ULP_TID_SEG;\ndrivers/net/ethernet/qlogic/qed/qed_cxt.c-2470-\t\tbreak;\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.h=49=int qed_cxt_get_tid_mem_info(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_cxt.h-51-\ndrivers/net/ethernet/qlogic/qed/qed_cxt.h:52:#define QED_CXT_TCP_ULP_TID_SEG\tPROTOCOLID_TCP_ULP\ndrivers/net/ethernet/qlogic/qed/qed_cxt.h-53-#define QED_CXT_ROCE_TID_SEG\tPROTOCOLID_ROCE\n--\ndrivers/net/ethernet/qlogic/qed/qed_dev.c=2139=int qed_resc_alloc(struct qed_dev *cdev)\n--\ndrivers/net/ethernet/qlogic/qed/qed_dev.c-2259-\t\t\t qed_cxt_get_proto_cid_count(p_hwfn,\ndrivers/net/ethernet/qlogic/qed/qed_dev.c:2260:\t\t\t\t\t\t\tPROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_dev.c-2261-\t\t\t\t\t\t\tNULL);\n--\ndrivers/net/ethernet/qlogic/qed/qed_hsi.h=1184=enum personality_type {\ndrivers/net/ethernet/qlogic/qed/qed_hsi.h-1185-\tBAD_PERSONALITY_TYP,\ndrivers/net/ethernet/qlogic/qed/qed_hsi.h:1186:\tPERSONALITY_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_hsi.h-1187-\tPERSONALITY_FCOE,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=137=qed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-161-\t\t\t\t ISCSI_RAMROD_CMD_ID_INIT_FUNC,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:162:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-163-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-253-\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:254:\tqed_spq_register_async_cb(p_hwfn, PROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-255-\t\t\t\t qed_iscsi_async_event);\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=260=static int qed_sp_iscsi_conn_offload(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-289-\t\t\t\t ISCSI_RAMROD_CMD_ID_OFFLOAD_CONN,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:290:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-291-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=449=static int qed_sp_iscsi_conn_update(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-468-\t\t\t\t ISCSI_RAMROD_CMD_ID_UPDATE_CONN,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:469:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-470-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=490=qed_sp_iscsi_mac_update(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-509-\t\t\t\t ISCSI_RAMROD_CMD_ID_MAC_UPDATE,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:510:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-511-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=533=static int qed_sp_iscsi_conn_terminate(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-551-\t\t\t\t ISCSI_RAMROD_CMD_ID_TERMINATION_CONN,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:552:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-553-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=568=static int qed_sp_iscsi_conn_clear_sq(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-585-\t\t\t\t ISCSI_RAMROD_CMD_ID_CLEAR_SQ,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:586:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-587-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=593=static int qed_sp_iscsi_func_stop(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-609-\t\t\t\t ISCSI_RAMROD_CMD_ID_DESTROY_FUNC,\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:610:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-611-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-615-\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:616:\tqed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_TCP_ULP);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-617-\treturn rc;\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c=779=static int qed_iscsi_acquire_connection(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-787-\tspin_lock_bh(\u0026p_hwfn-\u003ep_iscsi_info-\u003elock);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c:788:\trc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_TCP_ULP, \u0026icid);\ndrivers/net/ethernet/qlogic/qed/qed_iscsi.c-789-\tspin_unlock_bh(\u0026p_hwfn-\u003ep_iscsi_info-\u003elock);\n--\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c=1023=static int qed_sp_ll2_tx_queue_start(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c-1084-\t\tbreak;\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c:1085:\tcase QED_LL2_TYPE_TCP_ULP:\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c:1086:\t\tp_ramrod-\u003econn_type = PROTOCOLID_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c-1087-\t\tbreak;\n--\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c-1096-\t\t p_hwfn-\u003ehw_info.personality == QED_PCI_NVMETCP)\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c:1097:\t\t\tp_ramrod-\u003econn_type = PROTOCOLID_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c-1098-\t\telse\n--\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c=2500=static int __qed_ll2_start(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c-2514-\tcase QED_PCI_NVMETCP:\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c:2515:\t\tconn_type = QED_LL2_TYPE_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_ll2.c-2516-\t\tbreak;\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=48=static int qed_sp_nvmetcp_func_start(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-70-\t\t\t\t NVMETCP_RAMROD_CMD_ID_INIT_FUNC,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:71:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-72-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-112-\tp_hwfn-\u003ep_nvmetcp_info-\u003eevent_cb = async_event_cb;\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:113:\tqed_spq_register_async_cb(p_hwfn, PROTOCOLID_TCP_ULP,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-114-\t\t\t\t qed_nvmetcp_async_event);\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=119=static int qed_sp_nvmetcp_func_stop(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-134-\t\t\t\t NVMETCP_RAMROD_CMD_ID_DESTROY_FUNC,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:135:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-136-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-139-\trc = qed_spq_post(p_hwfn, p_ent, NULL);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:140:\tqed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_TCP_ULP);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-141-\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=266=static int qed_sp_nvmetcp_conn_offload(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-288-\t\t\t\t NVMETCP_RAMROD_CMD_ID_OFFLOAD_CONN,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:289:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-290-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=356=static int qed_sp_nvmetcp_conn_update(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-375-\t\t\t\t NVMETCP_RAMROD_CMD_ID_UPDATE_CONN,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:376:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-377-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=393=static int qed_sp_nvmetcp_conn_terminate(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-410-\t\t\t\t NVMETCP_RAMROD_CMD_ID_TERMINATION_CONN,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:411:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-412-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=422=static int qed_sp_nvmetcp_conn_clear_sq(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-438-\t\t\t\t NVMETCP_RAMROD_CMD_ID_CLEAR_SQ,\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:439:\t\t\t\t PROTOCOLID_TCP_ULP, \u0026init_data);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-440-\tif (rc)\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c=518=static int qed_nvmetcp_acquire_connection(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-525-\tspin_lock_bh(\u0026p_hwfn-\u003ep_nvmetcp_info-\u003elock);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c:526:\trc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_TCP_ULP, \u0026icid);\ndrivers/net/ethernet/qlogic/qed/qed_nvmetcp.c-527-\tspin_unlock_bh(\u0026p_hwfn-\u003ep_nvmetcp_info-\u003elock);\n--\ndrivers/net/ethernet/qlogic/qed/qed_ooo.c=76=int qed_ooo_alloc(struct qed_hwfn *p_hwfn)\n--\ndrivers/net/ethernet/qlogic/qed/qed_ooo.c-86-\tcase QED_PCI_NVMETCP:\ndrivers/net/ethernet/qlogic/qed/qed_ooo.c:87:\t\tproto = PROTOCOLID_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_ooo.c-88-\t\tbreak;\n--\ndrivers/net/ethernet/qlogic/qed/qed_sp_commands.c=300=int qed_sp_pf_start(struct qed_hwfn *p_hwfn,\n--\ndrivers/net/ethernet/qlogic/qed/qed_sp_commands.c-394-\tcase QED_PCI_NVMETCP:\ndrivers/net/ethernet/qlogic/qed/qed_sp_commands.c:395:\t\tp_ramrod-\u003epersonality = PERSONALITY_TCP_ULP;\ndrivers/net/ethernet/qlogic/qed/qed_sp_commands.c-396-\t\tbreak;\n--\ninclude/linux/qed/common_hsi.h=681=struct tcp_ulp_connect_done_params {\n--\ninclude/linux/qed/common_hsi.h-684-\tu8 flags;\ninclude/linux/qed/common_hsi.h:685:#define TCP_ULP_CONNECT_DONE_PARAMS_TS_EN_MASK\t\t0x1\ninclude/linux/qed/common_hsi.h:686:#define TCP_ULP_CONNECT_DONE_PARAMS_TS_EN_SHIFT\t\t0\ninclude/linux/qed/common_hsi.h:687:#define TCP_ULP_CONNECT_DONE_PARAMS_RESERVED_MASK\t0x7F\ninclude/linux/qed/common_hsi.h:688:#define TCP_ULP_CONNECT_DONE_PARAMS_RESERVED_SHIFT\t1\ninclude/linux/qed/common_hsi.h-689-};\n--\ninclude/linux/qed/common_hsi.h=727=enum protocol_type {\ninclude/linux/qed/common_hsi.h:728:\tPROTOCOLID_TCP_ULP,\ninclude/linux/qed/common_hsi.h-729-\tPROTOCOLID_FCOE,\n--\ninclude/linux/qed/qed_ll2_if.h=19=enum qed_ll2_conn_type {\ninclude/linux/qed/qed_ll2_if.h-20-\tQED_LL2_TYPE_FCOE,\ninclude/linux/qed/qed_ll2_if.h:21:\tQED_LL2_TYPE_TCP_ULP,\ninclude/linux/qed/qed_ll2_if.h-22-\tQED_LL2_TYPE_TEST,\n--\ninclude/net/tcp.h=2798=enum hrtimer_restart tcp_pace_kick(struct hrtimer *timer);\n--\ninclude/net/tcp.h-2803-\ninclude/net/tcp.h:2804:#define TCP_ULP_NAME_MAX\t16\ninclude/net/tcp.h:2805:#define TCP_ULP_MAX\t\t128\ninclude/net/tcp.h:2806:#define TCP_ULP_BUF_MAX\t\t(TCP_ULP_NAME_MAX*TCP_ULP_MAX)\ninclude/net/tcp.h-2807-\ninclude/net/tcp.h=2808=struct tcp_ulp_ops {\n--\ninclude/net/tcp.h-2824-\ninclude/net/tcp.h:2825:\tchar\t\tname[TCP_ULP_NAME_MAX];\ninclude/net/tcp.h-2826-\tstruct module\t*owner;\n--\ninclude/net/tcp.h=2833=void tcp_update_ulp(struct sock *sk, struct proto *p,\n--\ninclude/net/tcp.h-2835-\ninclude/net/tcp.h:2836:#define MODULE_ALIAS_TCP_ULP(name)\t\t\t\t\\\ninclude/net/tcp.h-2837-\tMODULE_INFO(alias, name);\t\t\\\n--\ninclude/uapi/linux/tcp.h=74=enum {\n--\ninclude/uapi/linux/tcp.h-123-#define TCP_FASTOPEN_CONNECT\t30\t/* Attempt FastOpen with connect */\ninclude/uapi/linux/tcp.h:124:#define TCP_ULP\t\t\t31\t/* Attach a ULP to a TCP connection */\ninclude/uapi/linux/tcp.h-125-#define TCP_MD5SIG_EXT\t\t32\t/* TCP MD5 Signature with extensions */\n--\nnet/ipv4/sysctl_net_ipv4.c=377=static int proc_tcp_available_ulp(const struct ctl_table *ctl,\n--\nnet/ipv4/sysctl_net_ipv4.c-380-{\nnet/ipv4/sysctl_net_ipv4.c:381:\tstruct ctl_table tbl = { .maxlen = TCP_ULP_BUF_MAX, };\nnet/ipv4/sysctl_net_ipv4.c-382-\tint ret;\n--\nnet/ipv4/sysctl_net_ipv4.c-386-\t\treturn -ENOMEM;\nnet/ipv4/sysctl_net_ipv4.c:387:\ttcp_get_available_ulp(tbl.data, TCP_ULP_BUF_MAX);\nnet/ipv4/sysctl_net_ipv4.c-388-\tret = proc_dostring(\u0026tbl, write, buffer, lenp, ppos);\n--\nnet/ipv4/sysctl_net_ipv4.c=530=static struct ctl_table ipv4_table[] = {\n--\nnet/ipv4/sysctl_net_ipv4.c-604-\t\t.procname\t= \"tcp_available_ulp\",\nnet/ipv4/sysctl_net_ipv4.c:605:\t\t.maxlen\t\t= TCP_ULP_BUF_MAX,\nnet/ipv4/sysctl_net_ipv4.c-606-\t\t.mode\t\t= 0444,\n--\nnet/ipv4/tcp.c=3836=int do_tcp_setsockopt(struct sock *sk, int level, int optname,\n--\nnet/ipv4/tcp.c-3865-\t}\nnet/ipv4/tcp.c:3866:\tcase TCP_ULP: {\nnet/ipv4/tcp.c:3867:\t\tchar name[TCP_ULP_NAME_MAX];\nnet/ipv4/tcp.c-3868-\n--\nnet/ipv4/tcp.c-3872-\t\tval = strncpy_from_sockptr(name, optval,\nnet/ipv4/tcp.c:3873:\t\t\t\t\tmin_t(long, TCP_ULP_NAME_MAX - 1,\nnet/ipv4/tcp.c-3874-\t\t\t\t\t optlen));\n--\nnet/ipv4/tcp.c=4480=int do_tcp_getsockopt(struct sock *sk, int level,\n--\nnet/ipv4/tcp.c-4597-\t}\nnet/ipv4/tcp.c:4598:\tcase TCP_ULP:\nnet/ipv4/tcp.c-4599-\t\tif (copy_from_sockptr(\u0026len, optlen, sizeof(int)))\nnet/ipv4/tcp.c-4600-\t\t\treturn -EFAULT;\nnet/ipv4/tcp.c:4601:\t\tlen = min_t(unsigned int, len, TCP_ULP_NAME_MAX);\nnet/ipv4/tcp.c-4602-\t\tif (!icsk-\u003eicsk_ulp_ops) {\n--\nnet/ipv4/tcp_diag.c=146=static size_t tcp_diag_get_aux_size(struct sock *sk, bool net_admin)\n--\nnet/ipv4/tcp_diag.c-174-\t\t\tsize += nla_total_size(0) +\nnet/ipv4/tcp_diag.c:175:\t\t\t\tnla_total_size(TCP_ULP_NAME_MAX);\nnet/ipv4/tcp_diag.c-176-\t\t\tif (ulp_ops-\u003eget_info_size)\n--\nnet/mptcp/sockopt.c=833=static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,\n--\nnet/mptcp/sockopt.c-839-\tswitch (optname) {\nnet/mptcp/sockopt.c:840:\tcase TCP_ULP:\nnet/mptcp/sockopt.c-841-\t\treturn -EOPNOTSUPP;\n--\nnet/mptcp/sockopt.c=1411=static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,\n--\nnet/mptcp/sockopt.c-1416-\tswitch (optname) {\nnet/mptcp/sockopt.c:1417:\tcase TCP_ULP:\nnet/mptcp/sockopt.c-1418-\tcase TCP_CONGESTION:\n--\nnet/smc/af_smc.c=3084=int smc_setsockopt(struct socket *sock, int level, int optname,\n--\nnet/smc/af_smc.c-3090-\nnet/smc/af_smc.c:3091:\tif (level == SOL_TCP \u0026\u0026 optname == TCP_ULP)\nnet/smc/af_smc.c-3092-\t\treturn -EOPNOTSUPP;\n--\nnet/tls/tls_main.c=50=MODULE_LICENSE(\"Dual BSD/GPL\");\nnet/tls/tls_main.c:51:MODULE_ALIAS_TCP_ULP(\"tls\");\nnet/tls/tls_main.c-52-\n--\ntools/include/uapi/linux/tcp.h=72=enum { \n--\ntools/include/uapi/linux/tcp.h-120-#define TCP_FASTOPEN_CONNECT\t30\t/* Attempt FastOpen with connect */\ntools/include/uapi/linux/tcp.h:121:#define TCP_ULP\t\t\t31\t/* Attach a ULP to a TCP connection */\ntools/include/uapi/linux/tcp.h-122-#define TCP_MD5SIG_EXT\t\t32\t/* TCP MD5 Signature with extensions */\n--\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c=87=static void test_ktls(int family)\n--\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c-111-\t/* Setup KTLS */\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c:112:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c-113-\tif (!ASSERT_OK(ret, \"setsockopt\"))\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c-114-\t\tgoto err_out;\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c:115:\tret = setsockopt(cfd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/bpf/prog_tests/setget_sockopt.c-116-\tif (!ASSERT_OK(ret, \"setsockopt\"))\n--\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-13-#define MAX_TEST_NAME 80\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:14:#define TCP_ULP 31\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-15-\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c=16=static int init_ktls_pairs(int c, int p)\n--\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-21-\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:22:\terr = setsockopt(c, IPPROTO_TCP, TCP_ULP, \"tls\", strlen(\"tls\"));\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:23:\tif (!ASSERT_OK(err, \"setsockopt(TCP_ULP)\"))\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-24-\t\tgoto out;\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-25-\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:26:\terr = setsockopt(p, IPPROTO_TCP, TCP_ULP, \"tls\", strlen(\"tls\"));\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:27:\tif (!ASSERT_OK(err, \"setsockopt(TCP_ULP)\"))\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-28-\t\tgoto out;\n--\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c=63=static void test_sockmap_ktls_update_fails_when_sock_has_ulp(int family, int map)\n--\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-101-\t/* save sk-\u003esk_prot and set it to tls_prots */\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:102:\terr = setsockopt(s, IPPROTO_TCP, TCP_ULP, \"tls\", strlen(\"tls\"));\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:103:\tif (!ASSERT_OK(err, \"setsockopt(TCP_ULP)\"))\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-104-\t\tgoto close;\n--\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c=119=static void test_sockmap_ktls_enable_fails_when_in_sockmap(int family, int map)\n--\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-168-\t/* Installing the TLS ULP is allowed, it does not touch the datapath. */\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:169:\terr = setsockopt(s, IPPROTO_TCP, TCP_ULP, \"tls\", strlen(\"tls\"));\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c:170:\tif (!ASSERT_OK(err, \"setsockopt(TCP_ULP)\"))\ntools/testing/selftests/bpf/prog_tests/sockmap_ktls.c-171-\t\tgoto close;\n--\ntools/testing/selftests/drivers/net/psp.py=24=from lib.py import ip\ntools/testing/selftests/drivers/net/psp.py-25-\ntools/testing/selftests/drivers/net/psp.py:26:TCP_ULP = 31\ntools/testing/selftests/drivers/net/psp.py-27-\n--\ntools/testing/selftests/drivers/net/psp.py=338=def _require_tls_ulp():\n--\ntools/testing/selftests/drivers/net/psp.py-341- try:\ntools/testing/selftests/drivers/net/psp.py:342: s.setsockopt(socket.SOL_TCP, TCP_ULP, b\"tls\")\ntools/testing/selftests/drivers/net/psp.py-343- except OSError as exc:\n--\ntools/testing/selftests/drivers/net/psp.py=347=def assoc_psp_ulp_exclusive(cfg):\n--\ntools/testing/selftests/drivers/net/psp.py-357- with ksft_raises(OSError) as cm:\ntools/testing/selftests/drivers/net/psp.py:358: s.setsockopt(socket.SOL_TCP, TCP_ULP, b\"tls\")\ntools/testing/selftests/drivers/net/psp.py-359- ksft_eq(cm.exception.errno, errno.EINVAL)\n--\ntools/testing/selftests/drivers/net/psp.py=364=def assoc_ulp_psp_exclusive(cfg):\n--\ntools/testing/selftests/drivers/net/psp.py-370- try:\ntools/testing/selftests/drivers/net/psp.py:371: s.setsockopt(socket.SOL_TCP, TCP_ULP, b\"tls\")\ntools/testing/selftests/drivers/net/psp.py-372- with ksft_raises(NlError) as cm:\n--\ntools/testing/selftests/net/getsockopt_iter.c-54-#endif\ntools/testing/selftests/net/getsockopt_iter.c:55:#ifndef TCP_ULP\ntools/testing/selftests/net/getsockopt_iter.c:56:#define TCP_ULP 31\ntools/testing/selftests/net/getsockopt_iter.c-57-#endif\n--\ntools/testing/selftests/net/getsockopt_iter.c=503=FIXTURE_SETUP(tls)\n--\ntools/testing/selftests/net/getsockopt_iter.c-533-\tclose(lfd);\ntools/testing/selftests/net/getsockopt_iter.c:534:\tif (setsockopt(self-\u003efd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\")))\ntools/testing/selftests/net/getsockopt_iter.c:535:\t\tSKIP(return, \"TCP_ULP=tls: %s (built without TLS?)\",\ntools/testing/selftests/net/getsockopt_iter.c-536-\t\t strerror(errno));\n--\ntools/testing/selftests/net/mptcp/mptcp_connect.c=38=extern int optind;\n--\ntools/testing/selftests/net/mptcp/mptcp_connect.c-42-#endif\ntools/testing/selftests/net/mptcp/mptcp_connect.c:43:#ifndef TCP_ULP\ntools/testing/selftests/net/mptcp/mptcp_connect.c:44:#define TCP_ULP 31\ntools/testing/selftests/net/mptcp/mptcp_connect.c-45-#endif\n--\ntools/testing/selftests/net/mptcp/mptcp_connect.c=270=static int do_ulp_so(int sock, const char *name)\ntools/testing/selftests/net/mptcp/mptcp_connect.c-271-{\ntools/testing/selftests/net/mptcp/mptcp_connect.c:272:\treturn setsockopt(sock, IPPROTO_TCP, TCP_ULP, name, strlen(name));\ntools/testing/selftests/net/mptcp/mptcp_connect.c-273-}\n--\ntools/testing/selftests/net/mptcp/mptcp_connect.c=276=static void sock_test_tcpulp(int sock, int proto, unsigned int line)\n--\ntools/testing/selftests/net/mptcp/mptcp_connect.c-279-\tchar buf[8] = \"\";\ntools/testing/selftests/net/mptcp/mptcp_connect.c:280:\tint ret = getsockopt(sock, IPPROTO_TCP, TCP_ULP, buf, \u0026buflen);\ntools/testing/selftests/net/mptcp/mptcp_connect.c-281-\n--\ntools/testing/selftests/net/tls.c=112=static void ulp_sock_pair(struct __test_metadata *_metadata,\n--\ntools/testing/selftests/net/tls.c-144-\ntools/testing/selftests/net/tls.c:145:\tret = setsockopt(*fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-146-\tif (ret != 0) {\n--\ntools/testing/selftests/net/tls.c-148-\t\t*notls = true;\ntools/testing/selftests/net/tls.c:149:\t\tprintf(\"Failure setting TCP_ULP, testing without tls\\n\");\ntools/testing/selftests/net/tls.c-150-\t\treturn;\n--\ntools/testing/selftests/net/tls.c-152-\ntools/testing/selftests/net/tls.c:153:\tret = setsockopt(*cfd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-154-\tASSERT_EQ(ret, 0);\n--\ntools/testing/selftests/net/tls.c=3198=TEST(non_established) {\n--\ntools/testing/selftests/net/tls.c-3221-\ntools/testing/selftests/net/tls.c:3222:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3223-\tEXPECT_EQ(ret, -1);\n--\ntools/testing/selftests/net/tls.c-3228-\ntools/testing/selftests/net/tls.c:3229:\tret = setsockopt(sfd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3230-\tEXPECT_EQ(ret, -1);\n--\ntools/testing/selftests/net/tls.c-3238-\ntools/testing/selftests/net/tls.c:3239:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3240-\tASSERT_EQ(ret, 0);\ntools/testing/selftests/net/tls.c-3241-\ntools/testing/selftests/net/tls.c:3242:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3243-\tEXPECT_EQ(ret, -1);\n--\ntools/testing/selftests/net/tls.c=3326=TEST(tls_v6ops) {\n--\ntools/testing/selftests/net/tls.c-3356-\ntools/testing/selftests/net/tls.c:3357:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3358-\tif (ret) {\n--\ntools/testing/selftests/net/tls.c=3381=TEST(prequeue) {\n--\ntools/testing/selftests/net/tls.c-3406-\ntools/testing/selftests/net/tls.c:3407:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3408-\tif (ret) {\n--\ntools/testing/selftests/net/tls.c-3415-\ntools/testing/selftests/net/tls.c:3416:\tASSERT_EQ(setsockopt(cfd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\")), 0);\ntools/testing/selftests/net/tls.c-3417-\tASSERT_EQ(setsockopt(cfd, SOL_TLS, TLS_RX, \u0026tls12, tls12.len), 0);\n--\ntools/testing/selftests/net/tls.c=3426=TEST(data_steal) {\n--\ntools/testing/selftests/net/tls.c-3452-\ntools/testing/selftests/net/tls.c:3453:\tret = setsockopt(fd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\"));\ntools/testing/selftests/net/tls.c-3454-\tif (ret) {\n--\ntools/testing/selftests/net/tls.c-3457-\t}\ntools/testing/selftests/net/tls.c:3458:\tASSERT_EQ(setsockopt(cfd, IPPROTO_TCP, TCP_ULP, \"tls\", sizeof(\"tls\")), 0);\ntools/testing/selftests/net/tls.c-3459-\n"
} |
| 25/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 27669 output: 18 thoughts: 13 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Investigating TLS Configuration** Okay, time to dive into this. First things first, I need to verify how TLS is currently handled in the configuration. Let's start with a check of `CONFIG_TLS` within the Kconfig files. This is my go-to starting point when investigating TLS functionality. It will give me a base to see if it's even enabled to begin with. From there, I can understand the configuration options related to TLS that are present, and quickly move to understanding what dependencies, if any, are there. |
| 26/2 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "config TLS\\b"
}Results: {
"Output": "net/tls/Kconfig-4-#\nnet/tls/Kconfig:5:config TLS\nnet/tls/Kconfig-6-\ttristate \"Transport Layer Security support\"\n"
} |
| 27/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 27885 output: 32 thoughts: 12 Thoughts: Here's a summary of my thought process, as if I were the one thinking it: **Examining the TLS Configuration** Okay, time to dive in. My immediate thought is, "Let's check `net/tls/Kconfig`." Given my expertise, I know this is the logical first step when examining any TLS-related configuration within this project. I want to understand what options are available, what defaults are set, and how different features are enabled or disabled. This `Kconfig` file is the central source of truth for the TLS build configuration, and it'll give me the lay of the land before I go any further. I'm expecting to find details on things like supported ciphersuites, key exchange algorithms, and any hardware acceleration options. Hopefully, the file is well-documented, allowing for a swift review. |
| 28/2 | 2026/09/11 00:44 | tool | read-file |
0mArgs:{
"File": "net/tls/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t#\n 3:\t# TLS configuration\n 4:\t#\n 5:\tconfig TLS\n 6:\t\ttristate \"Transport Layer Security support\"\n 7:\t\tdepends on INET\n 8:\t\tselect CRYPTO\n 9:\t\tselect CRYPTO_AES\n 10:\t\tselect CRYPTO_GCM\n 11:\t\tselect NET_SOCK_MSG\n 12:\t\tdefault n\n 13:\t\thelp\n 14:\t\tEnable kernel support for TLS protocol. This allows symmetric\n 15:\t\tencryption handling of the TLS protocol to be done in-kernel.\n 16:\t\n 17:\t\tIf unsure, say N.\n 18:\t\n 19:\tconfig TLS_DEVICE\n 20:\t\tbool \"Transport Layer Security HW offload\"\n 21:\t\tdepends on TLS\n 22:\t\tselect SKB_DECRYPTED\n 23:\t\tselect SOCK_VALIDATE_XMIT\n 24:\t\tselect SOCK_RX_QUEUE_MAPPING\n 25:\t\tdefault n\n 26:\t\thelp\n 27:\t\tEnable kernel support for HW offload of the TLS protocol.\n 28:\t\n 29:\t\tIf unsure, say N.\n"
} |
| 29/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 28432 output: 19 thoughts: 16 Thoughts: Here's my take on those thoughts: **Checking `CONFIG_NETDEVSIM` in Kconfig** Alright, let's dive right in. My initial thought is to zero in on `CONFIG_NETDEVSIM` within the Kconfig configuration files. I'm immediately thinking we need to determine its current state and associated dependencies. My experience tells me that this macro is likely a critical configuration option that enables or disables some network device simulation functionality. Depending on its status, it could influence a wide range of other features and modules within the kernel. I need to understand its impact. Where is it defined, what other settings depend on it, and what does enabling or disabling it actually do in practical terms? Time to drill down into the Kconfig structure. |
| 30/2 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "config NETDEVSIM"
}Results: {
"Output": "drivers/net/Kconfig=602=source \"drivers/net/hyperv/Kconfig\"\ndrivers/net/Kconfig-603-\ndrivers/net/Kconfig:604:config NETDEVSIM\ndrivers/net/Kconfig-605-\ttristate \"Simulated networking device\"\n"
} |
| 31/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 28713 output: 22 thoughts: 42 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Investigating Network Socket Association** Alright, time to dig into this socket association issue. My initial thought is to check the status using `inet_csk_has_ulp(sk)` and `psp_sk_assoc(sk)`. Those seem like the key functions related to the User-Level Protocol and the Performance-Sensitive Protocol association, respectively. My gut tells me these are central to the issue. Before I go too deep, I need to know where these are defined. I'll need to confirm the definitions and what the associated headers are. So, a quick `grep` is in order. Let's see what the includes are, and which files contain the actual implementations. This will provide the necessary context. From there, I can begin to reason about how these functions relate to the current problem. That's the first stop. |
| 32/2 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "inet_csk_has_ulp"
}Results: {
"Output": "include/net/inet_connection_sock.h=338=static inline void inet_csk_inc_pingpong_cnt(struct sock *sk)\n--\ninclude/net/inet_connection_sock.h-345-\ninclude/net/inet_connection_sock.h:346:static inline bool inet_csk_has_ulp(const struct sock *sk)\ninclude/net/inet_connection_sock.h-347-{\n--\nnet/core/skmsg.c=750=struct sk_psock *sk_psock_init(struct sock *sk, int node)\n--\nnet/core/skmsg.c-756-\nnet/core/skmsg.c:757:\tif (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)) {\nnet/core/skmsg.c-758-\t\tpsock = ERR_PTR(-EINVAL);\n--\nnet/core/sock.c=2674=bool sk_has_decrypt_user(const struct sock *sk)\n--\nnet/core/sock.c-2676-\treturn psp_sk_assoc(sk) ||\nnet/core/sock.c:2677:\t (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)); /* for tls */\nnet/core/sock.c-2678-}\n--\nnet/ipv4/tcp_bpf.c=725=int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore)\n--\nnet/ipv4/tcp_bpf.c-734-\tif (restore) {\nnet/ipv4/tcp_bpf.c:735:\t\tif (inet_csk_has_ulp(sk)) {\nnet/ipv4/tcp_bpf.c-736-\t\t\t/* TLS does not have an unhash proto in SW cases,\n"
} |
| 33/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 29455 output: 19 thoughts: 11 Thoughts: Okay, here's my attempt at summarizing that thought process, tailored for an expert audience: **Checking the `psp_sk_assoc` Data** Alright, let's dive into this. The first thing that comes to mind is to take a look at `psp_sk_assoc`. I need to assess what's happening with that particular data structure. This could be anything from checking its current state for unexpected values, confirming its expected behavior under certain conditions, or maybe even just refreshing my memory on its exact definition and role within the wider system. Understanding its status is essential before proceeding any further. |
| 34/2 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "psp_sk_assoc"
}Results: {
"Output": "include/net/psp/functions.h=33=unsigned int psp_key_size(u32 version);\ninclude/net/psp/functions.h:34:void psp_sk_assoc_free(struct sock *sk);\ninclude/net/psp/functions.h-35-void psp_twsk_init(struct inet_timewait_sock *tw, const struct sock *sk);\n--\ninclude/net/psp/functions.h=37=void psp_reply_set_decrypted(const struct sock *sk, struct sk_buff *skb);\ninclude/net/psp/functions.h-38-\ninclude/net/psp/functions.h:39:static inline struct psp_assoc *psp_sk_assoc(const struct sock *sk)\ninclude/net/psp/functions.h-40-{\n--\ninclude/net/psp/functions.h=45=psp_enqueue_set_decrypted(struct sock *sk, struct sk_buff *skb)\n--\ninclude/net/psp/functions.h-48-\ninclude/net/psp/functions.h:49:\tpas = psp_sk_assoc(sk);\ninclude/net/psp/functions.h-50-\tif (pas \u0026\u0026 pas-\u003etx.spi)\n--\ninclude/net/psp/functions.h=116=psp_sk_rx_policy_check(struct sock *sk, struct sk_buff *skb)\ninclude/net/psp/functions.h-117-{\ninclude/net/psp/functions.h:118:\treturn __psp_sk_rx_policy_check(skb, psp_sk_assoc(sk));\ninclude/net/psp/functions.h-119-}\n--\ninclude/net/psp/functions.h=150=static inline unsigned int psp_sk_overhead(const struct sock *sk)\n--\ninclude/net/psp/functions.h-157-#else\ninclude/net/psp/functions.h:158:static inline void psp_sk_assoc_free(struct sock *sk) { }\ninclude/net/psp/functions.h-159-static inline void\n--\ninclude/net/psp/functions.h=163=psp_reply_set_decrypted(const struct sock *sk, struct sk_buff *skb) { }\ninclude/net/psp/functions.h-164-\ninclude/net/psp/functions.h:165:static inline struct psp_assoc *psp_sk_assoc(const struct sock *sk)\ninclude/net/psp/functions.h-166-{\n--\nnet/core/sock.c=2674=bool sk_has_decrypt_user(const struct sock *sk)\nnet/core/sock.c-2675-{\nnet/core/sock.c:2676:\treturn psp_sk_assoc(sk) ||\nnet/core/sock.c-2677-\t (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)); /* for tls */\n--\nnet/ipv4/af_inet.c=140=void inet_sock_destruct(struct sock *sk)\n--\nnet/ipv4/af_inet.c-166-\tdst_release(rcu_dereference_protected(sk-\u003esk_rx_dst, 1));\nnet/ipv4/af_inet.c:167:\tpsp_sk_assoc_free(sk);\nnet/ipv4/af_inet.c-168-}\n--\nnet/psp/psp_sock.c=118=void psp_assoc_put(struct psp_assoc *pas)\n--\nnet/psp/psp_sock.c-123-\nnet/psp/psp_sock.c:124:void psp_sk_assoc_free(struct sock *sk)\nnet/psp/psp_sock.c-125-{\n--\nnet/psp/psp_sock.c=132=int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,\n--\nnet/psp/psp_sock.c-141-\nnet/psp/psp_sock.c:142:\tif (psp_sk_assoc(sk)) {\nnet/psp/psp_sock.c-143-\t\tNL_SET_ERR_MSG(extack, \"Socket already has PSP state\");\n--\nnet/psp/psp_sock.c=181=int psp_sock_assoc_set_tx(struct sock *sk, struct psp_dev *psd,\n--\nnet/psp/psp_sock.c-190-\nnet/psp/psp_sock.c:191:\tpas = psp_sk_assoc(sk);\nnet/psp/psp_sock.c-192-\tif (!pas) {\n--\nnet/psp/psp_sock.c=270=void psp_twsk_init(struct inet_timewait_sock *tw, const struct sock *sk)\nnet/psp/psp_sock.c-271-{\nnet/psp/psp_sock.c:272:\tstruct psp_assoc *pas = psp_sk_assoc(sk);\nnet/psp/psp_sock.c-273-\n"
} |
| 35/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 30906 output: 19 thoughts: 357 Thoughts: **Analyzing Symbol Modifications and Caller Relationships** Okay, let's break this down systematically. My initial task is to understand the scope and impact of these symbols. First, I need to identify which symbols are being modified or newly introduced. I've noted a few key items right off the bat: 1. `sk_has_decrypt_user` in `net/core/sock.c`, which is a non-static function. That's a point to remember for potential external interactions. 2. `__tcp_set_ulp` in `net/ipv4/tcp_ulp.c` which is static and called by `tcp_set_ulp`. The focus here should be on `tcp_set_ulp` or `__tcp_set_ulp` potentially both. 3. `psp_sock_assoc_set_rx` in `net/psp/psp_sock.c`, a non-static function called by `psp_nl_rx_assoc_doit`. 4. `sk_has_validate_xmit_skb` in `include/net/sock.h`, a static inline helper. Its callers are `__tcp_set_ulp` and `psp_sock_assoc_set_rx`. This is important, as static inlines can introduce complexities in tracing. Now I need to clarify the visibility of `tcp_set_ulp`. I see that `tcp_set_ulp` itself is non-static in `net/ipv4/tcp_ulp.c`. This means it *could* be externally visible, so I need to check for external calls. To ensure I have a complete picture, I will review all functions in `net/ipv4/tcp_ulp.c`, `net/psp/psp_sock.c`, and `net/core/sock.c`: * `sk_has_decrypt_user` * `tcp_set_ulp` * `__tcp_set_ulp` * `psp_sock_assoc_set_rx` * `psp_nl_rx_assoc_doit` Finally, I need to thoroughly examine the callers of `tcp_set_ulp`. This is crucial to understanding the data flow and potential impact of any changes to this function. This gives me a good starting point for my analysis. |
| 36/2 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "tcp_set_ulp"
}Results: {
"Output": "include/net/tcp.h=2829=void tcp_unregister_ulp(struct tcp_ulp_ops *type);\ninclude/net/tcp.h:2830:int tcp_set_ulp(struct sock *sk, const char *name);\ninclude/net/tcp.h-2831-void tcp_get_available_ulp(char *buf, size_t len);\n--\nnet/ipv4/tcp.c=3836=int do_tcp_setsockopt(struct sock *sk, int level, int optname,\n--\nnet/ipv4/tcp.c-3879-\t\tsockopt_lock_sock(sk);\nnet/ipv4/tcp.c:3880:\t\terr = tcp_set_ulp(sk, name);\nnet/ipv4/tcp.c-3881-\t\tsockopt_release_sock(sk);\n--\nnet/ipv4/tcp_ulp.c=112=void tcp_cleanup_ulp(struct sock *sk)\n--\nnet/ipv4/tcp_ulp.c-129-\nnet/ipv4/tcp_ulp.c:130:static int __tcp_set_ulp(struct sock *sk, const struct tcp_ulp_ops *ulp_ops)\nnet/ipv4/tcp_ulp.c-131-{\n--\nnet/ipv4/tcp_ulp.c-160-\nnet/ipv4/tcp_ulp.c:161:int tcp_set_ulp(struct sock *sk, const char *name)\nnet/ipv4/tcp_ulp.c-162-{\n--\nnet/ipv4/tcp_ulp.c-170-\nnet/ipv4/tcp_ulp.c:171:\treturn __tcp_set_ulp(sk, ulp_ops);\nnet/ipv4/tcp_ulp.c-172-}\n--\nnet/mptcp/subflow.c=1781=int mptcp_subflow_create_socket(struct sock *sk, unsigned short family,\n--\nnet/mptcp/subflow.c-1812-\tsk_net_refcnt_upgrade(sf-\u003esk);\nnet/mptcp/subflow.c:1813:\terr = tcp_set_ulp(sf-\u003esk, \"mptcp\");\nnet/mptcp/subflow.c-1814-\tif (err)\n"
} |
| 37/2 | 2026/09/11 00:44 | llm | patch-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 32377 output: 223 thoughts: 731 Thoughts: **My Analysis of the Configuration Dependencies and Fuzzing Potential** Okay, let's break this down. First, I need to understand the dependencies and interactions between these configurations. I see that `INET_PSP` relies on `INET` and selects `SKB_DECRYPTED`, `SKB_EXTENSIONS`, and `SOCK_VALIDATE_XMIT`. `TLS` also depends on `INET`, and `TLS_DEVICE` depends on `TLS`, sharing some of the same selected symbols as `INET_PSP`. I also see that `NETDEVSIM` is there to create simulated netdevs with PSP support. So, the key configurations I need to focus on are `INET_PSP`, `TLS`, `TLS_DEVICE`, and `NETDEVSIM`. Now, I need to confirm that `CONFIG_INET_PSP` actually enables the necessary code – I'll check that `net/psp/psp_sock.c` and `psp_sock_assoc_set_rx` are indeed included. Looking at the Makefiles confirms this dependency. Next, the critical symbols. I have to look at `sk_has_decrypt_user`, `tcp_set_ulp`, `__tcp_set_ulp`, `psp_sock_assoc_set_rx`, and `psp_nl_rx_assoc_doit`. Are any of these widely used? No, thankfully. `sk_has_decrypt_user` is a recent addition and only called by a few other functions, and the others are specific to TCP ULP setup and PSP netlink interactions. That's good; it narrows the scope. Given the nature of the changes, this is definitely worth fuzzing. The patch introduces mutual exclusivity checks between PSP socket associations, TCP ULP (like kTLS), and sockets with packet transmission validation. It adds checks for `sk_has_decrypt_user()` and `sk_has_validate_xmit_skb()` in key functions to prevent conflicts. These modifications touch crucial socket configuration paths, accessible via TCP options and netlink commands. That's a classic scenario for fuzzing. Alright, double-checking my notes: * **WorthFuzzing:** True * **FocusSymbols:** \["sk\_has\_decrypt\_user", "tcp\_set\_ulp", "\_\_tcp\_set\_ulp", "psp\_sock\_assoc\_set\_rx", "psp\_nl\_rx\_assoc\_doit"] * **EnableConfigs:** \["INET\_PSP", "TLS", "TLS\_DEVICE", "NETDEVSIM"] * **Reasoning:** Concise and accurate. Everything checks out. I'm ready to proceed. |
| 38/2 | 2026/09/11 00:44 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"INET_PSP",
"TLS",
"TLS_DEVICE",
"NETDEVSIM"
],
"FocusSymbols": [
"sk_has_decrypt_user",
"tcp_set_ulp",
"__tcp_set_ulp",
"psp_sock_assoc_set_rx",
"psp_nl_rx_assoc_doit"
],
"Reasoning": "The patch introduces socket state exclusivity checks between PSP (PSP Security Protocol) socket associations, TCP ULP (e.g., kTLS), and sockets with transmit validation handlers (sk_validate_xmit_skb). It adds sk_has_decrypt_user() and sk_has_validate_xmit_skb() validations in __tcp_set_ulp() and psp_sock_assoc_set_rx() to prevent conflicting socket offload states. These code paths are reachable via TCP setsockopt(TCP_ULP) and PSP Netlink commands.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"INET_PSP",
"TLS",
"TLS_DEVICE",
"NETDEVSIM"
],
"FocusSymbols": [
"sk_has_decrypt_user",
"tcp_set_ulp",
"__tcp_set_ulp",
"psp_sock_assoc_set_rx",
"psp_nl_rx_assoc_doit"
],
"Reasoning": "The patch introduces socket state exclusivity checks between PSP (PSP Security Protocol) socket associations, TCP ULP (e.g., kTLS), and sockets with transmit validation handlers (sk_validate_xmit_skb). It adds sk_has_decrypt_user() and sk_has_validate_xmit_skb() validations in __tcp_set_ulp() and psp_sock_assoc_set_rx() to prevent conflicting socket offload states. These code paths are reachable via TCP setsockopt(TCP_ULP) and PSP Netlink commands.",
"WorthFuzzing": true
} |
| 39/1 | 2026/09/11 00:44 | action | If |
0mArgs:{
"WorthFuzzing": true
}Results: null |
| 40/2 | 2026/09/11 00:44 | agent | kmsan-evaluator |
0mModel:core Args: null Results: {
"KMSANReasoning": "The patch adds mutual exclusivity checks (sk_has_decrypt_user and sk_has_validate_xmit_skb) to prevent incompatible socket states when configuring TCP ULP (e.g. kTLS) and PSP (PSP security protocol) on the same socket. \n\nIt does not introduce or modify any data structures, allocations, or copies to user space, nor does it access or expose any uninitialized memory. Standard testing and sanitizers like KASAN are sufficient to catch any memory safety or state management issues. A dedicated KMSAN session 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 3b4f22e1d2e2fb823d82bb64a1e19434847512c0
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 11 00:42:56 2026 +0000
syz-cluster: applied patch under review
diff --git a/include/net/sock.h b/include/net/sock.h
index 51185222aac29..ba5e5092f192c 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -2312,6 +2312,17 @@ static inline void sk_gso_disable(struct sock *sk)
sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
}
+static inline bool sk_has_validate_xmit_skb(const struct sock *sk)
+{
+#ifdef CONFIG_SOCK_VALIDATE_XMIT
+ return !!sk->sk_validate_xmit_skb;
+#else
+ return false;
+#endif
+}
+
+bool sk_has_decrypt_user(const struct sock *sk);
+
static inline int skb_do_copy_data_nocache(struct sock *sk, struct sk_buff *skb,
struct iov_iter *from, char *to,
int copy, int offset)
diff --git a/net/core/sock.c b/net/core/sock.c
index fa60b7494c586..9489d9c479493 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -142,6 +142,7 @@
#include <trace/events/sock.h>
+#include <net/psp.h>
#include <net/tcp.h>
#include <net/busy_poll.h>
#include <net/phonet/phonet.h>
@@ -2670,6 +2671,12 @@ void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
}
EXPORT_SYMBOL_GPL(sk_setup_caps);
+bool sk_has_decrypt_user(const struct sock *sk)
+{
+ return psp_sk_assoc(sk) ||
+ (sk_is_inet(sk) && inet_csk_has_ulp(sk)); /* for tls */
+}
+
/*
* Simple resource managers for sockets.
*/
diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c
index 2aa442128630e..f3e0c9d379bb6 100644
--- a/net/ipv4/tcp_ulp.c
+++ b/net/ipv4/tcp_ulp.c
@@ -136,6 +136,10 @@ static int __tcp_set_ulp(struct sock *sk, const struct tcp_ulp_ops *ulp_ops)
if (icsk->icsk_ulp_ops)
goto out_err;
+ err = -EINVAL;
+ if (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk))
+ goto out_err;
+
if (sk->sk_socket)
clear_bit(SOCK_SUPPORT_ZC, &sk->sk_socket->flags);
diff --git a/net/psp/psp_sock.c b/net/psp/psp_sock.c
index 1a2a6b7516b0f..509035617894a 100644
--- a/net/psp/psp_sock.c
+++ b/net/psp/psp_sock.c
@@ -143,6 +143,10 @@ int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,
NL_SET_ERR_MSG(extack, "Socket already has PSP state");
err = -EBUSY;
goto exit_unlock;
+ } else if (sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk)) {
+ NL_SET_ERR_MSG(extack, "Socket has incompatible state");
+ err = -EINVAL;
+ goto exit_unlock;
}
refcount_inc(&pas->refcnt);
diff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config
index b6989c7d3d9d1..4838adf27fa1b 100644
--- a/tools/testing/selftests/drivers/net/config
+++ b/tools/testing/selftests/drivers/net/config
@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCH_PRIO=m
CONFIG_PPP=y
CONFIG_PPPOE=y
+CONFIG_TLS=y
CONFIG_VLAN_8021Q=m
CONFIG_XDP_SOCKETS=y
diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py
index 315648a770d00..12b27f2a3fa1b 100755
--- a/tools/testing/selftests/drivers/net/psp.py
+++ b/tools/testing/selftests/drivers/net/psp.py
@@ -23,6 +23,8 @@ from lib.py import NetNSEnter
from lib.py import bkg, rand_port, wait_port_listen
from lib.py import ip
+TCP_ULP = 31
+
def _get_outq(s):
one = b'\0' * 4
@@ -333,6 +335,50 @@ def assoc_version_mismatch(cfg):
ksft_eq(the_exception.nl_msg.error, -errno.EINVAL)
+def _require_tls_ulp():
+ with socket.create_server(("localhost", 0)) as srv:
+ with socket.create_connection(srv.getsockname()) as s:
+ try:
+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+ except OSError as exc:
+ raise KsftSkipEx("kTLS not available") from exc
+
+
+def assoc_psp_ulp_exclusive(cfg):
+ """ Test that a TCP ULP cannot be attached to a PSP socket """
+ _init_psp_dev(cfg)
+ _require_tls_ulp()
+
+ with _make_clr_conn(cfg) as s:
+ try:
+ cfg.pspnl.rx_assoc({"version": 0,
+ "dev-id": cfg.psp_dev_id,
+ "sock-fd": s.fileno()})
+ with ksft_raises(OSError) as cm:
+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+ ksft_eq(cm.exception.errno, errno.EINVAL)
+ finally:
+ _close_conn(cfg, s)
+
+
+def assoc_ulp_psp_exclusive(cfg):
+ """ Test that a PSP assoc cannot be added to a socket with a TCP ULP """
+ _init_psp_dev(cfg)
+ _require_tls_ulp()
+
+ with _make_clr_conn(cfg) as s:
+ try:
+ s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+ with ksft_raises(NlError) as cm:
+ cfg.pspnl.rx_assoc({"version": 0,
+ "dev-id": cfg.psp_dev_id,
+ "sock-fd": s.fileno()})
+ ksft_eq(cm.exception.nl_msg.error, -errno.EINVAL)
+ ksft_eq(cm.exception.nl_msg.extack['bad-attr'], ".sock-fd")
+ finally:
+ _close_conn(cfg, s)
+
+
def assoc_twice(cfg):
""" Test reusing Tx assoc for two sockets """
_init_psp_dev(cfg)
|
| 41/3 | 2026/09/11 00:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 3955 output: 19 thoughts: 558 Thoughts: **My Analysis of the Mutual Exclusion Patch** Okay, so this patch is all about enforcing mutual exclusivity between PSP (the PSP security protocol/socket) and TCP ULPs (like kTLS) on a single socket. It's also adding checks for `sk_has_validate_xmit_skb(sk)`, which I'll need to keep in mind. Let's break down the changes: * **Header and Declarations:** We've got `include/net/sock.h` adding an inline `sk_has_validate_xmit_skb(const struct sock *sk)` and declaring `bool sk_has_decrypt_user(const struct sock *sk);` This seems straightforward. The new `sk_has_validate_xmit_skb` likely simplifies checking for something, and `sk_has_decrypt_user` will be key. * **Definition of `sk_has_decrypt_user`:** In `net/core/sock.c`, the definition of `sk_has_decrypt_user(const struct sock *sk)` is the core logic: `return psp_sk_assoc(sk) || (sk_is_inet(sk) && inet_csk_has_ulp(sk));`. Essentially, if either PSP is associated OR if it's an inet socket *and* a ULP is present (like TLS), then we say decryption is handled. Makes sense. * **Enforcement in ULP and PSP:** The `net/ipv4/tcp_ulp.c` in `__tcp_set_ulp` checks for `sk_has_decrypt_user(sk) || sk_has_validate_xmit_skb(sk)`. If *either* of those conditions is true, it errors out. This is where the mutual exclusion comes into play: you can't set a ULP if PSP is already active or `validate_xmit_skb` is set. Similarly, in `net/psp/psp_sock.c`, `psp_sock_assoc_set_rx` checks for the same conditions before allowing a PSP association. * **Selftests:** Finally, there are updates to the selftests which I'll certainly need to review. So, in essence, the patch rigorously prevents attaching a ULP if PSP is active, or `validate_xmit_skb` is present. And conversely, it prevents attaching PSP if a ULP or `validate_xmit_skb` is already there. It's a clean exclusivity implementation. **Memory Safety Considerations:** Now, let's think about potential risks. Crucially: * No new memory allocations, so no obvious allocation-related bugs. * No `copy_to_user` calls that could leak information. * No new uninitialized struct fields are introduced. * No branching based on uninitialized data, so no control-flow issues. * This is strictly a mutual exclusion enforcement, so it shouldn't introduce any new security vulnerabilities or memory risks, assuming the functions it uses (`psp_sk_assoc`, `inet_csk_has_ulp`, and `sk_has_validate_xmit_skb`) are themselves safe. **Remaining Concerns:** I'm confident the memory aspects are handled. However, I need to do a thorough review of the implementations of `psp_sk_assoc`, `inet_csk_has_ulp` and what `sk_has_validate_xmit_skb` means. I'll check that those functions themselves are robust and correctly handle their respective states. That’s probably the most critical area to verify. Also, the selftests should be comprehensive enough to cover all the possible scenarios. I'll need to go through those with a fine-tooth comb. |
| 42/3 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "psp_sk_assoc"
}Results: {
"Output": "include/net/psp/functions.h=33=unsigned int psp_key_size(u32 version);\ninclude/net/psp/functions.h:34:void psp_sk_assoc_free(struct sock *sk);\ninclude/net/psp/functions.h-35-void psp_twsk_init(struct inet_timewait_sock *tw, const struct sock *sk);\n--\ninclude/net/psp/functions.h=37=void psp_reply_set_decrypted(const struct sock *sk, struct sk_buff *skb);\ninclude/net/psp/functions.h-38-\ninclude/net/psp/functions.h:39:static inline struct psp_assoc *psp_sk_assoc(const struct sock *sk)\ninclude/net/psp/functions.h-40-{\n--\ninclude/net/psp/functions.h=45=psp_enqueue_set_decrypted(struct sock *sk, struct sk_buff *skb)\n--\ninclude/net/psp/functions.h-48-\ninclude/net/psp/functions.h:49:\tpas = psp_sk_assoc(sk);\ninclude/net/psp/functions.h-50-\tif (pas \u0026\u0026 pas-\u003etx.spi)\n--\ninclude/net/psp/functions.h=116=psp_sk_rx_policy_check(struct sock *sk, struct sk_buff *skb)\ninclude/net/psp/functions.h-117-{\ninclude/net/psp/functions.h:118:\treturn __psp_sk_rx_policy_check(skb, psp_sk_assoc(sk));\ninclude/net/psp/functions.h-119-}\n--\ninclude/net/psp/functions.h=150=static inline unsigned int psp_sk_overhead(const struct sock *sk)\n--\ninclude/net/psp/functions.h-157-#else\ninclude/net/psp/functions.h:158:static inline void psp_sk_assoc_free(struct sock *sk) { }\ninclude/net/psp/functions.h-159-static inline void\n--\ninclude/net/psp/functions.h=163=psp_reply_set_decrypted(const struct sock *sk, struct sk_buff *skb) { }\ninclude/net/psp/functions.h-164-\ninclude/net/psp/functions.h:165:static inline struct psp_assoc *psp_sk_assoc(const struct sock *sk)\ninclude/net/psp/functions.h-166-{\n--\nnet/core/sock.c=2674=bool sk_has_decrypt_user(const struct sock *sk)\nnet/core/sock.c-2675-{\nnet/core/sock.c:2676:\treturn psp_sk_assoc(sk) ||\nnet/core/sock.c-2677-\t (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)); /* for tls */\n--\nnet/ipv4/af_inet.c=140=void inet_sock_destruct(struct sock *sk)\n--\nnet/ipv4/af_inet.c-166-\tdst_release(rcu_dereference_protected(sk-\u003esk_rx_dst, 1));\nnet/ipv4/af_inet.c:167:\tpsp_sk_assoc_free(sk);\nnet/ipv4/af_inet.c-168-}\n--\nnet/psp/psp_sock.c=118=void psp_assoc_put(struct psp_assoc *pas)\n--\nnet/psp/psp_sock.c-123-\nnet/psp/psp_sock.c:124:void psp_sk_assoc_free(struct sock *sk)\nnet/psp/psp_sock.c-125-{\n--\nnet/psp/psp_sock.c=132=int psp_sock_assoc_set_rx(struct sock *sk, struct psp_assoc *pas,\n--\nnet/psp/psp_sock.c-141-\nnet/psp/psp_sock.c:142:\tif (psp_sk_assoc(sk)) {\nnet/psp/psp_sock.c-143-\t\tNL_SET_ERR_MSG(extack, \"Socket already has PSP state\");\n--\nnet/psp/psp_sock.c=181=int psp_sock_assoc_set_tx(struct sock *sk, struct psp_dev *psd,\n--\nnet/psp/psp_sock.c-190-\nnet/psp/psp_sock.c:191:\tpas = psp_sk_assoc(sk);\nnet/psp/psp_sock.c-192-\tif (!pas) {\n--\nnet/psp/psp_sock.c=270=void psp_twsk_init(struct inet_timewait_sock *tw, const struct sock *sk)\nnet/psp/psp_sock.c-271-{\nnet/psp/psp_sock.c:272:\tstruct psp_assoc *pas = psp_sk_assoc(sk);\nnet/psp/psp_sock.c-273-\n"
} |
| 43/3 | 2026/09/11 00:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 6648 output: 22 thoughts: 17 Thoughts: Okay, here's my attempt at summarizing that thought process, as if it were my own, assuming I'm an expert in network programming/kernel internals: **Checking a Related Function** Right, I'm already in this section, reviewing the current state of things. Before I move on or finalize this particular check, I should probably also verify `inet_csk_has_ulp`. It’s a related function, likely operating in a similar context or on similar data structures. I need to ensure my understanding and assumptions are consistent across this related code. It's too easy to miss something when focusing on just one function. Making sure I account for this related function will help me be thorough in my review. Let's make sure I didn't overlook something. |
| 44/3 | 2026/09/11 00:44 | tool | grepper |
0mArgs:{
"Expression": "inet_csk_has_ulp"
}Results: {
"Output": "include/net/inet_connection_sock.h=338=static inline void inet_csk_inc_pingpong_cnt(struct sock *sk)\n--\ninclude/net/inet_connection_sock.h-345-\ninclude/net/inet_connection_sock.h:346:static inline bool inet_csk_has_ulp(const struct sock *sk)\ninclude/net/inet_connection_sock.h-347-{\n--\nnet/core/skmsg.c=750=struct sk_psock *sk_psock_init(struct sock *sk, int node)\n--\nnet/core/skmsg.c-756-\nnet/core/skmsg.c:757:\tif (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)) {\nnet/core/skmsg.c-758-\t\tpsock = ERR_PTR(-EINVAL);\n--\nnet/core/sock.c=2674=bool sk_has_decrypt_user(const struct sock *sk)\n--\nnet/core/sock.c-2676-\treturn psp_sk_assoc(sk) ||\nnet/core/sock.c:2677:\t (sk_is_inet(sk) \u0026\u0026 inet_csk_has_ulp(sk)); /* for tls */\nnet/core/sock.c-2678-}\n--\nnet/ipv4/tcp_bpf.c=725=int tcp_bpf_update_proto(struct sock *sk, struct sk_psock *psock, bool restore)\n--\nnet/ipv4/tcp_bpf.c-734-\tif (restore) {\nnet/ipv4/tcp_bpf.c:735:\t\tif (inet_csk_has_ulp(sk)) {\nnet/ipv4/tcp_bpf.c-736-\t\t\t/* TLS does not have an unhash proto in SW cases,\n"
} |
| 45/3 | 2026/09/11 00:44 | llm | kmsan-evaluator |
0mModel:gemini-3.7-flash Args: null Results: null Tokens: input: 7333 output: 144 thoughts: 88 Thoughts: Okay, here's my take on those changes: **Analyzing the Mutual Exclusion and Validation Checks** Right, so I've looked over these recent modifications, and it seems the focus is strictly on mutual exclusion and validation checks. We're talking about functions like `sk_has_decrypt_user` and `sk_has_validate_xmit_skb`. These are essentially gatekeepers, ensuring that the attachment of PSP and ULP/xmit validation to a socket don't happen simultaneously. That's good, minimizes concurrency issues. Crucially, from what I can see, these changes don't introduce anything truly concerning from a memory perspective. I'm not seeing any new memory allocation, we're not copying uninitialized memory around, and there aren't any new branching paths that would depend on potentially uninitialized data. That's a huge relief. Therefore, because of the nature of the changes, I can confidently say that we don't need to involve KMSAN in this particular area. It looks like we're safe. Now, let's prepare the call to `set-results`. |
| 46/3 | 2026/09/11 00:44 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch adds mutual exclusivity checks (sk_has_decrypt_user and sk_has_validate_xmit_skb) to prevent incompatible socket states when configuring TCP ULP (e.g. kTLS) and PSP (PSP security protocol) on the same socket. \n\nIt does not introduce or modify any data structures, allocations, or copies to user space, nor does it access or expose any uninitialized memory. Standard testing and sanitizers like KASAN are sufficient to catch any memory safety or state management issues. A dedicated KMSAN session is not needed.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch adds mutual exclusivity checks (sk_has_decrypt_user and sk_has_validate_xmit_skb) to prevent incompatible socket states when configuring TCP ULP (e.g. kTLS) and PSP (PSP security protocol) on the same socket. \n\nIt does not introduce or modify any data structures, allocations, or copies to user space, nor does it access or expose any uninitialized memory. Standard testing and sanitizers like KASAN are sufficient to catch any memory safety or state management issues. A dedicated KMSAN session 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) |
|---|