| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/21 17:07 | flow | patch-triage |
3mArgs:null Results: {
"EnableConfigs": [
"QRTR"
],
"FocusSymbols": [
"qrtr_getname",
"qrtr_ioctl"
],
"KMSANReasoning": "The patch resolves potential kernel information leaks to user space in qrtr_getname() and qrtr_ioctl(SIOCGIFADDR) by ensuring proper zero-initialization. Specifically:\n1. In qrtr_getname(), 'struct sockaddr_qrtr qaddr' is explicitly zero-initialized with '= {}', and members sq_node, sq_port, and sq_family are explicitly assigned, preventing any uninitialized struct padding bytes from being copied to user space.\n2. In qrtr_ioctl(SIOCGIFADDR), 'ifr.ifr_addr' is zeroed via memset() before copying sq_family, sq_node, and sq_port, preventing struct padding or uninitialized sockaddr bytes from being leaked via put_user_ifreq().\n\nAll stack structures modified or introduced by this patch are fully initialized/zeroed before being read or copied. The patch does not introduce or expose any uninitialized memory risks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false,
"Reasoning": "The patch fixes potential kernel information disclosures in AF_QIPCRTR socket operations by zeroing structures and explicitly copying individual fields rather than copying structures containing padding. The affected code paths (qrtr_getname and qrtr_ioctl) are reachable from userspace via socket operations (getsockname, getpeername, and ioctl SIOCGIFADDR) and are suitable for fuzzing.",
"WorthFuzzing": true
} |
| 1/1 | 2026/09/21 17:07 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 006e2be471f49b5444c6a962c01dc9645bd10c62\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Mon Sep 21 17:07:32 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c\nindex 78347c937af76..ee3cc2c32b73d 100644\n--- a/net/qrtr/af_qrtr.c\n+++ b/net/qrtr/af_qrtr.c\n@@ -1178,7 +1178,7 @@ static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n \t\t\tint peer)\n {\n \tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n-\tstruct sockaddr_qrtr qaddr;\n+\tstruct sockaddr_qrtr qaddr = {};\n \tstruct sock *sk = sock-\u003esk;\n \n \tlock_sock(sk);\n@@ -1188,9 +1188,11 @@ static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n \t\t\treturn -ENOTCONN;\n \t\t}\n \n-\t\tqaddr = ipc-\u003epeer;\n+\t\tqaddr.sq_node = ipc-\u003epeer.sq_node;\n+\t\tqaddr.sq_port = ipc-\u003epeer.sq_port;\n \t} else {\n-\t\tqaddr = ipc-\u003eus;\n+\t\tqaddr.sq_node = ipc-\u003eus.sq_node;\n+\t\tqaddr.sq_port = ipc-\u003eus.sq_port;\n \t}\n \trelease_sock(sk);\n \n@@ -1233,8 +1235,11 @@ static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n \t\t\tbreak;\n \t\t}\n \n+\t\tmemset(\u0026ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));\n \t\tsq = (struct sockaddr_qrtr *)\u0026ifr.ifr_addr;\n-\t\t*sq = ipc-\u003eus;\n+\t\tsq-\u003esq_family = ipc-\u003eus.sq_family;\n+\t\tsq-\u003esq_node = ipc-\u003eus.sq_node;\n+\t\tsq-\u003esq_port = ipc-\u003eus.sq_port;\n \t\tif (put_user_ifreq(\u0026ifr, argp)) {\n \t\t\trc = -EFAULT;\n \t\t\tbreak;\n"
} |
| 2/1 | 2026/09/21 17:07 | agent | patch-evaluator |
1mModel:core Args: null Results: {
"EnableConfigs": [
"QRTR"
],
"FocusSymbols": [
"qrtr_getname",
"qrtr_ioctl"
],
"Reasoning": "The patch fixes potential kernel information disclosures in AF_QIPCRTR socket operations by zeroing structures and explicitly copying individual fields rather than copying structures containing padding. The affected code paths (qrtr_getname and qrtr_ioctl) are reachable from userspace via socket operations (getsockname, getpeername, and ioctl SIOCGIFADDR) and are suitable for fuzzing.",
"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 006e2be471f49b5444c6a962c01dc9645bd10c62
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Sep 21 17:07:32 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c
index 78347c937af76..ee3cc2c32b73d 100644
--- a/net/qrtr/af_qrtr.c
+++ b/net/qrtr/af_qrtr.c
@@ -1178,7 +1178,7 @@ static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,
int peer)
{
struct qrtr_sock *ipc = qrtr_sk(sock->sk);
- struct sockaddr_qrtr qaddr;
+ struct sockaddr_qrtr qaddr = {};
struct sock *sk = sock->sk;
lock_sock(sk);
@@ -1188,9 +1188,11 @@ static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,
return -ENOTCONN;
}
- qaddr = ipc->peer;
+ qaddr.sq_node = ipc->peer.sq_node;
+ qaddr.sq_port = ipc->peer.sq_port;
} else {
- qaddr = ipc->us;
+ qaddr.sq_node = ipc->us.sq_node;
+ qaddr.sq_port = ipc->us.sq_port;
}
release_sock(sk);
@@ -1233,8 +1235,11 @@ static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
}
+ memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));
sq = (struct sockaddr_qrtr *)&ifr.ifr_addr;
- *sq = ipc->us;
+ sq->sq_family = ipc->us.sq_family;
+ sq->sq_node = ipc->us.sq_node;
+ sq->sq_port = ipc->us.sq_port;
if (put_user_ifreq(&ifr, argp)) {
rc = -EFAULT;
break;
|
| 3/2 | 2026/09/21 17:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3214 output: 40 thoughts: 392 Thoughts: **Analyzing the QRTR Patch**
Okay, let's dive into this patch. I see modifications in `net/qrtr/af_qrtr.c`, specifically concerning `qrtr_getname` and `qrtr_ioctl`. Focusing on `qrtr_getname`, the first thing that jumps out is the initialization of the `sockaddr_qrtr` structure, `qaddr`. Before, it looks like `qaddr` wasn't initialized, but now it is:
```c
- struct sockaddr_qrtr qaddr;
+ struct sockaddr_qrtr qaddr = {};
```
Good, that’s a sensible change. Now, looking deeper, the update copies `sq_node` and `sq_port` from `ipc->peer` or `ipc->us`. But hold on... did it properly set `qaddr.sq_family`? Because, based on what I see in the code, it does not seem like that variable is initialised.
Let me take a look at the code block where the struct members are copied over:
```c
+ qaddr.sq_node = ipc->peer.sq_node;
+ qaddr.sq_port = ipc->peer.sq_port;
```
I'm getting that nagging feeling that it should have set `qaddr.sq_family = AF_QIPCRTR` as well. I'm going to read the surrounding code in `net/qrtr/af_qrtr.c` around line 1178 using `read-file` to get the complete picture and check if that initialization is done elsewhere in the function. I want to see if this is an oversight, or if the family is being set somewhere else.
|
| 4/2 | 2026/09/21 17:07 | tool | read-file |
0mArgs:{
"File": "net/qrtr/af_qrtr.c",
"FirstLine": 1175,
"LineCount": 75
}Results: {
"Contents": "1175:\t}\n1176:\t\n1177:\tstatic int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n1178:\t\t\t\tint peer)\n1179:\t{\n1180:\t\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n1181:\t\tstruct sockaddr_qrtr qaddr = {};\n1182:\t\tstruct sock *sk = sock-\u003esk;\n1183:\t\n1184:\t\tlock_sock(sk);\n1185:\t\tif (peer) {\n1186:\t\t\tif (sk-\u003esk_state != TCP_ESTABLISHED) {\n1187:\t\t\t\trelease_sock(sk);\n1188:\t\t\t\treturn -ENOTCONN;\n1189:\t\t\t}\n1190:\t\n1191:\t\t\tqaddr.sq_node = ipc-\u003epeer.sq_node;\n1192:\t\t\tqaddr.sq_port = ipc-\u003epeer.sq_port;\n1193:\t\t} else {\n1194:\t\t\tqaddr.sq_node = ipc-\u003eus.sq_node;\n1195:\t\t\tqaddr.sq_port = ipc-\u003eus.sq_port;\n1196:\t\t}\n1197:\t\trelease_sock(sk);\n1198:\t\n1199:\t\tqaddr.sq_family = AF_QIPCRTR;\n1200:\t\n1201:\t\tmemcpy(saddr, \u0026qaddr, sizeof(qaddr));\n1202:\t\n1203:\t\treturn sizeof(qaddr);\n1204:\t}\n1205:\t\n1206:\tstatic int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n1207:\t{\n1208:\t\tvoid __user *argp = (void __user *)arg;\n1209:\t\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n1210:\t\tstruct sock *sk = sock-\u003esk;\n1211:\t\tstruct sockaddr_qrtr *sq;\n1212:\t\tstruct sk_buff *skb;\n1213:\t\tstruct ifreq ifr;\n1214:\t\tlong len = 0;\n1215:\t\tint rc = 0;\n1216:\t\n1217:\t\tlock_sock(sk);\n1218:\t\n1219:\t\tswitch (cmd) {\n1220:\t\tcase TIOCOUTQ:\n1221:\t\t\tlen = sk-\u003esk_sndbuf - sk_wmem_alloc_get(sk);\n1222:\t\t\tif (len \u003c 0)\n1223:\t\t\t\tlen = 0;\n1224:\t\t\trc = put_user(len, (int __user *)argp);\n1225:\t\t\tbreak;\n1226:\t\tcase TIOCINQ:\n1227:\t\t\tskb = skb_peek(\u0026sk-\u003esk_receive_queue);\n1228:\t\t\tif (skb)\n1229:\t\t\t\tlen = skb-\u003elen;\n1230:\t\t\trc = put_user(len, (int __user *)argp);\n1231:\t\t\tbreak;\n1232:\t\tcase SIOCGIFADDR:\n1233:\t\t\tif (get_user_ifreq(\u0026ifr, NULL, argp)) {\n1234:\t\t\t\trc = -EFAULT;\n1235:\t\t\t\tbreak;\n1236:\t\t\t}\n1237:\t\n1238:\t\t\tmemset(\u0026ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));\n1239:\t\t\tsq = (struct sockaddr_qrtr *)\u0026ifr.ifr_addr;\n1240:\t\t\tsq-\u003esq_family = ipc-\u003eus.sq_family;\n1241:\t\t\tsq-\u003esq_node = ipc-\u003eus.sq_node;\n1242:\t\t\tsq-\u003esq_port = ipc-\u003eus.sq_port;\n1243:\t\t\tif (put_user_ifreq(\u0026ifr, argp)) {\n1244:\t\t\t\trc = -EFAULT;\n1245:\t\t\t\tbreak;\n1246:\t\t\t}\n1247:\t\t\tbreak;\n1248:\t\tcase SIOCADDRT:\n1249:\t\tcase SIOCDELRT:\n"
} |
| 5/2 | 2026/09/21 17:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 5122 output: 19 thoughts: 99 Thoughts: **Analyzing Potential Information Leakage in QRTR Subsystem** Okay, here's what's running through my head. I'm looking at some QRTR code, specifically around the `qrtr_ioctl` function. I've just spotted the line `qaddr.sq_family = AF_QIPCRTR;` on line 1199, which isn't the key focus, but is a data point. What's really piquing my interest is that a previous implementation of `SIOCGIFADDR` within `qrtr_ioctl` appears to have directly assigned `*sq = ipc->us;`. This has alarm bells ringing because this could potentially lead to some serious information leaks. I'm thinking about uninitialized padding, possibly exposing kernel stack or heap memory. I'm also considering the structure of the `ifr.ifr_addr` itself; could that contain padding? And finally, what does `sockaddr_qrtr` look like under the hood in terms of padding? I need to drill down into the definition of `struct sockaddr_qrtr` to figure this out. This looks like a vulnerability that needs further investigation. |
| 6/2 | 2026/09/21 17:07 | tool | grepper |
0mArgs:{
"Expression": "struct sockaddr_qrtr"
}Results: {
"Output": "drivers/net/ipa/ipa_qmi.c=80=static void ipa_server_init_complete(struct ipa_qmi *ipa_qmi)\n--\ndrivers/net/ipa/ipa_qmi.c-83-\tstruct qmi_handle *qmi = \u0026ipa_qmi-\u003eserver_handle;\ndrivers/net/ipa/ipa_qmi.c:84:\tstruct sockaddr_qrtr *sq = \u0026ipa_qmi-\u003emodem_sq;\ndrivers/net/ipa/ipa_qmi.c-85-\tstruct ipa_init_complete_ind ind = { };\n--\ndrivers/net/ipa/ipa_qmi.c=175=static void ipa_server_indication_register(struct qmi_handle *qmi,\ndrivers/net/ipa/ipa_qmi.c:176:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/ipa/ipa_qmi.c-177-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/ipa/ipa_qmi.c=204=static void ipa_server_driver_init_complete(struct qmi_handle *qmi,\ndrivers/net/ipa/ipa_qmi.c:205:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/ipa/ipa_qmi.c-206-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/ipa/ipa_qmi.c=252=static void ipa_client_init_driver(struct qmi_handle *qmi,\ndrivers/net/ipa/ipa_qmi.c:253:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/ipa/ipa_qmi.c-254-\t\t\t\t struct qmi_txn *txn, const void *decoded)\n--\ndrivers/net/ipa/ipa_qmi.h=28=struct ipa_qmi {\n--\ndrivers/net/ipa/ipa_qmi.h-32-\t/* Information used for the client handle */\ndrivers/net/ipa/ipa_qmi.h:33:\tstruct sockaddr_qrtr modem_sq;\ndrivers/net/ipa/ipa_qmi.h-34-\tstruct work_struct init_driver_work;\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=946=static void ath10k_qmi_fw_ready_ind(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath10k/qmi.c:947:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath10k/qmi.c-948-\t\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=955=static void ath10k_qmi_msa_ready_ind(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath10k/qmi.c:956:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath10k/qmi.c-957-\t\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=982=static int ath10k_qmi_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-985-\tstruct ath10k_qmi *qmi = container_of(qmi_hdl, struct ath10k_qmi, qmi_hdl);\ndrivers/net/wireless/ath/ath10k/qmi.c:986:\tstruct sockaddr_qrtr *sq = \u0026qmi-\u003esq;\ndrivers/net/wireless/ath/ath10k/qmi.c-987-\tstruct ath10k *ar = qmi-\u003ear;\n--\ndrivers/net/wireless/ath/ath10k/qmi.h=91=struct ath10k_qmi {\n--\ndrivers/net/wireless/ath/ath10k/qmi.h-93-\tstruct qmi_handle qmi_hdl;\ndrivers/net/wireless/ath/ath10k/qmi.h:94:\tstruct sockaddr_qrtr sq;\ndrivers/net/wireless/ath/ath10k/qmi.h-95-\tstruct work_struct event_work;\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3021=static void ath11k_qmi_msg_mem_request_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3022:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3023-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3067=static void ath11k_qmi_msg_mem_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3068:\t\t\t\t\tstruct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3069-\t\t\t\t\tstruct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3079=static void ath11k_qmi_msg_fw_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3080:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3081-\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3097=static void ath11k_qmi_msg_cold_boot_cal_done_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3098:\t\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3099-\t\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3111=static void ath11k_qmi_msg_fw_init_done_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3112:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3113-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3167=static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c-3171-\tstruct ath11k_base *ab = qmi-\u003eab;\ndrivers/net/wireless/ath/ath11k/qmi.c:3172:\tstruct sockaddr_qrtr *sq = \u0026qmi-\u003esq;\ndrivers/net/wireless/ath/ath11k/qmi.c-3173-\tint ret;\n--\ndrivers/net/wireless/ath/ath11k/qmi.h=129=struct ath11k_qmi {\n--\ndrivers/net/wireless/ath/ath11k/qmi.h-131-\tstruct qmi_handle handle;\ndrivers/net/wireless/ath/ath11k/qmi.h:132:\tstruct sockaddr_qrtr sq;\ndrivers/net/wireless/ath/ath11k/qmi.h-133-\tstruct work_struct event_work;\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3841=static void ath12k_qmi_msg_mem_request_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath12k/qmi.c:3842:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath12k/qmi.c-3843-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3886=static void ath12k_qmi_msg_mem_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath12k/qmi.c:3887:\t\t\t\t\tstruct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath12k/qmi.c-3888-\t\t\t\t\tstruct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3898=static void ath12k_qmi_msg_fw_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath12k/qmi.c:3899:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath12k/qmi.c-3900-\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3937=static int ath12k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c-3941-\tstruct ath12k_base *ab = qmi-\u003eab;\ndrivers/net/wireless/ath/ath12k/qmi.c:3942:\tstruct sockaddr_qrtr *sq = \u0026qmi-\u003esq;\ndrivers/net/wireless/ath/ath12k/qmi.c-3943-\tint ret;\n--\ndrivers/net/wireless/ath/ath12k/qmi.h=131=struct ath12k_qmi {\n--\ndrivers/net/wireless/ath/ath12k/qmi.h-133-\tstruct qmi_handle handle;\ndrivers/net/wireless/ath/ath12k/qmi.h:134:\tstruct sockaddr_qrtr sq;\ndrivers/net/wireless/ath/ath12k/qmi.h-135-\tstruct work_struct event_work;\n--\ndrivers/remoteproc/qcom_sysmon.c=20=struct qcom_sysmon {\n--\ndrivers/remoteproc/qcom_sysmon.c-49-\tstruct qmi_handle qmi;\ndrivers/remoteproc/qcom_sysmon.c:50:\tstruct sockaddr_qrtr ssctl;\ndrivers/remoteproc/qcom_sysmon.c-51-};\n--\ndrivers/remoteproc/qcom_sysmon.c=285=static const struct qmi_elem_info ssctl_shutdown_ind_ei[] = {\n--\ndrivers/remoteproc/qcom_sysmon.c-288-\ndrivers/remoteproc/qcom_sysmon.c:289:static void sysmon_ind_cb(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/remoteproc/qcom_sysmon.c-290-\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/slimbus/qcom-ngd-ctrl.c=121=struct qcom_slim_ngd_qmi {\ndrivers/slimbus/qcom-ngd-ctrl.c-122-\tstruct qmi_handle qmi;\ndrivers/slimbus/qcom-ngd-ctrl.c:123:\tstruct sockaddr_qrtr svc_info;\ndrivers/slimbus/qcom-ngd-ctrl.c-124-\tstruct qmi_handle svc_event_hdl;\n--\ndrivers/slimbus/qcom-ngd-ctrl.c=386=static void qcom_slim_qmi_power_resp_cb(struct qmi_handle *handle,\ndrivers/slimbus/qcom-ngd-ctrl.c:387:\t\t\t\t\tstruct sockaddr_qrtr *sq,\ndrivers/slimbus/qcom-ngd-ctrl.c-388-\t\t\t\t\tstruct qmi_txn *txn, const void *data)\n--\ndrivers/soc/qcom/pdr_interface.c=15=struct pdr_service {\n--\ndrivers/soc/qcom/pdr_interface.c-18-\ndrivers/soc/qcom/pdr_interface.c:19:\tstruct sockaddr_qrtr addr;\ndrivers/soc/qcom/pdr_interface.c-20-\n--\ndrivers/soc/qcom/pdr_interface.c=35=struct pdr_handle {\n--\ndrivers/soc/qcom/pdr_interface.c-38-\ndrivers/soc/qcom/pdr_interface.c:39:\tstruct sockaddr_qrtr locator_addr;\ndrivers/soc/qcom/pdr_interface.c-40-\n--\ndrivers/soc/qcom/pdr_interface.c=294=static void pdr_indication_cb(struct qmi_handle *qmi,\ndrivers/soc/qcom/pdr_interface.c:295:\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/pdr_interface.c-296-\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/soc/qcom/pdr_interface.c=558=int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds)\n--\ndrivers/soc/qcom/pdr_interface.c-561-\tstruct servreg_restart_pd_req req = { 0 };\ndrivers/soc/qcom/pdr_interface.c:562:\tstruct sockaddr_qrtr addr;\ndrivers/soc/qcom/pdr_interface.c-563-\tstruct pdr_service *tmp;\n--\ndrivers/soc/qcom/qcom_pd_mapper.c=148=static void qcom_pdm_get_domain_list(struct qmi_handle *qmi,\ndrivers/soc/qcom/qcom_pd_mapper.c:149:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qcom_pd_mapper.c-150-\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/soc/qcom/qcom_pd_mapper.c=214=static void qcom_pdm_pfr(struct qmi_handle *qmi,\ndrivers/soc/qcom/qcom_pd_mapper.c:215:\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qcom_pd_mapper.c-216-\t\t\t struct qmi_txn *txn,\n--\ndrivers/soc/qcom/qmi_interface.c=18=static struct socket *qmi_sock_create(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:19:\t\t\t\t struct sockaddr_qrtr *sq);\ndrivers/soc/qcom/qmi_interface.c-20-\n--\ndrivers/soc/qcom/qmi_interface.c=165=static void qmi_send_new_lookup(struct qmi_handle *qmi, struct qmi_service *svc)\n--\ndrivers/soc/qcom/qmi_interface.c-167-\tstruct qrtr_ctrl_pkt pkt;\ndrivers/soc/qcom/qmi_interface.c:168:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-169-\tstruct msghdr msg = { };\n--\ndrivers/soc/qcom/qmi_interface.c=228=static void qmi_send_new_server(struct qmi_handle *qmi, struct qmi_service *svc)\n--\ndrivers/soc/qcom/qmi_interface.c-230-\tstruct qrtr_ctrl_pkt pkt;\ndrivers/soc/qcom/qmi_interface.c:231:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-232-\tstruct msghdr msg = { };\n--\ndrivers/soc/qcom/qmi_interface.c=378=EXPORT_SYMBOL_GPL(qmi_txn_cancel);\n--\ndrivers/soc/qcom/qmi_interface.c-389- */\ndrivers/soc/qcom/qmi_interface.c:390:static void qmi_invoke_handler(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-391-\t\t\t struct qmi_txn *txn, const void *buf, size_t len)\n--\ndrivers/soc/qcom/qmi_interface.c=440=static void qmi_handle_net_reset(struct qmi_handle *qmi)\ndrivers/soc/qcom/qmi_interface.c-441-{\ndrivers/soc/qcom/qmi_interface.c:442:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-443-\tstruct qmi_service *svc;\n--\ndrivers/soc/qcom/qmi_interface.c=472=static void qmi_handle_message(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:473:\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-474-\t\t\t const void *buf, size_t len)\n--\ndrivers/soc/qcom/qmi_interface.c=523=static void qmi_data_ready_work(struct work_struct *work)\n--\ndrivers/soc/qcom/qmi_interface.c-526-\tstruct qmi_ops *ops = \u0026qmi-\u003eops;\ndrivers/soc/qcom/qmi_interface.c:527:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-528-\tstruct msghdr msg = { .msg_name = \u0026sq, .msg_namelen = sizeof(sq) };\n--\ndrivers/soc/qcom/qmi_interface.c=585=static struct socket *qmi_sock_create(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:586:\t\t\t\t struct sockaddr_qrtr *sq)\ndrivers/soc/qcom/qmi_interface.c-587-{\n--\ndrivers/soc/qcom/qmi_interface.c=739=static ssize_t qmi_send_message(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:740:\t\t\t\tstruct sockaddr_qrtr *sq, struct qmi_txn *txn,\ndrivers/soc/qcom/qmi_interface.c-741-\t\t\t\tint type, int msg_id, size_t len,\n--\ndrivers/soc/qcom/qmi_interface.c-791- */\ndrivers/soc/qcom/qmi_interface.c:792:ssize_t qmi_send_request(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-793-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\n--\ndrivers/soc/qcom/qmi_interface.c=799=EXPORT_SYMBOL_GPL(qmi_send_request);\n--\ndrivers/soc/qcom/qmi_interface.c-812- */\ndrivers/soc/qcom/qmi_interface.c:813:ssize_t qmi_send_response(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-814-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\n--\ndrivers/soc/qcom/qmi_interface.c=820=EXPORT_SYMBOL_GPL(qmi_send_response);\n--\ndrivers/soc/qcom/qmi_interface.c-832- */\ndrivers/soc/qcom/qmi_interface.c:833:ssize_t qmi_send_indication(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-834-\t\t\t int msg_id, size_t len,\n--\ninclude/linux/soc/qcom/qmi.h=158=struct qmi_ops {\n--\ninclude/linux/soc/qcom/qmi.h-161-\tvoid (*net_reset)(struct qmi_handle *qmi);\ninclude/linux/soc/qcom/qmi.h:162:\tvoid (*msg_handler)(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-163-\t\t\t const void *data, size_t count);\n--\ninclude/linux/soc/qcom/qmi.h=200=struct qmi_msg_handler {\n--\ninclude/linux/soc/qcom/qmi.h-206-\tsize_t decoded_size;\ninclude/linux/soc/qcom/qmi.h:207:\tvoid (*fn)(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-208-\t\t struct qmi_txn *txn, const void *decoded);\n--\ninclude/linux/soc/qcom/qmi.h=228=struct qmi_handle {\n--\ninclude/linux/soc/qcom/qmi.h-231-\ninclude/linux/soc/qcom/qmi.h:232:\tstruct sockaddr_qrtr sq;\ninclude/linux/soc/qcom/qmi.h-233-\n--\ninclude/linux/soc/qcom/qmi.h=260=void qmi_handle_release(struct qmi_handle *qmi);\ninclude/linux/soc/qcom/qmi.h-261-\ninclude/linux/soc/qcom/qmi.h:262:ssize_t qmi_send_request(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-263-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\ninclude/linux/soc/qcom/qmi.h-264-\t\t\t const struct qmi_elem_info *ei, const void *c_struct);\ninclude/linux/soc/qcom/qmi.h:265:ssize_t qmi_send_response(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-266-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\ninclude/linux/soc/qcom/qmi.h-267-\t\t\t const struct qmi_elem_info *ei, const void *c_struct);\ninclude/linux/soc/qcom/qmi.h:268:ssize_t qmi_send_indication(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-269-\t\t\t int msg_id, size_t len, const struct qmi_elem_info *ei,\n--\ninclude/uapi/linux/qrtr.h-10-\ninclude/uapi/linux/qrtr.h:11:struct sockaddr_qrtr {\ninclude/uapi/linux/qrtr.h-12-\t__kernel_sa_family_t sq_family;\n--\nnet/qrtr/af_qrtr.c=90=struct qrtr_sock {\n--\nnet/qrtr/af_qrtr.c-92-\tstruct sock sk;\nnet/qrtr/af_qrtr.c:93:\tstruct sockaddr_qrtr us;\nnet/qrtr/af_qrtr.c:94:\tstruct sockaddr_qrtr peer;\nnet/qrtr/af_qrtr.c-95-};\n--\nnet/qrtr/af_qrtr.c=160=static int qrtr_local_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:161:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:162:\t\t\t struct sockaddr_qrtr *to);\nnet/qrtr/af_qrtr.c-163-static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:164:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:165:\t\t\t struct sockaddr_qrtr *to);\nnet/qrtr/af_qrtr.c-166-static struct qrtr_sock *qrtr_port_lookup(int port);\n--\nnet/qrtr/af_qrtr.c=344=static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:345:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:346:\t\t\t struct sockaddr_qrtr *to)\nnet/qrtr/af_qrtr.c-347-{\n--\nnet/qrtr/af_qrtr.c=594=static void qrtr_hello_work(struct work_struct *work)\nnet/qrtr/af_qrtr.c-595-{\nnet/qrtr/af_qrtr.c:596:\tstruct sockaddr_qrtr from = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:597:\tstruct sockaddr_qrtr to = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-598-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c=675=void qrtr_endpoint_unregister(struct qrtr_endpoint *ep)\n--\nnet/qrtr/af_qrtr.c-677-\tstruct qrtr_node *node = ep-\u003enode;\nnet/qrtr/af_qrtr.c:678:\tstruct sockaddr_qrtr src = {AF_QIPCRTR, node-\u003enid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:679:\tstruct sockaddr_qrtr dst = {AF_QIPCRTR, qrtr_local_nid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-680-\tstruct radix_tree_iter iter;\n--\nnet/qrtr/af_qrtr.c=744=static void qrtr_port_remove(struct qrtr_sock *ipc)\n--\nnet/qrtr/af_qrtr.c-748-\tint port = ipc-\u003eus.sq_port;\nnet/qrtr/af_qrtr.c:749:\tstruct sockaddr_qrtr to;\nnet/qrtr/af_qrtr.c-750-\n--\nnet/qrtr/af_qrtr.c=833=static int __qrtr_bind(struct socket *sock,\nnet/qrtr/af_qrtr.c:834:\t\t const struct sockaddr_qrtr *addr, int zapped)\nnet/qrtr/af_qrtr.c-835-{\n--\nnet/qrtr/af_qrtr.c=865=static int qrtr_autobind(struct socket *sock)\n--\nnet/qrtr/af_qrtr.c-867-\tstruct sock *sk = sock-\u003esk;\nnet/qrtr/af_qrtr.c:868:\tstruct sockaddr_qrtr addr;\nnet/qrtr/af_qrtr.c-869-\n--\nnet/qrtr/af_qrtr.c=881=static int qrtr_bind(struct socket *sock, struct sockaddr_unsized *saddr, int len)\nnet/qrtr/af_qrtr.c-882-{\nnet/qrtr/af_qrtr.c:883:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, saddr);\nnet/qrtr/af_qrtr.c-884-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n--\nnet/qrtr/af_qrtr.c=902=static int qrtr_local_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:903:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:904:\t\t\t struct sockaddr_qrtr *to)\nnet/qrtr/af_qrtr.c-905-{\n--\nnet/qrtr/af_qrtr.c=933=static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:934:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:935:\t\t\t struct sockaddr_qrtr *to)\nnet/qrtr/af_qrtr.c-936-{\n--\nnet/qrtr/af_qrtr.c=957=static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)\nnet/qrtr/af_qrtr.c-958-{\nnet/qrtr/af_qrtr.c:959:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, msg-\u003emsg_name);\nnet/qrtr/af_qrtr.c-960-\tint (*enqueue_fn)(struct qrtr_node *, struct sk_buff *, int,\nnet/qrtr/af_qrtr.c:961:\t\t\t struct sockaddr_qrtr *, struct sockaddr_qrtr *);\nnet/qrtr/af_qrtr.c-962-\t__le32 qrtr_type = cpu_to_le32(QRTR_TYPE_DATA);\n--\nnet/qrtr/af_qrtr.c=1060=static int qrtr_send_resume_tx(struct qrtr_cb *cb)\nnet/qrtr/af_qrtr.c-1061-{\nnet/qrtr/af_qrtr.c:1062:\tstruct sockaddr_qrtr remote = { AF_QIPCRTR, cb-\u003esrc_node, cb-\u003esrc_port };\nnet/qrtr/af_qrtr.c:1063:\tstruct sockaddr_qrtr local = { AF_QIPCRTR, cb-\u003edst_node, cb-\u003edst_port };\nnet/qrtr/af_qrtr.c-1064-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c=1090=static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg,\n--\nnet/qrtr/af_qrtr.c-1092-{\nnet/qrtr/af_qrtr.c:1093:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, msg-\u003emsg_name);\nnet/qrtr/af_qrtr.c-1094-\tstruct sock *sk = sock-\u003esk;\n--\nnet/qrtr/af_qrtr.c=1146=static int qrtr_connect(struct socket *sock, struct sockaddr_unsized *saddr,\n--\nnet/qrtr/af_qrtr.c-1148-{\nnet/qrtr/af_qrtr.c:1149:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, saddr);\nnet/qrtr/af_qrtr.c-1150-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n--\nnet/qrtr/af_qrtr.c=1177=static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n--\nnet/qrtr/af_qrtr.c-1180-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\nnet/qrtr/af_qrtr.c:1181:\tstruct sockaddr_qrtr qaddr = {};\nnet/qrtr/af_qrtr.c-1182-\tstruct sock *sk = sock-\u003esk;\n--\nnet/qrtr/af_qrtr.c=1206=static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n--\nnet/qrtr/af_qrtr.c-1210-\tstruct sock *sk = sock-\u003esk;\nnet/qrtr/af_qrtr.c:1211:\tstruct sockaddr_qrtr *sq;\nnet/qrtr/af_qrtr.c-1212-\tstruct sk_buff *skb;\n--\nnet/qrtr/af_qrtr.c-1238-\t\tmemset(\u0026ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));\nnet/qrtr/af_qrtr.c:1239:\t\tsq = (struct sockaddr_qrtr *)\u0026ifr.ifr_addr;\nnet/qrtr/af_qrtr.c-1240-\t\tsq-\u003esq_family = ipc-\u003eus.sq_family;\n--\nnet/qrtr/ns.c=21=static struct {\nnet/qrtr/ns.c-22-\tstruct socket *sock;\nnet/qrtr/ns.c:23:\tstruct sockaddr_qrtr bcast_sq;\nnet/qrtr/ns.c-24-\tstruct list_head lookups;\n--\nnet/qrtr/ns.c=51=struct qrtr_lookup {\n--\nnet/qrtr/ns.c-54-\nnet/qrtr/ns.c:55:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-56-\tstruct list_head li;\n--\nnet/qrtr/ns.c=116=static int server_match(const struct qrtr_server *srv,\n--\nnet/qrtr/ns.c-128-\nnet/qrtr/ns.c:129:static int service_announce_new(struct sockaddr_qrtr *dest,\nnet/qrtr/ns.c-130-\t\t\t\tstruct qrtr_server *srv)\n--\nnet/qrtr/ns.c-154-\nnet/qrtr/ns.c:155:static void service_announce_del(struct sockaddr_qrtr *dest,\nnet/qrtr/ns.c-156-\t\t\t\t struct qrtr_server *srv)\n--\nnet/qrtr/ns.c-185-\nnet/qrtr/ns.c:186:static void lookup_notify(struct sockaddr_qrtr *to, struct qrtr_server *srv,\nnet/qrtr/ns.c-187-\t\t\t bool new)\n--\nnet/qrtr/ns.c-215-/* Announce the list of servers registered on the local node */\nnet/qrtr/ns.c:216:static int announce_servers(struct sockaddr_qrtr *sq)\nnet/qrtr/ns.c-217-{\n--\nnet/qrtr/ns.c=297=static int server_del(struct qrtr_node *node, unsigned int port, bool bcast)\n--\nnet/qrtr/ns.c-329-\nnet/qrtr/ns.c:330:static int ctrl_cmd_hello(struct sockaddr_qrtr *sq)\nnet/qrtr/ns.c-331-{\n--\nnet/qrtr/ns.c-334-\nnet/qrtr/ns.c:335:static int ctrl_cmd_bye(struct sockaddr_qrtr *from)\nnet/qrtr/ns.c-336-{\n--\nnet/qrtr/ns.c-339-\tstruct qrtr_server *srv;\nnet/qrtr/ns.c:340:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-341-\tstruct msghdr msg = { };\n--\nnet/qrtr/ns.c-394-\nnet/qrtr/ns.c:395:static int ctrl_cmd_del_client(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-396-\t\t\t unsigned int node_id, unsigned int port)\n--\nnet/qrtr/ns.c-402-\tstruct qrtr_server *srv;\nnet/qrtr/ns.c:403:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-404-\tstruct qrtr_node *node;\n--\nnet/qrtr/ns.c-469-\nnet/qrtr/ns.c:470:static int ctrl_cmd_new_server(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-471-\t\t\t unsigned int service, unsigned int instance,\n--\nnet/qrtr/ns.c-510-\nnet/qrtr/ns.c:511:static int ctrl_cmd_del_server(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-512-\t\t\t unsigned int service, unsigned int instance,\n--\nnet/qrtr/ns.c-535-\nnet/qrtr/ns.c:536:static int ctrl_cmd_new_lookup(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-537-\t\t\t unsigned int service, unsigned int instance)\n--\nnet/qrtr/ns.c-583-\nnet/qrtr/ns.c:584:static void ctrl_cmd_del_lookup(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-585-\t\t\t\tunsigned int service, unsigned int instance)\n--\nnet/qrtr/ns.c=608=static void qrtr_ns_worker(struct work_struct *work)\n--\nnet/qrtr/ns.c-611-\tsize_t recv_buf_size = 4096;\nnet/qrtr/ns.c:612:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-613-\tstruct msghdr msg = { };\n--\nnet/qrtr/ns.c=707=int qrtr_ns_init(void)\nnet/qrtr/ns.c-708-{\nnet/qrtr/ns.c:709:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-710-\tint ret;\n--\nsamples/qmi/qmi_sample_client.c=331=static const struct file_operations ping_fops = {\n--\nsamples/qmi/qmi_sample_client.c-335-\nsamples/qmi/qmi_sample_client.c:336:static void ping_pong_cb(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\nsamples/qmi/qmi_sample_client.c-337-\t\t\t struct qmi_txn *txn, const void *data)\n--\nsamples/qmi/qmi_sample_client.c=453=static int qmi_sample_probe(struct platform_device *pdev)\nsamples/qmi/qmi_sample_client.c-454-{\nsamples/qmi/qmi_sample_client.c:455:\tstruct sockaddr_qrtr *sq;\nsamples/qmi/qmi_sample_client.c-456-\tstruct qmi_sample *sample;\n--\nsamples/qmi/qmi_sample_client.c=533=static int qmi_sample_new_server(struct qmi_handle *qmi,\n--\nsamples/qmi/qmi_sample_client.c-536-\tstruct platform_device *pdev;\nsamples/qmi/qmi_sample_client.c:537:\tstruct sockaddr_qrtr sq = { AF_QIPCRTR, service-\u003enode, service-\u003eport };\nsamples/qmi/qmi_sample_client.c-538-\tint ret;\n--\nsound/usb/qcom/qc_audio_offload.c=144=struct uaudio_qmi_svc {\nsound/usb/qcom/qc_audio_offload.c-145-\tstruct qmi_handle *uaudio_svc_hdl;\nsound/usb/qcom/qc_audio_offload.c:146:\tstruct sockaddr_qrtr client_sq;\nsound/usb/qcom/qc_audio_offload.c-147-\tbool client_connected;\n--\nsound/usb/qcom/qc_audio_offload.c=1545=static void handle_uaudio_stream_req(struct qmi_handle *handle,\nsound/usb/qcom/qc_audio_offload.c:1546:\t\t\t\t struct sockaddr_qrtr *sq,\nsound/usb/qcom/qc_audio_offload.c-1547-\t\t\t\t struct qmi_txn *txn,\n"
} |
| 7/2 | 2026/09/21 17:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15998 output: 37 thoughts: 31 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into the `sockaddr_qrtr` Definition** Okay, so I need to refresh my memory on the specifics of `struct sockaddr_qrtr`. Time to jump into the source code to get the definitive answer. Let's start by navigating to the relevant header file. That should be `include/uapi/linux/qrtr.h`. That's typically where these socket address structures are defined in the kernel's userspace API. Hopefully, it's well-documented... I'm particularly interested in the member layout and any relevant flags or constants defined alongside it. Let's see if there's anything unusual in this implementation. |
| 8/2 | 2026/09/21 17:07 | tool | read-file |
0mArgs:{
"File": "include/uapi/linux/qrtr.h",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n 2:\t#ifndef _LINUX_QRTR_H\n 3:\t#define _LINUX_QRTR_H\n 4:\t\n 5:\t#include \u003clinux/socket.h\u003e\n 6:\t#include \u003clinux/types.h\u003e\n 7:\t\n 8:\t#define QRTR_NODE_BCAST\t0xffffffffu\n 9:\t#define QRTR_PORT_CTRL\t0xfffffffeu\n 10:\t\n 11:\tstruct sockaddr_qrtr {\n 12:\t\t__kernel_sa_family_t sq_family;\n 13:\t\t__u32 sq_node;\n 14:\t\t__u32 sq_port;\n 15:\t};\n 16:\t\n 17:\tenum qrtr_pkt_type {\n 18:\t\tQRTR_TYPE_DATA\t\t= 1,\n 19:\t\tQRTR_TYPE_HELLO\t\t= 2,\n 20:\t\tQRTR_TYPE_BYE\t\t= 3,\n 21:\t\tQRTR_TYPE_NEW_SERVER\t= 4,\n 22:\t\tQRTR_TYPE_DEL_SERVER\t= 5,\n 23:\t\tQRTR_TYPE_DEL_CLIENT\t= 6,\n 24:\t\tQRTR_TYPE_RESUME_TX\t= 7,\n 25:\t\tQRTR_TYPE_EXIT = 8,\n 26:\t\tQRTR_TYPE_PING = 9,\n 27:\t\tQRTR_TYPE_NEW_LOOKUP\t= 10,\n 28:\t\tQRTR_TYPE_DEL_LOOKUP\t= 11,\n 29:\t};\n 30:\t\n 31:\tstruct qrtr_ctrl_pkt {\n 32:\t\t__le32 cmd;\n 33:\t\n 34:\t\tunion {\n 35:\t\t\tstruct {\n 36:\t\t\t\t__le32 service;\n 37:\t\t\t\t__le32 instance;\n 38:\t\t\t\t__le32 node;\n 39:\t\t\t\t__le32 port;\n 40:\t\t\t} server;\n"
} |
| 9/2 | 2026/09/21 17:07 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16779 output: 17 thoughts: 607 Thoughts: **My Analysis of a Potential Kernel Memory Leak in QRTR Socket Addressing**
Okay, so I've been looking at the `struct sockaddr_qrtr` definition and immediately spotted something interesting. It's a 12-byte structure, but the alignment mandates 2 bytes of padding between the `sq_family` field and the `sq_node` field. That's the first red flag. This padding, if not initialized, could lead to a kernel memory leak if copied to user space.
I see in `qrtr_getname` this structure `struct sockaddr_qrtr qaddr;` used and in some ways it looks unsafe. We initialize an uninitialized stack variable `qaddr` and copy data into it from `ipc->peer` or `ipc->us`. This is a classic potential issue: if `ipc->peer` or `ipc->us` contains uninitialized memory in that padding region, we're leaking kernel data to user space via `memcpy(saddr, &qaddr, sizeof(qaddr));`. I was immediately suspicious.
However, I started thinking about the code and in one case, before we do that copy we have initialized it:
`struct sockaddr_qrtr qaddr = {};`
`qaddr.sq_node = ipc->peer.sq_node;`
`qaddr.sq_port = ipc->peer.sq_port;`
`qaddr.sq_family = AF_QIPCRTR;`
In this case the padding is guaranteed to be zero. No leak.
Then I considered `qrtr_ioctl`. Here the code uses an `ifr` struct. Specifically, `ifr.ifr_addr` which is of type `struct sockaddr`. Here, we see `memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));` before we do the copy. This *should* prevent the uninitialized memory issue, since we're explicitly zeroing the structure before we start copying parts of `ipc->us` into it. Good, it looks like a fix.
So, I think I've identified and worked through the code that would fix the leak. Now, I should probably check the git commit log, ideally using `git log`, but it looks like I don't have that tool! I only have `git grep`, which is helpful, but won't give me the context. I have other tools. The patch modified `net/qrtr/af_qrtr.c`, which makes sense. I should check the Kconfig file to see the configuration option used for QRTR, but I am confident this resolves an info leak issue.
|
| 10/2 | 2026/09/21 17:08 | tool | grepper |
0mArgs:{
"Expression": "config QRTR"
}Results: {
"Output": "net/qrtr/Kconfig-4-\nnet/qrtr/Kconfig:5:config QRTR\nnet/qrtr/Kconfig-6-\ttristate \"Qualcomm IPC Router support\"\n--\nnet/qrtr/Kconfig=15=if QRTR\nnet/qrtr/Kconfig-16-\nnet/qrtr/Kconfig:17:config QRTR_SMD\nnet/qrtr/Kconfig-18-\ttristate \"SMD IPC Router channels\"\n--\nnet/qrtr/Kconfig-23-\nnet/qrtr/Kconfig:24:config QRTR_TUN\nnet/qrtr/Kconfig-25-\ttristate \"TUN device for Qualcomm IPC Router\"\n--\nnet/qrtr/Kconfig-30-\nnet/qrtr/Kconfig:31:config QRTR_MHI\nnet/qrtr/Kconfig-32-\ttristate \"MHI IPC Router channels\"\n"
} |
| 11/2 | 2026/09/21 17:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18208 output: 33 thoughts: 13 Thoughts: Here's my attempt at summarizing that thought process, tailored for an expert audience: **Analyzing the net/qrtr/Kconfig File** Okay, time to dive into `net/qrtr/Kconfig`. I'm guessing this file is the configuration entry point for the QMI/RTR (Qualcomm/Router) transport layer within the Linux kernel networking stack. Given the location within `net/qrtr`, I expect it to define the build options and dependencies related to the QRTR driver. I'll be looking for things like: * **Overall enablement:** Is this a modular driver, or is it compiled in? What's the main `CONFIG_QRTR` option? Is it selectable on a certain architecture? * **Dependencies:** Are there dependencies on other subsystems, like the USB subsystem, the QMI framework, or specific hardware like Qualcomm SoCs? I need to understand what needs to be enabled for this to function correctly. I'll pay close attention to the `depends on` statements. * **Fine-grained options:** Are there configurations for debugging, specific hardware features (e.g., specific QMI protocol versions), or power management settings? These often appear as sub-options under the main `CONFIG_QRTR` setting. * **Default values:** What are the default values for the various options? This helps in understanding the assumed configuration when no choices are explicitly made. * **Documentation:** Are there any comments within the Kconfig file that provide insight into the purpose of different options? Clear and concise comments are always welcome. My goal is to quickly grasp the overall structure of the QRTR configuration and understand how this particular subsystem fits within the broader networking context of the kernel. This allows me to then go through code with context. |
| 12/2 | 2026/09/21 17:08 | tool | read-file |
0mArgs:{
"File": "net/qrtr/Kconfig",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\t# Qualcomm IPC Router configuration\n 3:\t#\n 4:\t\n 5:\tconfig QRTR\n 6:\t\ttristate \"Qualcomm IPC Router support\"\n 7:\t\thelp\n 8:\t\t Say Y if you intend to use Qualcomm IPC router protocol. The\n 9:\t\t protocol is used to communicate with services provided by other\n 10:\t\t hardware blocks in the system.\n 11:\t\n 12:\t\t In order to do service lookups, a userspace daemon is required to\n 13:\t\t maintain a service listing.\n 14:\t\n 15:\tif QRTR\n 16:\t\n 17:\tconfig QRTR_SMD\n 18:\t\ttristate \"SMD IPC Router channels\"\n 19:\t\tdepends on RPMSG || (COMPILE_TEST \u0026\u0026 RPMSG=n)\n 20:\t\thelp\n 21:\t\t Say Y here to support SMD based ipcrouter channels. SMD is the\n 22:\t\t most common transport for IPC Router.\n 23:\t\n 24:\tconfig QRTR_TUN\n 25:\t\ttristate \"TUN device for Qualcomm IPC Router\"\n 26:\t\thelp\n 27:\t\t Say Y here to expose a character device that allows user space to\n 28:\t\t implement endpoints of QRTR, for purpose of tunneling data to other\n 29:\t\t hosts or testing purposes.\n 30:\t\n 31:\tconfig QRTR_MHI\n 32:\t\ttristate \"MHI IPC Router channels\"\n 33:\t\tdepends on MHI_BUS\n 34:\t\thelp\n 35:\t\t Say Y here to support MHI based ipcrouter channels. MHI is the\n 36:\t\t transport used for communicating to external modems.\n 37:\t\n 38:\tendif # QRTR\n"
} |
| 13/2 | 2026/09/21 17:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 19114 output: 20 thoughts: 38 Thoughts: **Investigating QRTR Socket Creation** Okay, let's dive in and see how these QRTR sockets are actually constructed. My immediate question is whether `AF_QIPCRTR` is exposed to userspace – can we even interact with these things directly? Time to do a quick search for `AF_QIPCRTR` and see what comes up. This should tell me what I need to know about the access level, and then I can refine my search based on what I find. |
| 14/2 | 2026/09/21 17:08 | tool | grepper |
0mArgs:{
"Expression": "AF_QIPCRTR"
}Results: {
"Output": "Documentation/accel/qaic/aic100.rst=187=of the defined channels, and their uses.\n--\nDocumentation/accel/qaic/aic100.rst-231-+----------------+---------+----------+----------------------------------------+\nDocumentation/accel/qaic/aic100.rst:232:| IPCR | 24 \u0026 25 | AMSS | AF_QIPCRTR clients and servers. |\nDocumentation/accel/qaic/aic100.rst-233-+----------------+---------+----------+----------------------------------------+\n--\ndrivers/net/ipa/ipa_qmi.c=448=ipa_client_new_server(struct qmi_handle *qmi, struct qmi_service *svc)\n--\ndrivers/net/ipa/ipa_qmi.c-453-\ndrivers/net/ipa/ipa_qmi.c:454:\tipa_qmi-\u003emodem_sq.sq_family = AF_QIPCRTR;\ndrivers/net/ipa/ipa_qmi.c-455-\tipa_qmi-\u003emodem_sq.sq_node = svc-\u003enode;\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=982=static int ath10k_qmi_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-989-\ndrivers/net/wireless/ath/ath10k/qmi.c:990:\tsq-\u003esq_family = AF_QIPCRTR;\ndrivers/net/wireless/ath/ath10k/qmi.c-991-\tsq-\u003esq_node = service-\u003enode;\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3167=static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c-3174-\ndrivers/net/wireless/ath/ath11k/qmi.c:3175:\tsq-\u003esq_family = AF_QIPCRTR;\ndrivers/net/wireless/ath/ath11k/qmi.c-3176-\tsq-\u003esq_node = service-\u003enode;\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3937=static int ath12k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c-3944-\ndrivers/net/wireless/ath/ath12k/qmi.c:3945:\tsq-\u003esq_family = AF_QIPCRTR;\ndrivers/net/wireless/ath/ath12k/qmi.c-3946-\tsq-\u003esq_node = service-\u003enode;\n--\ndrivers/remoteproc/qcom_sysmon.c=421=static int ssctl_new_server(struct qmi_handle *qmi, struct qmi_service *svc)\n--\ndrivers/remoteproc/qcom_sysmon.c-441-\ndrivers/remoteproc/qcom_sysmon.c:442:\tsysmon-\u003essctl.sq_family = AF_QIPCRTR;\ndrivers/remoteproc/qcom_sysmon.c-443-\tsysmon-\u003essctl.sq_node = svc-\u003enode;\n--\ndrivers/slimbus/qcom-ngd-ctrl.c=1364=static int qcom_slim_ngd_qmi_new_server(struct qmi_handle *hdl,\n--\ndrivers/slimbus/qcom-ngd-ctrl.c-1371-\ndrivers/slimbus/qcom-ngd-ctrl.c:1372:\tqmi-\u003esvc_info.sq_family = AF_QIPCRTR;\ndrivers/slimbus/qcom-ngd-ctrl.c-1373-\tqmi-\u003esvc_info.sq_node = service-\u003enode;\n--\ndrivers/soc/qcom/pdr_interface.c=73=static int pdr_locator_new_server(struct qmi_handle *qmi,\n--\ndrivers/soc/qcom/pdr_interface.c-80-\t/* Create a local client port for QMI communication */\ndrivers/soc/qcom/pdr_interface.c:81:\tpdr-\u003elocator_addr.sq_family = AF_QIPCRTR;\ndrivers/soc/qcom/pdr_interface.c-82-\tpdr-\u003elocator_addr.sq_node = svc-\u003enode;\n--\ndrivers/soc/qcom/pdr_interface.c=191=static int pdr_notifier_new_server(struct qmi_handle *qmi,\n--\ndrivers/soc/qcom/pdr_interface.c-203-\t\t\tpds-\u003eneed_notifier_register = true;\ndrivers/soc/qcom/pdr_interface.c:204:\t\t\tpds-\u003eaddr.sq_family = AF_QIPCRTR;\ndrivers/soc/qcom/pdr_interface.c-205-\t\t\tpds-\u003eaddr.sq_node = svc-\u003enode;\n--\ndrivers/soc/qcom/qmi_interface.c=585=static struct socket *qmi_sock_create(struct qmi_handle *qmi,\n--\ndrivers/soc/qcom/qmi_interface.c-590-\ndrivers/soc/qcom/qmi_interface.c:591:\tret = sock_create_kern(\u0026init_net, AF_QIPCRTR, SOCK_DGRAM,\ndrivers/soc/qcom/qmi_interface.c-592-\t\t\t PF_QIPCRTR, \u0026sock);\n--\ninclude/linux/socket.h=197=struct ucred {\n--\ninclude/linux/socket.h-247-#define AF_KCM\t\t41\t/* Kernel Connection Multiplexor*/\ninclude/linux/socket.h:248:#define AF_QIPCRTR\t42\t/* Qualcomm IPC Router */\ninclude/linux/socket.h-249-#define AF_SMC\t\t43\t/* smc sockets: reserve number for\n--\ninclude/linux/socket.h-304-#define PF_KCM\t\tAF_KCM\ninclude/linux/socket.h:305:#define PF_QIPCRTR\tAF_QIPCRTR\ninclude/linux/socket.h-306-#define PF_SMC\t\tAF_SMC\n--\nnet/core/sock.c=218=static struct lock_class_key af_family_kern_slock_keys[AF_MAX];\n--\nnet/core/sock.c-240- x \"AF_NFC\" ,\tx \"AF_VSOCK\" ,\tx \"AF_KCM\" , \\\nnet/core/sock.c:241: x \"AF_QIPCRTR\",\tx \"AF_SMC\"\t,\tx \"AF_XDP\"\t, \\\nnet/core/sock.c-242- x \"AF_MCTP\" , \\\n--\nnet/qrtr/af_qrtr.c=594=static void qrtr_hello_work(struct work_struct *work)\nnet/qrtr/af_qrtr.c-595-{\nnet/qrtr/af_qrtr.c:596:\tstruct sockaddr_qrtr from = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:597:\tstruct sockaddr_qrtr to = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-598-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c=675=void qrtr_endpoint_unregister(struct qrtr_endpoint *ep)\n--\nnet/qrtr/af_qrtr.c-677-\tstruct qrtr_node *node = ep-\u003enode;\nnet/qrtr/af_qrtr.c:678:\tstruct sockaddr_qrtr src = {AF_QIPCRTR, node-\u003enid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:679:\tstruct sockaddr_qrtr dst = {AF_QIPCRTR, qrtr_local_nid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-680-\tstruct radix_tree_iter iter;\n--\nnet/qrtr/af_qrtr.c=744=static void qrtr_port_remove(struct qrtr_sock *ipc)\n--\nnet/qrtr/af_qrtr.c-750-\nnet/qrtr/af_qrtr.c:751:\tto.sq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c-752-\tto.sq_node = QRTR_NODE_BCAST;\n--\nnet/qrtr/af_qrtr.c=865=static int qrtr_autobind(struct socket *sock)\n--\nnet/qrtr/af_qrtr.c-872-\nnet/qrtr/af_qrtr.c:873:\taddr.sq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c-874-\taddr.sq_node = qrtr_local_nid;\n--\nnet/qrtr/af_qrtr.c=881=static int qrtr_bind(struct socket *sock, struct sockaddr_unsized *saddr, int len)\n--\nnet/qrtr/af_qrtr.c-887-\nnet/qrtr/af_qrtr.c:888:\tif (len \u003c sizeof(*addr) || addr-\u003esq_family != AF_QIPCRTR)\nnet/qrtr/af_qrtr.c-889-\t\treturn -EINVAL;\n--\nnet/qrtr/af_qrtr.c=957=static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)\n--\nnet/qrtr/af_qrtr.c-984-\nnet/qrtr/af_qrtr.c:985:\t\tif (addr-\u003esq_family != AF_QIPCRTR) {\nnet/qrtr/af_qrtr.c-986-\t\t\trelease_sock(sk);\n--\nnet/qrtr/af_qrtr.c=1060=static int qrtr_send_resume_tx(struct qrtr_cb *cb)\nnet/qrtr/af_qrtr.c-1061-{\nnet/qrtr/af_qrtr.c:1062:\tstruct sockaddr_qrtr remote = { AF_QIPCRTR, cb-\u003esrc_node, cb-\u003esrc_port };\nnet/qrtr/af_qrtr.c:1063:\tstruct sockaddr_qrtr local = { AF_QIPCRTR, cb-\u003edst_node, cb-\u003edst_port };\nnet/qrtr/af_qrtr.c-1064-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c=1090=static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg,\n--\nnet/qrtr/af_qrtr.c-1129-\nnet/qrtr/af_qrtr.c:1130:\t\taddr-\u003esq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c-1131-\t\taddr-\u003esq_node = cb-\u003esrc_node;\n--\nnet/qrtr/af_qrtr.c=1146=static int qrtr_connect(struct socket *sock, struct sockaddr_unsized *saddr,\n--\nnet/qrtr/af_qrtr.c-1153-\nnet/qrtr/af_qrtr.c:1154:\tif (len \u003c sizeof(*addr) || addr-\u003esq_family != AF_QIPCRTR)\nnet/qrtr/af_qrtr.c-1155-\t\treturn -EINVAL;\n--\nnet/qrtr/af_qrtr.c=1177=static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n--\nnet/qrtr/af_qrtr.c-1198-\nnet/qrtr/af_qrtr.c:1199:\tqaddr.sq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c-1200-\n--\nnet/qrtr/af_qrtr.c=1299=static const struct proto_ops qrtr_proto_ops = {\nnet/qrtr/af_qrtr.c-1300-\t.owner\t\t= THIS_MODULE,\nnet/qrtr/af_qrtr.c:1301:\t.family\t\t= AF_QIPCRTR,\nnet/qrtr/af_qrtr.c-1302-\t.bind\t\t= qrtr_bind,\n--\nnet/qrtr/af_qrtr.c=1324=static int qrtr_create(struct net *net, struct socket *sock,\n--\nnet/qrtr/af_qrtr.c-1340-\nnet/qrtr/af_qrtr.c:1341:\tsk = sk_alloc(net, AF_QIPCRTR, GFP_KERNEL, \u0026qrtr_proto, kern);\nnet/qrtr/af_qrtr.c-1342-\tif (!sk)\n--\nnet/qrtr/af_qrtr.c-1350-\tipc = qrtr_sk(sk);\nnet/qrtr/af_qrtr.c:1351:\tipc-\u003eus.sq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c-1352-\tipc-\u003eus.sq_node = qrtr_local_nid;\n--\nnet/qrtr/af_qrtr.c=1358=static const struct net_proto_family qrtr_family = {\nnet/qrtr/af_qrtr.c-1359-\t.owner\t= THIS_MODULE,\nnet/qrtr/af_qrtr.c:1360:\t.family\t= AF_QIPCRTR,\nnet/qrtr/af_qrtr.c-1361-\t.create\t= qrtr_create,\n--\nnet/qrtr/ns.c=335=static int ctrl_cmd_bye(struct sockaddr_qrtr *from)\n--\nnet/qrtr/ns.c-369-\txa_for_each(\u0026local_node-\u003eservers, index, srv) {\nnet/qrtr/ns.c:370:\t\tsq.sq_family = AF_QIPCRTR;\nnet/qrtr/ns.c-371-\t\tsq.sq_node = srv-\u003enode;\n--\nnet/qrtr/ns.c=395=static int ctrl_cmd_del_client(struct sockaddr_qrtr *from,\n--\nnet/qrtr/ns.c-453-\txa_for_each(\u0026local_node-\u003eservers, index, srv) {\nnet/qrtr/ns.c:454:\t\tsq.sq_family = AF_QIPCRTR;\nnet/qrtr/ns.c-455-\t\tsq.sq_node = srv-\u003enode;\n--\nnet/qrtr/ns.c=707=int qrtr_ns_init(void)\n--\nnet/qrtr/ns.c-714-\nnet/qrtr/ns.c:715:\tret = sock_create_kern(\u0026init_net, AF_QIPCRTR, SOCK_DGRAM,\nnet/qrtr/ns.c-716-\t\t\t PF_QIPCRTR, \u0026qrtr_ns.sock);\n--\nnet/qrtr/ns.c-743-\nnet/qrtr/ns.c:744:\tqrtr_ns.bcast_sq.sq_family = AF_QIPCRTR;\nnet/qrtr/ns.c-745-\tqrtr_ns.bcast_sq.sq_node = QRTR_NODE_BCAST;\n--\nsamples/qmi/qmi_sample_client.c=533=static int qmi_sample_new_server(struct qmi_handle *qmi,\n--\nsamples/qmi/qmi_sample_client.c-536-\tstruct platform_device *pdev;\nsamples/qmi/qmi_sample_client.c:537:\tstruct sockaddr_qrtr sq = { AF_QIPCRTR, service-\u003enode, service-\u003eport };\nsamples/qmi/qmi_sample_client.c-538-\tint ret;\n--\ntools/perf/trace/beauty/include/linux/socket.h=197=struct ucred {\n--\ntools/perf/trace/beauty/include/linux/socket.h-247-#define AF_KCM\t\t41\t/* Kernel Connection Multiplexor*/\ntools/perf/trace/beauty/include/linux/socket.h:248:#define AF_QIPCRTR\t42\t/* Qualcomm IPC Router */\ntools/perf/trace/beauty/include/linux/socket.h-249-#define AF_SMC\t\t43\t/* smc sockets: reserve number for\n--\ntools/perf/trace/beauty/include/linux/socket.h-304-#define PF_KCM\t\tAF_KCM\ntools/perf/trace/beauty/include/linux/socket.h:305:#define PF_QIPCRTR\tAF_QIPCRTR\ntools/perf/trace/beauty/include/linux/socket.h-306-#define PF_SMC\t\tAF_SMC\n"
} |
| 15/2 | 2026/09/21 17:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23724 output: 32 thoughts: 676 Thoughts: **WorthFuzzing Analysis of AF_QIPCRTR Socket Operations** Okay, so I've been looking at this `AF_QIPCRTR` stuff and it's quite interesting. It seems this socket can be created directly from userspace using `socket(AF_QIPCRTR, SOCK_DGRAM, 0)`. That's a huge accessibility point – no special hardware needed! I can reach it directly, and the fact that Syzkaller already supports it and is probably throwing a ton of fuzzing at it is a good indicator. Now, let's break this down. `getsockname()` and `getpeername()` call `qrtr_getname()` and `ioctl` is hooked up by `qrtr_ioctl`. Reading section 3, I can clearly see this code is within reachable drivers accessible via sockets. Specifically, I've checked that this is reachable in QEMU because it's a pure software socket layer in the kernel network stack! Furthermore, `qrtr_getname` and `qrtr_ioctl` are both modified, so we are modifying reachable, executable code. Let's look at the before/after changes, to make sure this is worth fuzzing. I'm seeing changes in `qrtr_getname` where it looks like they're explicitly initializing the `sockaddr_qrtr` structure and then individually setting the node, port, and family, which is a structural change. Similarly, in `qrtr_ioctl`, the code initializes the `ifr_addr` and copies the node and port over to it. The question now is, does this fall into any of the *not worth fuzzing* categories? No, it's not non-kernel code, not structurally unreachable hardware, and not unreachable execution paths. This code is reachable kernel socket networking code. The code is modified, the kernel can reach it and will execute. That makes it worth fuzzing! So, `WorthFuzzing = true`. Now, let's figure out the necessary kernel config. Let's see what the `net/qrtr/Makefile` tells us. |
| 16/2 | 2026/09/21 17:08 | tool | read-file |
0mArgs:{
"File": "net/qrtr/Makefile",
"FirstLine": 1,
"LineCount": 20
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tobj-$(CONFIG_QRTR) += qrtr.o\n 3:\tqrtr-y\t:= af_qrtr.o ns.o\n 4:\t\n 5:\tobj-$(CONFIG_QRTR_SMD) += qrtr-smd.o\n 6:\tqrtr-smd-y\t:= smd.o\n 7:\tobj-$(CONFIG_QRTR_TUN) += qrtr-tun.o\n 8:\tqrtr-tun-y\t:= tun.o\n 9:\tobj-$(CONFIG_QRTR_MHI) += qrtr-mhi.o\n 10:\tqrtr-mhi-y\t:= mhi.o\n"
} |
| 17/2 | 2026/09/21 17:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25082 output: 24 thoughts: 122 Thoughts: **Examining the QRTR Module in the Kernel Build System** Okay, so I'm looking at how the QRTR module is integrated into the kernel build. I see this line: `obj-$(CONFIG_QRTR) += qrtr.o`. That tells me that the object file `qrtr.o` will be included in the build, but only if the `CONFIG_QRTR` configuration option is set. Then, there's another line: `qrtr-y := af_qrtr.o ns.o`. This tells me what source files make up the `qrtr.o` object file. Good, standard stuff so far. Now I need to know: what actually *controls* whether `CONFIG_QRTR` is defined? Is it dependent on another option, which in turn controls its inclusion? Time to check the Kconfig file for QRTR, specifically `net/qrtr/Kconfig`. Let's have a look... Aha! ``` config QRTR tristate "Qualcomm IPC Router support" help Say Y if you intend to use Qualcomm IPC router protocol... ``` Right, it's a tristate option, meaning it can be built-in, a module, or disabled. But here's the key: there are *no* dependencies specified. That means `CONFIG_QRTR` itself doesn't require any other option to be enabled. I can enable or disable it directly. Interesting. Just to be thorough, I should probably check the parent Kconfig file for any global network-related dependencies. Let's take a quick peek at `net/Kconfig` to be sure I'm not missing anything. Gotta cover all bases! |
| 18/2 | 2026/09/21 17:08 | tool | grepper |
0mArgs:{
"Expression": "QRTR",
"PathPrefix": "net/"
}Results: {
"Output": "net/Makefile=70=obj-$(CONFIG_NET_L3_MASTER_DEV)\t+= l3mdev/\nnet/Makefile:71:obj-$(CONFIG_QRTR)\t\t+= qrtr/\nnet/Makefile-72-obj-$(CONFIG_NET_NCSI)\t\t+= ncsi/\n--\nnet/qrtr/Kconfig-4-\nnet/qrtr/Kconfig:5:config QRTR\nnet/qrtr/Kconfig-6-\ttristate \"Qualcomm IPC Router support\"\n--\nnet/qrtr/Kconfig-14-\nnet/qrtr/Kconfig:15:if QRTR\nnet/qrtr/Kconfig-16-\nnet/qrtr/Kconfig:17:config QRTR_SMD\nnet/qrtr/Kconfig-18-\ttristate \"SMD IPC Router channels\"\n--\nnet/qrtr/Kconfig-23-\nnet/qrtr/Kconfig:24:config QRTR_TUN\nnet/qrtr/Kconfig-25-\ttristate \"TUN device for Qualcomm IPC Router\"\n--\nnet/qrtr/Kconfig-27-\t Say Y here to expose a character device that allows user space to\nnet/qrtr/Kconfig:28:\t implement endpoints of QRTR, for purpose of tunneling data to other\nnet/qrtr/Kconfig-29-\t hosts or testing purposes.\nnet/qrtr/Kconfig-30-\nnet/qrtr/Kconfig:31:config QRTR_MHI\nnet/qrtr/Kconfig-32-\ttristate \"MHI IPC Router channels\"\n--\nnet/qrtr/Kconfig-37-\nnet/qrtr/Kconfig:38:endif # QRTR\n--\nnet/qrtr/Makefile-1-# SPDX-License-Identifier: GPL-2.0-only\nnet/qrtr/Makefile:2:obj-$(CONFIG_QRTR) += qrtr.o\nnet/qrtr/Makefile-3-qrtr-y\t:= af_qrtr.o ns.o\nnet/qrtr/Makefile-4-\nnet/qrtr/Makefile:5:obj-$(CONFIG_QRTR_SMD) += qrtr-smd.o\nnet/qrtr/Makefile-6-qrtr-smd-y\t:= smd.o\nnet/qrtr/Makefile:7:obj-$(CONFIG_QRTR_TUN) += qrtr-tun.o\nnet/qrtr/Makefile-8-qrtr-tun-y\t:= tun.o\nnet/qrtr/Makefile:9:obj-$(CONFIG_QRTR_MHI) += qrtr-mhi.o\nnet/qrtr/Makefile-10-qrtr-mhi-y\t:= mhi.o\n--\nnet/qrtr/af_qrtr.c-17-\nnet/qrtr/af_qrtr.c:18:#define QRTR_PROTO_VER_1 1\nnet/qrtr/af_qrtr.c:19:#define QRTR_PROTO_VER_2 3\nnet/qrtr/af_qrtr.c-20-\nnet/qrtr/af_qrtr.c-21-/* auto-bind range */\nnet/qrtr/af_qrtr.c:22:#define QRTR_MIN_EPH_SOCKET 0x4000\nnet/qrtr/af_qrtr.c:23:#define QRTR_MAX_EPH_SOCKET 0x7fff\nnet/qrtr/af_qrtr.c:24:#define QRTR_EPH_PORT_RANGE \\\nnet/qrtr/af_qrtr.c:25:\t\tXA_LIMIT(QRTR_MIN_EPH_SOCKET, QRTR_MAX_EPH_SOCKET)\nnet/qrtr/af_qrtr.c-26-\nnet/qrtr/af_qrtr.c:27:#define QRTR_PORT_CTRL_LEGACY 0xffff\nnet/qrtr/af_qrtr.c-28-\n--\nnet/qrtr/af_qrtr.c-31- * @version: protocol version\nnet/qrtr/af_qrtr.c:32: * @type: packet type; one of QRTR_TYPE_*\nnet/qrtr/af_qrtr.c-33- * @src_node_id: source node\n--\nnet/qrtr/af_qrtr.c=40=struct qrtr_hdr_v1 {\n--\nnet/qrtr/af_qrtr.c-53- * @version: protocol version\nnet/qrtr/af_qrtr.c:54: * @type: packet type; one of QRTR_TYPE_*\nnet/qrtr/af_qrtr.c:55: * @flags: bitmask of QRTR_FLAGS_*\nnet/qrtr/af_qrtr.c-56- * @optlen: length of optional header data\n--\nnet/qrtr/af_qrtr.c=63=struct qrtr_hdr_v2 {\n--\nnet/qrtr/af_qrtr.c-74-\nnet/qrtr/af_qrtr.c:75:#define QRTR_FLAGS_CONFIRM_RX\tBIT(0)\nnet/qrtr/af_qrtr.c-76-\nnet/qrtr/af_qrtr.c=77=struct qrtr_cb {\n--\nnet/qrtr/af_qrtr.c-86-\nnet/qrtr/af_qrtr.c:87:#define QRTR_HDR_MAX_SIZE max_t(size_t, sizeof(struct qrtr_hdr_v1), \\\nnet/qrtr/af_qrtr.c-88-\t\t\t\t\tsizeof(struct qrtr_hdr_v2))\n--\nnet/qrtr/af_qrtr.c=151=struct qrtr_tx_flow {\n--\nnet/qrtr/af_qrtr.c-156-\nnet/qrtr/af_qrtr.c:157:#define QRTR_TX_FLOW_HIGH\t10\nnet/qrtr/af_qrtr.c:158:#define QRTR_TX_FLOW_LOW\t5\nnet/qrtr/af_qrtr.c-159-\n--\nnet/qrtr/af_qrtr.c=216=static void qrtr_node_release(struct qrtr_node *node)\n--\nnet/qrtr/af_qrtr.c-224- * qrtr_tx_resume() - reset flow control counter\nnet/qrtr/af_qrtr.c:225: * @node:\tqrtr_node that the QRTR_TYPE_RESUME_TX packet arrived on\nnet/qrtr/af_qrtr.c-226- * @skb:\tresume_tx packet\n--\nnet/qrtr/af_qrtr.c=228=static void qrtr_tx_resume(struct qrtr_node *node, struct sk_buff *skb)\n--\nnet/qrtr/af_qrtr.c-258- * message, which will trigger the remote to send a control message of the type\nnet/qrtr/af_qrtr.c:259: * QRTR_TYPE_RESUME_TX to reset the counter. If the high watermark is hit\nnet/qrtr/af_qrtr.c-260- * further transmision should be paused.\n--\nnet/qrtr/af_qrtr.c=264=static int qrtr_tx_wait(struct qrtr_node *node, int dest_node, int dest_port,\n--\nnet/qrtr/af_qrtr.c-272-\t/* Never set confirm_rx on non-data packets */\nnet/qrtr/af_qrtr.c:273:\tif (type != QRTR_TYPE_DATA)\nnet/qrtr/af_qrtr.c-274-\t\treturn 0;\n--\nnet/qrtr/af_qrtr.c-296-\tret = wait_event_interruptible_locked_irq(flow-\u003eresume_tx,\nnet/qrtr/af_qrtr.c:297:\t\t\t\t\t\t flow-\u003epending \u003c QRTR_TX_FLOW_HIGH ||\nnet/qrtr/af_qrtr.c-298-\t\t\t\t\t\t flow-\u003etx_failed ||\n--\nnet/qrtr/af_qrtr.c-308-\t\tflow-\u003epending++;\nnet/qrtr/af_qrtr.c:309:\t\tconfirm_rx = flow-\u003epending == QRTR_TX_FLOW_LOW;\nnet/qrtr/af_qrtr.c-310-\t}\n--\nnet/qrtr/af_qrtr.c-322- * Signal that the transmission of a message with confirm_rx flag failed. The\nnet/qrtr/af_qrtr.c:323: * flow's \"pending\" counter will keep incrementing towards QRTR_TX_FLOW_HIGH,\nnet/qrtr/af_qrtr.c-324- * at which point transmission would stall forever waiting for the resume TX\n--\nnet/qrtr/af_qrtr.c=344=static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,\n--\nnet/qrtr/af_qrtr.c-352-\tmutex_lock(\u0026node-\u003eep_lock);\nnet/qrtr/af_qrtr.c:353:\tif (!node-\u003ehello_sent \u0026\u0026 type != QRTR_TYPE_HELLO) {\nnet/qrtr/af_qrtr.c-354-\t\tmutex_unlock(\u0026node-\u003eep_lock);\n--\nnet/qrtr/af_qrtr.c-366-\thdr = skb_push(skb, sizeof(*hdr));\nnet/qrtr/af_qrtr.c:367:\thdr-\u003eversion = cpu_to_le32(QRTR_PROTO_VER_1);\nnet/qrtr/af_qrtr.c-368-\thdr-\u003etype = cpu_to_le32(type);\n--\nnet/qrtr/af_qrtr.c-370-\thdr-\u003esrc_port_id = cpu_to_le32(from-\u003esq_port);\nnet/qrtr/af_qrtr.c:371:\tif (to-\u003esq_port == QRTR_PORT_CTRL) {\nnet/qrtr/af_qrtr.c-372-\t\thdr-\u003edst_node_id = cpu_to_le32(READ_ONCE(node-\u003enid));\nnet/qrtr/af_qrtr.c:373:\t\thdr-\u003edst_port_id = cpu_to_le32(QRTR_PORT_CTRL);\nnet/qrtr/af_qrtr.c-374-\t} else {\n--\nnet/qrtr/af_qrtr.c-390-\t\t\tkfree_skb(skb);\nnet/qrtr/af_qrtr.c:391:\t\tif (!rc \u0026\u0026 type == QRTR_TYPE_HELLO)\nnet/qrtr/af_qrtr.c-392-\t\t\tnode-\u003ehello_sent = true;\n--\nnet/qrtr/af_qrtr.c-399-\nnet/qrtr/af_qrtr.c:400:\tif (rc == -EAGAIN \u0026\u0026 type == QRTR_TYPE_HELLO)\nnet/qrtr/af_qrtr.c-401-\t\tschedule_delayed_work(\u0026node-\u003esay_hello, msecs_to_jiffies(100));\n--\nnet/qrtr/af_qrtr.c=430=static void qrtr_node_assign(struct qrtr_node *node, unsigned int nid)\n--\nnet/qrtr/af_qrtr.c-433-\nnet/qrtr/af_qrtr.c:434:\tif (nid == QRTR_EP_NID_AUTO)\nnet/qrtr/af_qrtr.c-435-\t\treturn;\n--\nnet/qrtr/af_qrtr.c-438-\tradix_tree_insert(\u0026qrtr_nodes, nid, node);\nnet/qrtr/af_qrtr.c:439:\tif (node-\u003enid == QRTR_EP_NID_AUTO)\nnet/qrtr/af_qrtr.c-440-\t\tWRITE_ONCE(node-\u003enid, nid);\n--\nnet/qrtr/af_qrtr.c=452=int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)\n--\nnet/qrtr/af_qrtr.c-476-\tswitch (ver) {\nnet/qrtr/af_qrtr.c:477:\tcase QRTR_PROTO_VER_1:\nnet/qrtr/af_qrtr.c-478-\t\tif (len \u003c sizeof(*v1))\n--\nnet/qrtr/af_qrtr.c-491-\t\tbreak;\nnet/qrtr/af_qrtr.c:492:\tcase QRTR_PROTO_VER_2:\nnet/qrtr/af_qrtr.c-493-\t\tif (len \u003c sizeof(*v2))\n--\nnet/qrtr/af_qrtr.c-498-\t\tcb-\u003etype = v2-\u003etype;\nnet/qrtr/af_qrtr.c:499:\t\tcb-\u003econfirm_rx = !!(v2-\u003eflags \u0026 QRTR_FLAGS_CONFIRM_RX);\nnet/qrtr/af_qrtr.c-500-\t\tcb-\u003esrc_node = le16_to_cpu(v2-\u003esrc_node_id);\n--\nnet/qrtr/af_qrtr.c-504-\nnet/qrtr/af_qrtr.c:505:\t\tif (cb-\u003esrc_port == (u16)QRTR_PORT_CTRL)\nnet/qrtr/af_qrtr.c:506:\t\t\tcb-\u003esrc_port = QRTR_PORT_CTRL;\nnet/qrtr/af_qrtr.c:507:\t\tif (cb-\u003edst_port == (u16)QRTR_PORT_CTRL)\nnet/qrtr/af_qrtr.c:508:\t\t\tcb-\u003edst_port = QRTR_PORT_CTRL;\nnet/qrtr/af_qrtr.c-509-\n--\nnet/qrtr/af_qrtr.c-516-\nnet/qrtr/af_qrtr.c:517:\tif (cb-\u003edst_port == QRTR_PORT_CTRL_LEGACY)\nnet/qrtr/af_qrtr.c:518:\t\tcb-\u003edst_port = QRTR_PORT_CTRL;\nnet/qrtr/af_qrtr.c-519-\n--\nnet/qrtr/af_qrtr.c-522-\nnet/qrtr/af_qrtr.c:523:\tif ((cb-\u003etype == QRTR_TYPE_NEW_SERVER ||\nnet/qrtr/af_qrtr.c:524:\t cb-\u003etype == QRTR_TYPE_RESUME_TX) \u0026\u0026\nnet/qrtr/af_qrtr.c-525-\t size \u003c sizeof(struct qrtr_ctrl_pkt))\n--\nnet/qrtr/af_qrtr.c-527-\nnet/qrtr/af_qrtr.c:528:\tif (cb-\u003edst_port != QRTR_PORT_CTRL \u0026\u0026 cb-\u003etype != QRTR_TYPE_DATA \u0026\u0026\nnet/qrtr/af_qrtr.c:529:\t cb-\u003etype != QRTR_TYPE_RESUME_TX)\nnet/qrtr/af_qrtr.c-530-\t\tgoto err;\n--\nnet/qrtr/af_qrtr.c-535-\nnet/qrtr/af_qrtr.c:536:\tif (cb-\u003etype == QRTR_TYPE_NEW_SERVER) {\nnet/qrtr/af_qrtr.c-537-\t\t/* Remote node endpoint can bridge other distant nodes */\n--\nnet/qrtr/af_qrtr.c-543-\nnet/qrtr/af_qrtr.c:544:\tif (cb-\u003etype == QRTR_TYPE_RESUME_TX) {\nnet/qrtr/af_qrtr.c-545-\t\tqrtr_tx_resume(node, skb);\n--\nnet/qrtr/af_qrtr.c=578=static struct sk_buff *qrtr_alloc_ctrl_packet(struct qrtr_ctrl_pkt **pkt,\n--\nnet/qrtr/af_qrtr.c-583-\nnet/qrtr/af_qrtr.c:584:\tskb = alloc_skb(QRTR_HDR_MAX_SIZE + pkt_len, flags);\nnet/qrtr/af_qrtr.c-585-\tif (!skb)\n--\nnet/qrtr/af_qrtr.c-587-\nnet/qrtr/af_qrtr.c:588:\tskb_reserve(skb, QRTR_HDR_MAX_SIZE);\nnet/qrtr/af_qrtr.c-589-\t*pkt = skb_put_zero(skb, pkt_len);\n--\nnet/qrtr/af_qrtr.c=594=static void qrtr_hello_work(struct work_struct *work)\nnet/qrtr/af_qrtr.c-595-{\nnet/qrtr/af_qrtr.c:596:\tstruct sockaddr_qrtr from = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:597:\tstruct sockaddr_qrtr to = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-598-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c-605-\t/* NS must be bound before we can send; retry with backoff if not ready */\nnet/qrtr/af_qrtr.c:606:\tctrl = qrtr_port_lookup(QRTR_PORT_CTRL);\nnet/qrtr/af_qrtr.c-607-\tif (!ctrl) {\n--\nnet/qrtr/af_qrtr.c-618-\nnet/qrtr/af_qrtr.c:619:\tpkt-\u003ecmd = cpu_to_le32(QRTR_TYPE_HELLO);\nnet/qrtr/af_qrtr.c-620-\tfrom.sq_node = qrtr_local_nid;\nnet/qrtr/af_qrtr.c-621-\tto.sq_node = node-\u003enid;\nnet/qrtr/af_qrtr.c:622:\tqrtr_node_enqueue(node, skb, QRTR_TYPE_HELLO, \u0026from, \u0026to);\nnet/qrtr/af_qrtr.c-623-\tqrtr_port_put(ctrl);\n--\nnet/qrtr/af_qrtr.c-628- * @ep: endpoint to register\nnet/qrtr/af_qrtr.c:629: * @nid: desired node id; may be QRTR_EP_NID_AUTO for auto-assignment\nnet/qrtr/af_qrtr.c-630- * Return: 0 on success; negative error code on failure\n--\nnet/qrtr/af_qrtr.c=634=int qrtr_endpoint_register(struct qrtr_endpoint *ep, unsigned int nid)\n--\nnet/qrtr/af_qrtr.c-647-\tskb_queue_head_init(\u0026node-\u003erx_queue);\nnet/qrtr/af_qrtr.c:648:\tnode-\u003enid = QRTR_EP_NID_AUTO;\nnet/qrtr/af_qrtr.c-649-\tnode-\u003eep = ep;\n--\nnet/qrtr/af_qrtr.c=675=void qrtr_endpoint_unregister(struct qrtr_endpoint *ep)\n--\nnet/qrtr/af_qrtr.c-677-\tstruct qrtr_node *node = ep-\u003enode;\nnet/qrtr/af_qrtr.c:678:\tstruct sockaddr_qrtr src = {AF_QIPCRTR, node-\u003enid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:679:\tstruct sockaddr_qrtr dst = {AF_QIPCRTR, qrtr_local_nid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-680-\tstruct radix_tree_iter iter;\n--\nnet/qrtr/af_qrtr.c-699-\t\tif (skb) {\nnet/qrtr/af_qrtr.c:700:\t\t\tpkt-\u003ecmd = cpu_to_le32(QRTR_TYPE_BYE);\nnet/qrtr/af_qrtr.c:701:\t\t\tqrtr_local_enqueue(NULL, skb, QRTR_TYPE_BYE, \u0026src, \u0026dst);\nnet/qrtr/af_qrtr.c-702-\t\t}\n--\nnet/qrtr/af_qrtr.c=721=static struct qrtr_sock *qrtr_port_lookup(int port)\n--\nnet/qrtr/af_qrtr.c-724-\nnet/qrtr/af_qrtr.c:725:\tif (port == QRTR_PORT_CTRL)\nnet/qrtr/af_qrtr.c-726-\t\tport = 0;\n--\nnet/qrtr/af_qrtr.c=744=static void qrtr_port_remove(struct qrtr_sock *ipc)\n--\nnet/qrtr/af_qrtr.c-751-\tto.sq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c:752:\tto.sq_node = QRTR_NODE_BCAST;\nnet/qrtr/af_qrtr.c:753:\tto.sq_port = QRTR_PORT_CTRL;\nnet/qrtr/af_qrtr.c-754-\n--\nnet/qrtr/af_qrtr.c-756-\tif (skb) {\nnet/qrtr/af_qrtr.c:757:\t\tpkt-\u003ecmd = cpu_to_le32(QRTR_TYPE_DEL_CLIENT);\nnet/qrtr/af_qrtr.c-758-\t\tpkt-\u003eclient.node = cpu_to_le32(ipc-\u003eus.sq_node);\n--\nnet/qrtr/af_qrtr.c-761-\t\tskb_set_owner_w(skb, \u0026ipc-\u003esk);\nnet/qrtr/af_qrtr.c:762:\t\tqrtr_bcast_enqueue(NULL, skb, QRTR_TYPE_DEL_CLIENT, \u0026ipc-\u003eus,\nnet/qrtr/af_qrtr.c-763-\t\t\t\t \u0026to);\n--\nnet/qrtr/af_qrtr.c-765-\nnet/qrtr/af_qrtr.c:766:\tif (port == QRTR_PORT_CTRL)\nnet/qrtr/af_qrtr.c-767-\t\tport = 0;\n--\nnet/qrtr/af_qrtr.c-783- * Port may be:\nnet/qrtr/af_qrtr.c:784: * 0: Assign ephemeral port in [QRTR_MIN_EPH_SOCKET, QRTR_MAX_EPH_SOCKET]\nnet/qrtr/af_qrtr.c:785: * \u003cQRTR_MIN_EPH_SOCKET: Specified; requires CAP_NET_ADMIN\nnet/qrtr/af_qrtr.c:786: * \u003eQRTR_MIN_EPH_SOCKET: Specified; available to all\nnet/qrtr/af_qrtr.c-787- */\nnet/qrtr/af_qrtr.c=788=static int qrtr_port_assign(struct qrtr_sock *ipc, int *port)\n--\nnet/qrtr/af_qrtr.c-792-\tif (!*port) {\nnet/qrtr/af_qrtr.c:793:\t\trc = xa_alloc(\u0026qrtr_ports, port, ipc, QRTR_EPH_PORT_RANGE,\nnet/qrtr/af_qrtr.c-794-\t\t\t\tGFP_KERNEL);\nnet/qrtr/af_qrtr.c:795:\t} else if (*port \u003c QRTR_MIN_EPH_SOCKET \u0026\u0026 !capable(CAP_NET_ADMIN)) {\nnet/qrtr/af_qrtr.c-796-\t\trc = -EACCES;\nnet/qrtr/af_qrtr.c:797:\t} else if (*port == QRTR_PORT_CTRL) {\nnet/qrtr/af_qrtr.c-798-\t\trc = xa_insert(\u0026qrtr_ports, 0, ipc, GFP_KERNEL);\n--\nnet/qrtr/af_qrtr.c=833=static int __qrtr_bind(struct socket *sock,\n--\nnet/qrtr/af_qrtr.c-857-\t/* Notify all open ports about the new controller */\nnet/qrtr/af_qrtr.c:858:\tif (port == QRTR_PORT_CTRL)\nnet/qrtr/af_qrtr.c-859-\t\tqrtr_reset_ports();\n--\nnet/qrtr/af_qrtr.c=933=static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,\n--\nnet/qrtr/af_qrtr.c-941-\t\t/* Skip nodes with no assigned node ID yet. */\nnet/qrtr/af_qrtr.c:942:\t\tif (READ_ONCE(node-\u003enid) == QRTR_EP_NID_AUTO)\nnet/qrtr/af_qrtr.c-943-\t\t\tcontinue;\n--\nnet/qrtr/af_qrtr.c=957=static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)\n--\nnet/qrtr/af_qrtr.c-961-\t\t\t struct sockaddr_qrtr *, struct sockaddr_qrtr *);\nnet/qrtr/af_qrtr.c:962:\t__le32 qrtr_type = cpu_to_le32(QRTR_TYPE_DATA);\nnet/qrtr/af_qrtr.c-963-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n--\nnet/qrtr/af_qrtr.c-1002-\tnode = NULL;\nnet/qrtr/af_qrtr.c:1003:\tif (addr-\u003esq_node == QRTR_NODE_BCAST) {\nnet/qrtr/af_qrtr.c:1004:\t\tif (addr-\u003esq_port != QRTR_PORT_CTRL \u0026\u0026\nnet/qrtr/af_qrtr.c:1005:\t\t qrtr_local_nid != QRTR_NODE_BCAST) {\nnet/qrtr/af_qrtr.c-1006-\t\t\trelease_sock(sk);\n--\nnet/qrtr/af_qrtr.c-1021-\tplen = (len + 3) \u0026 ~3;\nnet/qrtr/af_qrtr.c:1022:\tskb = sock_alloc_send_skb(sk, plen + QRTR_HDR_MAX_SIZE,\nnet/qrtr/af_qrtr.c-1023-\t\t\t\t msg-\u003emsg_flags \u0026 MSG_DONTWAIT, \u0026rc);\n--\nnet/qrtr/af_qrtr.c-1028-\nnet/qrtr/af_qrtr.c:1029:\tskb_reserve(skb, QRTR_HDR_MAX_SIZE);\nnet/qrtr/af_qrtr.c-1030-\n--\nnet/qrtr/af_qrtr.c-1036-\nnet/qrtr/af_qrtr.c:1037:\tif (ipc-\u003eus.sq_port == QRTR_PORT_CTRL) {\nnet/qrtr/af_qrtr.c-1038-\t\tif (len \u003c 4) {\n--\nnet/qrtr/af_qrtr.c=1060=static int qrtr_send_resume_tx(struct qrtr_cb *cb)\n--\nnet/qrtr/af_qrtr.c-1078-\nnet/qrtr/af_qrtr.c:1079:\tpkt-\u003ecmd = cpu_to_le32(QRTR_TYPE_RESUME_TX);\nnet/qrtr/af_qrtr.c-1080-\tpkt-\u003eclient.node = cpu_to_le32(cb-\u003edst_node);\n--\nnet/qrtr/af_qrtr.c-1082-\nnet/qrtr/af_qrtr.c:1083:\tret = qrtr_node_enqueue(node, skb, QRTR_TYPE_RESUME_TX, \u0026local, \u0026remote);\nnet/qrtr/af_qrtr.c-1084-\n--\nnet/qrtr/af_qrtr.c=1324=static int qrtr_create(struct net *net, struct socket *sock,\n--\nnet/qrtr/af_qrtr.c-1332-\nnet/qrtr/af_qrtr.c:1333:\t/* QRTR keeps its port and node state in module-global variables that\nnet/qrtr/af_qrtr.c-1334-\t * are not partitioned per network namespace, and the in-kernel name\n--\nnet/qrtr/mhi.c=13=struct qrtr_mhi_dev {\n--\nnet/qrtr/mhi.c-18-\nnet/qrtr/mhi.c:19:/* From MHI to QRTR */\nnet/qrtr/mhi.c-20-static void qcom_mhi_qrtr_dl_callback(struct mhi_device *mhi_dev,\n--\nnet/qrtr/mhi.c-46-\nnet/qrtr/mhi.c:47:/* From QRTR to MHI */\nnet/qrtr/mhi.c-48-static void qcom_mhi_qrtr_ul_callback(struct mhi_device *mhi_dev,\n--\nnet/qrtr/mhi.c=109=static int qcom_mhi_qrtr_probe(struct mhi_device *mhi_dev,\n--\nnet/qrtr/mhi.c-129-\nnet/qrtr/mhi.c:130:\trc = qrtr_endpoint_register(\u0026qdev-\u003eep, QRTR_EP_NID_AUTO);\nnet/qrtr/mhi.c-131-\tif (rc)\n--\nnet/qrtr/mhi.c-137-\nnet/qrtr/mhi.c:138:\tdev_dbg(qdev-\u003edev, \"Qualcomm MHI QRTR driver probed\\n\");\nnet/qrtr/mhi.c-139-\n--\nnet/qrtr/ns.c=32=static const char * const qrtr_ctrl_pkt_strings[] = {\nnet/qrtr/ns.c:33:\t[QRTR_TYPE_HELLO]\t= \"hello\",\nnet/qrtr/ns.c:34:\t[QRTR_TYPE_BYE]\t\t= \"bye\",\nnet/qrtr/ns.c:35:\t[QRTR_TYPE_NEW_SERVER]\t= \"new-server\",\nnet/qrtr/ns.c:36:\t[QRTR_TYPE_DEL_SERVER]\t= \"del-server\",\nnet/qrtr/ns.c:37:\t[QRTR_TYPE_DEL_CLIENT]\t= \"del-client\",\nnet/qrtr/ns.c:38:\t[QRTR_TYPE_RESUME_TX]\t= \"resume-tx\",\nnet/qrtr/ns.c:39:\t[QRTR_TYPE_EXIT]\t= \"exit\",\nnet/qrtr/ns.c:40:\t[QRTR_TYPE_PING]\t= \"ping\",\nnet/qrtr/ns.c:41:\t[QRTR_TYPE_NEW_LOOKUP]\t= \"new-lookup\",\nnet/qrtr/ns.c:42:\t[QRTR_TYPE_DEL_LOOKUP]\t= \"del-lookup\",\nnet/qrtr/ns.c-43-};\n--\nnet/qrtr/ns.c=69=struct qrtr_node {\n--\nnet/qrtr/ns.c-78- */\nnet/qrtr/ns.c:79:#define QRTR_NS_MAX_NODES 512\nnet/qrtr/ns.c:80:#define QRTR_NS_MAX_SERVERS 256\nnet/qrtr/ns.c:81:#define QRTR_NS_MAX_LOOKUPS 128\nnet/qrtr/ns.c-82-\n--\nnet/qrtr/ns.c=85=static struct qrtr_node *node_get(unsigned int node_id)\n--\nnet/qrtr/ns.c-92-\nnet/qrtr/ns.c:93:\tif (node_count \u003e= QRTR_NS_MAX_NODES) {\nnet/qrtr/ns.c:94:\t\tpr_err_ratelimited(\"QRTR clients exceed max node limit!\\n\");\nnet/qrtr/ns.c-95-\t\treturn NULL;\n--\nnet/qrtr/ns.c=129=static int service_announce_new(struct sockaddr_qrtr *dest,\n--\nnet/qrtr/ns.c-142-\tmemset(\u0026pkt, 0, sizeof(pkt));\nnet/qrtr/ns.c:143:\tpkt.cmd = cpu_to_le32(QRTR_TYPE_NEW_SERVER);\nnet/qrtr/ns.c-144-\tpkt.server.service = cpu_to_le32(srv-\u003eservice);\n--\nnet/qrtr/ns.c=155=static void service_announce_del(struct sockaddr_qrtr *dest,\n--\nnet/qrtr/ns.c-169-\tmemset(\u0026pkt, 0, sizeof(pkt));\nnet/qrtr/ns.c:170:\tpkt.cmd = cpu_to_le32(QRTR_TYPE_DEL_SERVER);\nnet/qrtr/ns.c-171-\tpkt.server.service = cpu_to_le32(srv-\u003eservice);\n--\nnet/qrtr/ns.c=186=static void lookup_notify(struct sockaddr_qrtr *to, struct qrtr_server *srv,\n--\nnet/qrtr/ns.c-197-\tmemset(\u0026pkt, 0, sizeof(pkt));\nnet/qrtr/ns.c:198:\tpkt.cmd = new ? cpu_to_le32(QRTR_TYPE_NEW_SERVER) :\nnet/qrtr/ns.c:199:\t\t\tcpu_to_le32(QRTR_TYPE_DEL_SERVER);\nnet/qrtr/ns.c-200-\tif (srv) {\n--\nnet/qrtr/ns.c=241=static struct qrtr_server *server_add(unsigned int service,\n--\nnet/qrtr/ns.c-258-\told = xa_load(\u0026node-\u003eservers, port);\nnet/qrtr/ns.c:259:\tif (!old \u0026\u0026 node-\u003eserver_count \u003e= QRTR_NS_MAX_SERVERS) {\nnet/qrtr/ns.c:260:\t\tpr_err_ratelimited(\"QRTR client node %u exceeds max server limit!\\n\", node_id);\nnet/qrtr/ns.c-261-\t\treturn NULL;\n--\nnet/qrtr/ns.c=335=static int ctrl_cmd_bye(struct sockaddr_qrtr *from)\n--\nnet/qrtr/ns.c-365-\tmemset(\u0026pkt, 0, sizeof(pkt));\nnet/qrtr/ns.c:366:\tpkt.cmd = cpu_to_le32(QRTR_TYPE_BYE);\nnet/qrtr/ns.c-367-\tpkt.client.node = cpu_to_le32(from-\u003esq_node);\n--\nnet/qrtr/ns.c=395=static int ctrl_cmd_del_client(struct sockaddr_qrtr *from,\n--\nnet/qrtr/ns.c-448-\tmemset(\u0026pkt, 0, sizeof(pkt));\nnet/qrtr/ns.c:449:\tpkt.cmd = cpu_to_le32(QRTR_TYPE_DEL_CLIENT);\nnet/qrtr/ns.c-450-\tpkt.client.node = cpu_to_le32(node_id);\n--\nnet/qrtr/ns.c=536=static int ctrl_cmd_new_lookup(struct sockaddr_qrtr *from,\n--\nnet/qrtr/ns.c-549-\nnet/qrtr/ns.c:550:\tif (qrtr_ns.lookup_count \u003e= QRTR_NS_MAX_LOOKUPS) {\nnet/qrtr/ns.c:551:\t\tpr_err_ratelimited(\"QRTR client node exceeds max lookup limit!\\n\");\nnet/qrtr/ns.c-552-\t\treturn -ENOSPC;\n--\nnet/qrtr/ns.c=608=static void qrtr_ns_worker(struct work_struct *work)\n--\nnet/qrtr/ns.c-650-\t\tswitch (cmd) {\nnet/qrtr/ns.c:651:\t\tcase QRTR_TYPE_HELLO:\nnet/qrtr/ns.c-652-\t\t\tret = ctrl_cmd_hello(\u0026sq);\nnet/qrtr/ns.c-653-\t\t\tbreak;\nnet/qrtr/ns.c:654:\t\tcase QRTR_TYPE_BYE:\nnet/qrtr/ns.c-655-\t\t\tret = ctrl_cmd_bye(\u0026sq);\nnet/qrtr/ns.c-656-\t\t\tbreak;\nnet/qrtr/ns.c:657:\t\tcase QRTR_TYPE_DEL_CLIENT:\nnet/qrtr/ns.c-658-\t\t\tret = ctrl_cmd_del_client(\u0026sq,\n--\nnet/qrtr/ns.c-661-\t\t\tbreak;\nnet/qrtr/ns.c:662:\t\tcase QRTR_TYPE_NEW_SERVER:\nnet/qrtr/ns.c-663-\t\t\tret = ctrl_cmd_new_server(\u0026sq,\n--\nnet/qrtr/ns.c-668-\t\t\tbreak;\nnet/qrtr/ns.c:669:\t\tcase QRTR_TYPE_DEL_SERVER:\nnet/qrtr/ns.c-670-\t\t\tret = ctrl_cmd_del_server(\u0026sq,\n--\nnet/qrtr/ns.c-675-\t\t\tbreak;\nnet/qrtr/ns.c:676:\t\tcase QRTR_TYPE_EXIT:\nnet/qrtr/ns.c:677:\t\tcase QRTR_TYPE_PING:\nnet/qrtr/ns.c:678:\t\tcase QRTR_TYPE_RESUME_TX:\nnet/qrtr/ns.c-679-\t\t\tbreak;\nnet/qrtr/ns.c:680:\t\tcase QRTR_TYPE_NEW_LOOKUP:\nnet/qrtr/ns.c-681-\t\t\tret = ctrl_cmd_new_lookup(\u0026sq,\n--\nnet/qrtr/ns.c-684-\t\t\tbreak;\nnet/qrtr/ns.c:685:\t\tcase QRTR_TYPE_DEL_LOOKUP:\nnet/qrtr/ns.c-686-\t\t\tctrl_cmd_del_lookup(\u0026sq,\n--\nnet/qrtr/ns.c=707=int qrtr_ns_init(void)\n--\nnet/qrtr/ns.c-734-\nnet/qrtr/ns.c:735:\tsq.sq_port = QRTR_PORT_CTRL;\nnet/qrtr/ns.c-736-\tqrtr_ns.local_node = sq.sq_node;\n--\nnet/qrtr/ns.c-744-\tqrtr_ns.bcast_sq.sq_family = AF_QIPCRTR;\nnet/qrtr/ns.c:745:\tqrtr_ns.bcast_sq.sq_node = QRTR_NODE_BCAST;\nnet/qrtr/ns.c:746:\tqrtr_ns.bcast_sq.sq_port = QRTR_PORT_CTRL;\nnet/qrtr/ns.c-747-\n--\nnet/qrtr/qrtr.h-1-/* SPDX-License-Identifier: GPL-2.0 */\nnet/qrtr/qrtr.h:2:#ifndef __QRTR_H_\nnet/qrtr/qrtr.h:3:#define __QRTR_H_\nnet/qrtr/qrtr.h-4-\n--\nnet/qrtr/qrtr.h=7=struct sk_buff;\n--\nnet/qrtr/qrtr.h-9-/* endpoint node id auto assignment */\nnet/qrtr/qrtr.h:10:#define QRTR_EP_NID_AUTO (-1)\nnet/qrtr/qrtr.h-11-\n--\nnet/qrtr/smd.c=59=static int qcom_smd_qrtr_probe(struct rpmsg_device *rpdev)\n--\nnet/qrtr/smd.c-71-\nnet/qrtr/smd.c:72:\trc = qrtr_endpoint_register(\u0026qdev-\u003eep, QRTR_EP_NID_AUTO);\nnet/qrtr/smd.c-73-\tif (rc)\n--\nnet/qrtr/smd.c-77-\nnet/qrtr/smd.c:78:\tdev_dbg(\u0026rpdev-\u003edev, \"Qualcomm SMD QRTR driver probed\\n\");\nnet/qrtr/smd.c-79-\n--\nnet/qrtr/tun.c=31=static int qrtr_tun_open(struct inode *inode, struct file *filp)\n--\nnet/qrtr/tun.c-46-\nnet/qrtr/tun.c:47:\tret = qrtr_endpoint_register(\u0026tun-\u003eep, QRTR_EP_NID_AUTO);\nnet/qrtr/tun.c-48-\tif (ret)\n"
} |
| 19/2 | 2026/09/21 17:08 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 36162 output: 129 thoughts: 733 Thoughts: **Analysis of QRTR Socket Operations** Okay, let's break this down. We're dealing with a patch related to `CONFIG_QRTR`, specifically impacting `af_qrtr.c`. It looks like `CONFIG_QRTR` is the only config we need to enable, and `QRTR_TUN` doesn't seem relevant here, so we can ignore that. The core of the change appears to center around the functions `qrtr_getname` and `qrtr_ioctl`. These functions are specific to the kernel and directly modified by the patch, so they are the likely candidates for fuzzing. My initial thought was to see if these functions are called anywhere else. Looking at `net/qrtr/af_qrtr.c`, I see that `qrtr_proto_ops` contains function pointers to both `qrtr_getname` and `qrtr_ioctl`. Furthermore, `qrtr_getname` is directly invoked by `getsockname()` and `getpeername()`, and `qrtr_ioctl` is called by `ioctl()`. Now, the compiler could potentially inline these, so I want to be certain that the symbols exist as entry points. Checking `qrtr_proto_ops` again, the addresses of `qrtr_getname` and `qrtr_ioctl` are taken, confirming that the compiler can't completely eliminate them. Even if it tries to optimize them out, they should exist in the symbol table. Therefore, `qrtr_getname` and `qrtr_ioctl` are the direct symbols we need to focus on for fuzzing. This clearly warrants fuzzing. The patch modifies socket operations within `net/qrtr/af_qrtr.c` related to `qrtr_getname` and `qrtr_ioctl`. The intent is to prevent the disclosure of uninitialized kernel memory to userspace, which would occur when invoking `getsockname`/`getpeername` or `ioctl(SIOCGIFADDR)` on `AF_QIPCRTR` sockets. Therefore, the `set-results` parameters are as follows: * `WorthFuzzing`: true * `Reasoning`: The patch modifies reachable socket operations in `net/qrtr/af_qrtr.c` (`qrtr_getname` and `qrtr_ioctl`), zeroing padding and explicitly assigning fields to prevent uninitialized kernel memory disclosure to userspace when invoking `getsockname`/`getpeername` or `ioctl(SIOCGIFADDR)` on `AF_QIPCRTR` sockets. * `FocusSymbols`: `["qrtr_getname", "qrtr_ioctl"]` * `EnableConfigs`: `["QRTR"]` Now that everything's confirmed, let's invoke `set-results`. |
| 20/2 | 2026/09/21 17:08 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"QRTR"
],
"FocusSymbols": [
"qrtr_getname",
"qrtr_ioctl"
],
"Reasoning": "The patch fixes potential kernel information disclosures in AF_QIPCRTR socket operations by zeroing structures and explicitly copying individual fields rather than copying structures containing padding. The affected code paths (qrtr_getname and qrtr_ioctl) are reachable from userspace via socket operations (getsockname, getpeername, and ioctl SIOCGIFADDR) and are suitable for fuzzing.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"QRTR"
],
"FocusSymbols": [
"qrtr_getname",
"qrtr_ioctl"
],
"Reasoning": "The patch fixes potential kernel information disclosures in AF_QIPCRTR socket operations by zeroing structures and explicitly copying individual fields rather than copying structures containing padding. The affected code paths (qrtr_getname and qrtr_ioctl) are reachable from userspace via socket operations (getsockname, getpeername, and ioctl SIOCGIFADDR) and are suitable for fuzzing.",
"WorthFuzzing": true
} |
| 21/1 | 2026/09/21 17:08 | action | If |
2mArgs:{
"WorthFuzzing": true
}Results: null |
| 22/2 | 2026/09/21 17:08 | agent | kmsan-evaluator |
2mModel:core Args: null Results: {
"KMSANReasoning": "The patch resolves potential kernel information leaks to user space in qrtr_getname() and qrtr_ioctl(SIOCGIFADDR) by ensuring proper zero-initialization. Specifically:\n1. In qrtr_getname(), 'struct sockaddr_qrtr qaddr' is explicitly zero-initialized with '= {}', and members sq_node, sq_port, and sq_family are explicitly assigned, preventing any uninitialized struct padding bytes from being copied to user space.\n2. In qrtr_ioctl(SIOCGIFADDR), 'ifr.ifr_addr' is zeroed via memset() before copying sq_family, sq_node, and sq_port, preventing struct padding or uninitialized sockaddr bytes from being leaked via put_user_ifreq().\n\nAll stack structures modified or introduced by this patch are fully initialized/zeroed before being read or copied. The patch does not introduce or expose any uninitialized memory risks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"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 006e2be471f49b5444c6a962c01dc9645bd10c62
Author: syz-cluster <triage@syzkaller.com>
Date: Mon Sep 21 17:07:32 2026 +0000
syz-cluster: applied patch under review
diff --git a/net/qrtr/af_qrtr.c b/net/qrtr/af_qrtr.c
index 78347c937af76..ee3cc2c32b73d 100644
--- a/net/qrtr/af_qrtr.c
+++ b/net/qrtr/af_qrtr.c
@@ -1178,7 +1178,7 @@ static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,
int peer)
{
struct qrtr_sock *ipc = qrtr_sk(sock->sk);
- struct sockaddr_qrtr qaddr;
+ struct sockaddr_qrtr qaddr = {};
struct sock *sk = sock->sk;
lock_sock(sk);
@@ -1188,9 +1188,11 @@ static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,
return -ENOTCONN;
}
- qaddr = ipc->peer;
+ qaddr.sq_node = ipc->peer.sq_node;
+ qaddr.sq_port = ipc->peer.sq_port;
} else {
- qaddr = ipc->us;
+ qaddr.sq_node = ipc->us.sq_node;
+ qaddr.sq_port = ipc->us.sq_port;
}
release_sock(sk);
@@ -1233,8 +1235,11 @@ static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
break;
}
+ memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));
sq = (struct sockaddr_qrtr *)&ifr.ifr_addr;
- *sq = ipc->us;
+ sq->sq_family = ipc->us.sq_family;
+ sq->sq_node = ipc->us.sq_node;
+ sq->sq_port = ipc->us.sq_port;
if (put_user_ifreq(&ifr, argp)) {
rc = -EFAULT;
break;
|
| 23/3 | 2026/09/21 17:08 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 2426 output: 40 thoughts: 62 Thoughts: Okay, here's my take on those initial thoughts, expressed from a first-person perspective, as a seasoned professional: **Analyzing the QRTR Patch and Context** Alright, before diving too deep, I need to get a solid grasp of what we're dealing with. My initial instinct is to give this patch a thorough once-over, but, as always, I need the context. Let's start with a focused examination of the code around lines 1178 and 1233 in `net/qrtr/af_qrtr.c`. I want to see *how* this patch integrates and what else might be impacted in that section. That specific file is key, and those line numbers should give me a good jumping-off point to assess the impact and integrity of this change. Context is everything when it comes to assessing patches like these, I'll be looking for potential dependencies, side effects, and of course any obvious problems. A quick skim of those lines will tell me a lot. |
| 24/3 | 2026/09/21 17:09 | tool | read-file |
0mArgs:{
"File": "net/qrtr/af_qrtr.c",
"FirstLine": 1175,
"LineCount": 80
}Results: {
"Contents": "1175:\t}\n1176:\t\n1177:\tstatic int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n1178:\t\t\t\tint peer)\n1179:\t{\n1180:\t\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n1181:\t\tstruct sockaddr_qrtr qaddr = {};\n1182:\t\tstruct sock *sk = sock-\u003esk;\n1183:\t\n1184:\t\tlock_sock(sk);\n1185:\t\tif (peer) {\n1186:\t\t\tif (sk-\u003esk_state != TCP_ESTABLISHED) {\n1187:\t\t\t\trelease_sock(sk);\n1188:\t\t\t\treturn -ENOTCONN;\n1189:\t\t\t}\n1190:\t\n1191:\t\t\tqaddr.sq_node = ipc-\u003epeer.sq_node;\n1192:\t\t\tqaddr.sq_port = ipc-\u003epeer.sq_port;\n1193:\t\t} else {\n1194:\t\t\tqaddr.sq_node = ipc-\u003eus.sq_node;\n1195:\t\t\tqaddr.sq_port = ipc-\u003eus.sq_port;\n1196:\t\t}\n1197:\t\trelease_sock(sk);\n1198:\t\n1199:\t\tqaddr.sq_family = AF_QIPCRTR;\n1200:\t\n1201:\t\tmemcpy(saddr, \u0026qaddr, sizeof(qaddr));\n1202:\t\n1203:\t\treturn sizeof(qaddr);\n1204:\t}\n1205:\t\n1206:\tstatic int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n1207:\t{\n1208:\t\tvoid __user *argp = (void __user *)arg;\n1209:\t\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n1210:\t\tstruct sock *sk = sock-\u003esk;\n1211:\t\tstruct sockaddr_qrtr *sq;\n1212:\t\tstruct sk_buff *skb;\n1213:\t\tstruct ifreq ifr;\n1214:\t\tlong len = 0;\n1215:\t\tint rc = 0;\n1216:\t\n1217:\t\tlock_sock(sk);\n1218:\t\n1219:\t\tswitch (cmd) {\n1220:\t\tcase TIOCOUTQ:\n1221:\t\t\tlen = sk-\u003esk_sndbuf - sk_wmem_alloc_get(sk);\n1222:\t\t\tif (len \u003c 0)\n1223:\t\t\t\tlen = 0;\n1224:\t\t\trc = put_user(len, (int __user *)argp);\n1225:\t\t\tbreak;\n1226:\t\tcase TIOCINQ:\n1227:\t\t\tskb = skb_peek(\u0026sk-\u003esk_receive_queue);\n1228:\t\t\tif (skb)\n1229:\t\t\t\tlen = skb-\u003elen;\n1230:\t\t\trc = put_user(len, (int __user *)argp);\n1231:\t\t\tbreak;\n1232:\t\tcase SIOCGIFADDR:\n1233:\t\t\tif (get_user_ifreq(\u0026ifr, NULL, argp)) {\n1234:\t\t\t\trc = -EFAULT;\n1235:\t\t\t\tbreak;\n1236:\t\t\t}\n1237:\t\n1238:\t\t\tmemset(\u0026ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));\n1239:\t\t\tsq = (struct sockaddr_qrtr *)\u0026ifr.ifr_addr;\n1240:\t\t\tsq-\u003esq_family = ipc-\u003eus.sq_family;\n1241:\t\t\tsq-\u003esq_node = ipc-\u003eus.sq_node;\n1242:\t\t\tsq-\u003esq_port = ipc-\u003eus.sq_port;\n1243:\t\t\tif (put_user_ifreq(\u0026ifr, argp)) {\n1244:\t\t\t\trc = -EFAULT;\n1245:\t\t\t\tbreak;\n1246:\t\t\t}\n1247:\t\t\tbreak;\n1248:\t\tcase SIOCADDRT:\n1249:\t\tcase SIOCDELRT:\n1250:\t\tcase SIOCSIFADDR:\n1251:\t\tcase SIOCGIFDSTADDR:\n1252:\t\tcase SIOCSIFDSTADDR:\n1253:\t\tcase SIOCGIFBRDADDR:\n1254:\t\tcase SIOCSIFBRDADDR:\n"
} |
| 25/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3916 output: 19 thoughts: 599 Thoughts: **Analyzing the QRTR Socket Patch**
Okay, let's break this down. First, I need to understand what this patch is actually changing. Looking at the diff, it seems to be in the `net/qrtr/af_qrtr.c` file, which is right where I'd expect to see QRTR-related code. My initial thought is to check the git log or commit message for further context, but let's dive into the code itself first.
The primary change seems to involve how `struct sockaddr_qrtr` is handled in `qrtr_getname` and `qrtr_ioctl`. In `qrtr_getname`, the original code was directly assigning the `ipc->peer` or `ipc->us` structures to a `qaddr` variable. The updated code now does a more explicit member-wise copy: `qaddr.sq_node = ipc->peer.sq_node; qaddr.sq_port = ipc->peer.sq_port;` and similarly for `ipc->us`. This smells like a potential initialization issue – maybe the original struct wasn't being fully initialized, leading to possible garbage values being returned, or a vulnerability. It is worth noting the `={} ` in the new `sockaddr_qrtr` definition which is the standard way to initialize all members to zero.
In the `qrtr_ioctl` function, it does something similar. We've gone from a simple direct assignment `*sq = ipc->us` to explicitly setting the individual fields (`sq->sq_family = ipc->us.sq_family; sq->sq_node = ipc->us.sq_node; sq->sq_port = ipc->us.sq_port;`). Also the `memset` call is interesting, which again implies that the struct needs to be zeroed or initialized. This supports my hypothesis that we are dealing with a potential uninitialized memory situation or a vulnerability.
Now I need to understand what `struct sockaddr_qrtr` actually *is*. I'll need to look at its definition. Are there any default values that need to be set? Are there alignment concerns? Is there an issue with copying the entire struct in the old code? Is this related to a security vulnerability? What are the potential security implications for socket interfaces?
|
| 26/3 | 2026/09/21 17:09 | tool | grepper |
0mArgs:{
"Expression": "struct sockaddr_qrtr"
}Results: {
"Output": "drivers/net/ipa/ipa_qmi.c=80=static void ipa_server_init_complete(struct ipa_qmi *ipa_qmi)\n--\ndrivers/net/ipa/ipa_qmi.c-83-\tstruct qmi_handle *qmi = \u0026ipa_qmi-\u003eserver_handle;\ndrivers/net/ipa/ipa_qmi.c:84:\tstruct sockaddr_qrtr *sq = \u0026ipa_qmi-\u003emodem_sq;\ndrivers/net/ipa/ipa_qmi.c-85-\tstruct ipa_init_complete_ind ind = { };\n--\ndrivers/net/ipa/ipa_qmi.c=175=static void ipa_server_indication_register(struct qmi_handle *qmi,\ndrivers/net/ipa/ipa_qmi.c:176:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/ipa/ipa_qmi.c-177-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/ipa/ipa_qmi.c=204=static void ipa_server_driver_init_complete(struct qmi_handle *qmi,\ndrivers/net/ipa/ipa_qmi.c:205:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/ipa/ipa_qmi.c-206-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/ipa/ipa_qmi.c=252=static void ipa_client_init_driver(struct qmi_handle *qmi,\ndrivers/net/ipa/ipa_qmi.c:253:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/ipa/ipa_qmi.c-254-\t\t\t\t struct qmi_txn *txn, const void *decoded)\n--\ndrivers/net/ipa/ipa_qmi.h=28=struct ipa_qmi {\n--\ndrivers/net/ipa/ipa_qmi.h-32-\t/* Information used for the client handle */\ndrivers/net/ipa/ipa_qmi.h:33:\tstruct sockaddr_qrtr modem_sq;\ndrivers/net/ipa/ipa_qmi.h-34-\tstruct work_struct init_driver_work;\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=946=static void ath10k_qmi_fw_ready_ind(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath10k/qmi.c:947:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath10k/qmi.c-948-\t\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=955=static void ath10k_qmi_msa_ready_ind(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath10k/qmi.c:956:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath10k/qmi.c-957-\t\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/net/wireless/ath/ath10k/qmi.c=982=static int ath10k_qmi_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath10k/qmi.c-985-\tstruct ath10k_qmi *qmi = container_of(qmi_hdl, struct ath10k_qmi, qmi_hdl);\ndrivers/net/wireless/ath/ath10k/qmi.c:986:\tstruct sockaddr_qrtr *sq = \u0026qmi-\u003esq;\ndrivers/net/wireless/ath/ath10k/qmi.c-987-\tstruct ath10k *ar = qmi-\u003ear;\n--\ndrivers/net/wireless/ath/ath10k/qmi.h=91=struct ath10k_qmi {\n--\ndrivers/net/wireless/ath/ath10k/qmi.h-93-\tstruct qmi_handle qmi_hdl;\ndrivers/net/wireless/ath/ath10k/qmi.h:94:\tstruct sockaddr_qrtr sq;\ndrivers/net/wireless/ath/ath10k/qmi.h-95-\tstruct work_struct event_work;\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3021=static void ath11k_qmi_msg_mem_request_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3022:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3023-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3067=static void ath11k_qmi_msg_mem_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3068:\t\t\t\t\tstruct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3069-\t\t\t\t\tstruct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3079=static void ath11k_qmi_msg_fw_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3080:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3081-\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3097=static void ath11k_qmi_msg_cold_boot_cal_done_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3098:\t\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3099-\t\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3111=static void ath11k_qmi_msg_fw_init_done_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath11k/qmi.c:3112:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath11k/qmi.c-3113-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c=3167=static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath11k/qmi.c-3171-\tstruct ath11k_base *ab = qmi-\u003eab;\ndrivers/net/wireless/ath/ath11k/qmi.c:3172:\tstruct sockaddr_qrtr *sq = \u0026qmi-\u003esq;\ndrivers/net/wireless/ath/ath11k/qmi.c-3173-\tint ret;\n--\ndrivers/net/wireless/ath/ath11k/qmi.h=129=struct ath11k_qmi {\n--\ndrivers/net/wireless/ath/ath11k/qmi.h-131-\tstruct qmi_handle handle;\ndrivers/net/wireless/ath/ath11k/qmi.h:132:\tstruct sockaddr_qrtr sq;\ndrivers/net/wireless/ath/ath11k/qmi.h-133-\tstruct work_struct event_work;\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3841=static void ath12k_qmi_msg_mem_request_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath12k/qmi.c:3842:\t\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath12k/qmi.c-3843-\t\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3886=static void ath12k_qmi_msg_mem_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath12k/qmi.c:3887:\t\t\t\t\tstruct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath12k/qmi.c-3888-\t\t\t\t\tstruct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3898=static void ath12k_qmi_msg_fw_ready_cb(struct qmi_handle *qmi_hdl,\ndrivers/net/wireless/ath/ath12k/qmi.c:3899:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/net/wireless/ath/ath12k/qmi.c-3900-\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c=3937=static int ath12k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,\n--\ndrivers/net/wireless/ath/ath12k/qmi.c-3941-\tstruct ath12k_base *ab = qmi-\u003eab;\ndrivers/net/wireless/ath/ath12k/qmi.c:3942:\tstruct sockaddr_qrtr *sq = \u0026qmi-\u003esq;\ndrivers/net/wireless/ath/ath12k/qmi.c-3943-\tint ret;\n--\ndrivers/net/wireless/ath/ath12k/qmi.h=131=struct ath12k_qmi {\n--\ndrivers/net/wireless/ath/ath12k/qmi.h-133-\tstruct qmi_handle handle;\ndrivers/net/wireless/ath/ath12k/qmi.h:134:\tstruct sockaddr_qrtr sq;\ndrivers/net/wireless/ath/ath12k/qmi.h-135-\tstruct work_struct event_work;\n--\ndrivers/remoteproc/qcom_sysmon.c=20=struct qcom_sysmon {\n--\ndrivers/remoteproc/qcom_sysmon.c-49-\tstruct qmi_handle qmi;\ndrivers/remoteproc/qcom_sysmon.c:50:\tstruct sockaddr_qrtr ssctl;\ndrivers/remoteproc/qcom_sysmon.c-51-};\n--\ndrivers/remoteproc/qcom_sysmon.c=285=static const struct qmi_elem_info ssctl_shutdown_ind_ei[] = {\n--\ndrivers/remoteproc/qcom_sysmon.c-288-\ndrivers/remoteproc/qcom_sysmon.c:289:static void sysmon_ind_cb(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/remoteproc/qcom_sysmon.c-290-\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/slimbus/qcom-ngd-ctrl.c=121=struct qcom_slim_ngd_qmi {\ndrivers/slimbus/qcom-ngd-ctrl.c-122-\tstruct qmi_handle qmi;\ndrivers/slimbus/qcom-ngd-ctrl.c:123:\tstruct sockaddr_qrtr svc_info;\ndrivers/slimbus/qcom-ngd-ctrl.c-124-\tstruct qmi_handle svc_event_hdl;\n--\ndrivers/slimbus/qcom-ngd-ctrl.c=386=static void qcom_slim_qmi_power_resp_cb(struct qmi_handle *handle,\ndrivers/slimbus/qcom-ngd-ctrl.c:387:\t\t\t\t\tstruct sockaddr_qrtr *sq,\ndrivers/slimbus/qcom-ngd-ctrl.c-388-\t\t\t\t\tstruct qmi_txn *txn, const void *data)\n--\ndrivers/soc/qcom/pdr_interface.c=15=struct pdr_service {\n--\ndrivers/soc/qcom/pdr_interface.c-18-\ndrivers/soc/qcom/pdr_interface.c:19:\tstruct sockaddr_qrtr addr;\ndrivers/soc/qcom/pdr_interface.c-20-\n--\ndrivers/soc/qcom/pdr_interface.c=35=struct pdr_handle {\n--\ndrivers/soc/qcom/pdr_interface.c-38-\ndrivers/soc/qcom/pdr_interface.c:39:\tstruct sockaddr_qrtr locator_addr;\ndrivers/soc/qcom/pdr_interface.c-40-\n--\ndrivers/soc/qcom/pdr_interface.c=294=static void pdr_indication_cb(struct qmi_handle *qmi,\ndrivers/soc/qcom/pdr_interface.c:295:\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/pdr_interface.c-296-\t\t\t struct qmi_txn *txn, const void *data)\n--\ndrivers/soc/qcom/pdr_interface.c=558=int pdr_restart_pd(struct pdr_handle *pdr, struct pdr_service *pds)\n--\ndrivers/soc/qcom/pdr_interface.c-561-\tstruct servreg_restart_pd_req req = { 0 };\ndrivers/soc/qcom/pdr_interface.c:562:\tstruct sockaddr_qrtr addr;\ndrivers/soc/qcom/pdr_interface.c-563-\tstruct pdr_service *tmp;\n--\ndrivers/soc/qcom/qcom_pd_mapper.c=148=static void qcom_pdm_get_domain_list(struct qmi_handle *qmi,\ndrivers/soc/qcom/qcom_pd_mapper.c:149:\t\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qcom_pd_mapper.c-150-\t\t\t\t struct qmi_txn *txn,\n--\ndrivers/soc/qcom/qcom_pd_mapper.c=214=static void qcom_pdm_pfr(struct qmi_handle *qmi,\ndrivers/soc/qcom/qcom_pd_mapper.c:215:\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qcom_pd_mapper.c-216-\t\t\t struct qmi_txn *txn,\n--\ndrivers/soc/qcom/qmi_interface.c=18=static struct socket *qmi_sock_create(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:19:\t\t\t\t struct sockaddr_qrtr *sq);\ndrivers/soc/qcom/qmi_interface.c-20-\n--\ndrivers/soc/qcom/qmi_interface.c=165=static void qmi_send_new_lookup(struct qmi_handle *qmi, struct qmi_service *svc)\n--\ndrivers/soc/qcom/qmi_interface.c-167-\tstruct qrtr_ctrl_pkt pkt;\ndrivers/soc/qcom/qmi_interface.c:168:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-169-\tstruct msghdr msg = { };\n--\ndrivers/soc/qcom/qmi_interface.c=228=static void qmi_send_new_server(struct qmi_handle *qmi, struct qmi_service *svc)\n--\ndrivers/soc/qcom/qmi_interface.c-230-\tstruct qrtr_ctrl_pkt pkt;\ndrivers/soc/qcom/qmi_interface.c:231:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-232-\tstruct msghdr msg = { };\n--\ndrivers/soc/qcom/qmi_interface.c=378=EXPORT_SYMBOL_GPL(qmi_txn_cancel);\n--\ndrivers/soc/qcom/qmi_interface.c-389- */\ndrivers/soc/qcom/qmi_interface.c:390:static void qmi_invoke_handler(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-391-\t\t\t struct qmi_txn *txn, const void *buf, size_t len)\n--\ndrivers/soc/qcom/qmi_interface.c=440=static void qmi_handle_net_reset(struct qmi_handle *qmi)\ndrivers/soc/qcom/qmi_interface.c-441-{\ndrivers/soc/qcom/qmi_interface.c:442:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-443-\tstruct qmi_service *svc;\n--\ndrivers/soc/qcom/qmi_interface.c=472=static void qmi_handle_message(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:473:\t\t\t struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-474-\t\t\t const void *buf, size_t len)\n--\ndrivers/soc/qcom/qmi_interface.c=523=static void qmi_data_ready_work(struct work_struct *work)\n--\ndrivers/soc/qcom/qmi_interface.c-526-\tstruct qmi_ops *ops = \u0026qmi-\u003eops;\ndrivers/soc/qcom/qmi_interface.c:527:\tstruct sockaddr_qrtr sq;\ndrivers/soc/qcom/qmi_interface.c-528-\tstruct msghdr msg = { .msg_name = \u0026sq, .msg_namelen = sizeof(sq) };\n--\ndrivers/soc/qcom/qmi_interface.c=585=static struct socket *qmi_sock_create(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:586:\t\t\t\t struct sockaddr_qrtr *sq)\ndrivers/soc/qcom/qmi_interface.c-587-{\n--\ndrivers/soc/qcom/qmi_interface.c=739=static ssize_t qmi_send_message(struct qmi_handle *qmi,\ndrivers/soc/qcom/qmi_interface.c:740:\t\t\t\tstruct sockaddr_qrtr *sq, struct qmi_txn *txn,\ndrivers/soc/qcom/qmi_interface.c-741-\t\t\t\tint type, int msg_id, size_t len,\n--\ndrivers/soc/qcom/qmi_interface.c-791- */\ndrivers/soc/qcom/qmi_interface.c:792:ssize_t qmi_send_request(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-793-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\n--\ndrivers/soc/qcom/qmi_interface.c=799=EXPORT_SYMBOL_GPL(qmi_send_request);\n--\ndrivers/soc/qcom/qmi_interface.c-812- */\ndrivers/soc/qcom/qmi_interface.c:813:ssize_t qmi_send_response(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-814-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\n--\ndrivers/soc/qcom/qmi_interface.c=820=EXPORT_SYMBOL_GPL(qmi_send_response);\n--\ndrivers/soc/qcom/qmi_interface.c-832- */\ndrivers/soc/qcom/qmi_interface.c:833:ssize_t qmi_send_indication(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ndrivers/soc/qcom/qmi_interface.c-834-\t\t\t int msg_id, size_t len,\n--\ninclude/linux/soc/qcom/qmi.h=158=struct qmi_ops {\n--\ninclude/linux/soc/qcom/qmi.h-161-\tvoid (*net_reset)(struct qmi_handle *qmi);\ninclude/linux/soc/qcom/qmi.h:162:\tvoid (*msg_handler)(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-163-\t\t\t const void *data, size_t count);\n--\ninclude/linux/soc/qcom/qmi.h=200=struct qmi_msg_handler {\n--\ninclude/linux/soc/qcom/qmi.h-206-\tsize_t decoded_size;\ninclude/linux/soc/qcom/qmi.h:207:\tvoid (*fn)(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-208-\t\t struct qmi_txn *txn, const void *decoded);\n--\ninclude/linux/soc/qcom/qmi.h=228=struct qmi_handle {\n--\ninclude/linux/soc/qcom/qmi.h-231-\ninclude/linux/soc/qcom/qmi.h:232:\tstruct sockaddr_qrtr sq;\ninclude/linux/soc/qcom/qmi.h-233-\n--\ninclude/linux/soc/qcom/qmi.h=260=void qmi_handle_release(struct qmi_handle *qmi);\ninclude/linux/soc/qcom/qmi.h-261-\ninclude/linux/soc/qcom/qmi.h:262:ssize_t qmi_send_request(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-263-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\ninclude/linux/soc/qcom/qmi.h-264-\t\t\t const struct qmi_elem_info *ei, const void *c_struct);\ninclude/linux/soc/qcom/qmi.h:265:ssize_t qmi_send_response(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-266-\t\t\t struct qmi_txn *txn, int msg_id, size_t len,\ninclude/linux/soc/qcom/qmi.h-267-\t\t\t const struct qmi_elem_info *ei, const void *c_struct);\ninclude/linux/soc/qcom/qmi.h:268:ssize_t qmi_send_indication(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\ninclude/linux/soc/qcom/qmi.h-269-\t\t\t int msg_id, size_t len, const struct qmi_elem_info *ei,\n--\ninclude/uapi/linux/qrtr.h-10-\ninclude/uapi/linux/qrtr.h:11:struct sockaddr_qrtr {\ninclude/uapi/linux/qrtr.h-12-\t__kernel_sa_family_t sq_family;\n--\nnet/qrtr/af_qrtr.c=90=struct qrtr_sock {\n--\nnet/qrtr/af_qrtr.c-92-\tstruct sock sk;\nnet/qrtr/af_qrtr.c:93:\tstruct sockaddr_qrtr us;\nnet/qrtr/af_qrtr.c:94:\tstruct sockaddr_qrtr peer;\nnet/qrtr/af_qrtr.c-95-};\n--\nnet/qrtr/af_qrtr.c=160=static int qrtr_local_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:161:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:162:\t\t\t struct sockaddr_qrtr *to);\nnet/qrtr/af_qrtr.c-163-static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:164:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:165:\t\t\t struct sockaddr_qrtr *to);\nnet/qrtr/af_qrtr.c-166-static struct qrtr_sock *qrtr_port_lookup(int port);\n--\nnet/qrtr/af_qrtr.c=344=static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:345:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:346:\t\t\t struct sockaddr_qrtr *to)\nnet/qrtr/af_qrtr.c-347-{\n--\nnet/qrtr/af_qrtr.c=594=static void qrtr_hello_work(struct work_struct *work)\nnet/qrtr/af_qrtr.c-595-{\nnet/qrtr/af_qrtr.c:596:\tstruct sockaddr_qrtr from = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:597:\tstruct sockaddr_qrtr to = {AF_QIPCRTR, 0, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-598-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c=675=void qrtr_endpoint_unregister(struct qrtr_endpoint *ep)\n--\nnet/qrtr/af_qrtr.c-677-\tstruct qrtr_node *node = ep-\u003enode;\nnet/qrtr/af_qrtr.c:678:\tstruct sockaddr_qrtr src = {AF_QIPCRTR, node-\u003enid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c:679:\tstruct sockaddr_qrtr dst = {AF_QIPCRTR, qrtr_local_nid, QRTR_PORT_CTRL};\nnet/qrtr/af_qrtr.c-680-\tstruct radix_tree_iter iter;\n--\nnet/qrtr/af_qrtr.c=744=static void qrtr_port_remove(struct qrtr_sock *ipc)\n--\nnet/qrtr/af_qrtr.c-748-\tint port = ipc-\u003eus.sq_port;\nnet/qrtr/af_qrtr.c:749:\tstruct sockaddr_qrtr to;\nnet/qrtr/af_qrtr.c-750-\n--\nnet/qrtr/af_qrtr.c=833=static int __qrtr_bind(struct socket *sock,\nnet/qrtr/af_qrtr.c:834:\t\t const struct sockaddr_qrtr *addr, int zapped)\nnet/qrtr/af_qrtr.c-835-{\n--\nnet/qrtr/af_qrtr.c=865=static int qrtr_autobind(struct socket *sock)\n--\nnet/qrtr/af_qrtr.c-867-\tstruct sock *sk = sock-\u003esk;\nnet/qrtr/af_qrtr.c:868:\tstruct sockaddr_qrtr addr;\nnet/qrtr/af_qrtr.c-869-\n--\nnet/qrtr/af_qrtr.c=881=static int qrtr_bind(struct socket *sock, struct sockaddr_unsized *saddr, int len)\nnet/qrtr/af_qrtr.c-882-{\nnet/qrtr/af_qrtr.c:883:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, saddr);\nnet/qrtr/af_qrtr.c-884-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n--\nnet/qrtr/af_qrtr.c=902=static int qrtr_local_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:903:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:904:\t\t\t struct sockaddr_qrtr *to)\nnet/qrtr/af_qrtr.c-905-{\n--\nnet/qrtr/af_qrtr.c=933=static int qrtr_bcast_enqueue(struct qrtr_node *node, struct sk_buff *skb,\nnet/qrtr/af_qrtr.c:934:\t\t\t int type, struct sockaddr_qrtr *from,\nnet/qrtr/af_qrtr.c:935:\t\t\t struct sockaddr_qrtr *to)\nnet/qrtr/af_qrtr.c-936-{\n--\nnet/qrtr/af_qrtr.c=957=static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)\nnet/qrtr/af_qrtr.c-958-{\nnet/qrtr/af_qrtr.c:959:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, msg-\u003emsg_name);\nnet/qrtr/af_qrtr.c-960-\tint (*enqueue_fn)(struct qrtr_node *, struct sk_buff *, int,\nnet/qrtr/af_qrtr.c:961:\t\t\t struct sockaddr_qrtr *, struct sockaddr_qrtr *);\nnet/qrtr/af_qrtr.c-962-\t__le32 qrtr_type = cpu_to_le32(QRTR_TYPE_DATA);\n--\nnet/qrtr/af_qrtr.c=1060=static int qrtr_send_resume_tx(struct qrtr_cb *cb)\nnet/qrtr/af_qrtr.c-1061-{\nnet/qrtr/af_qrtr.c:1062:\tstruct sockaddr_qrtr remote = { AF_QIPCRTR, cb-\u003esrc_node, cb-\u003esrc_port };\nnet/qrtr/af_qrtr.c:1063:\tstruct sockaddr_qrtr local = { AF_QIPCRTR, cb-\u003edst_node, cb-\u003edst_port };\nnet/qrtr/af_qrtr.c-1064-\tstruct qrtr_ctrl_pkt *pkt;\n--\nnet/qrtr/af_qrtr.c=1090=static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg,\n--\nnet/qrtr/af_qrtr.c-1092-{\nnet/qrtr/af_qrtr.c:1093:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, msg-\u003emsg_name);\nnet/qrtr/af_qrtr.c-1094-\tstruct sock *sk = sock-\u003esk;\n--\nnet/qrtr/af_qrtr.c=1146=static int qrtr_connect(struct socket *sock, struct sockaddr_unsized *saddr,\n--\nnet/qrtr/af_qrtr.c-1148-{\nnet/qrtr/af_qrtr.c:1149:\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, saddr);\nnet/qrtr/af_qrtr.c-1150-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n--\nnet/qrtr/af_qrtr.c=1177=static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n--\nnet/qrtr/af_qrtr.c-1180-\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\nnet/qrtr/af_qrtr.c:1181:\tstruct sockaddr_qrtr qaddr = {};\nnet/qrtr/af_qrtr.c-1182-\tstruct sock *sk = sock-\u003esk;\n--\nnet/qrtr/af_qrtr.c=1206=static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n--\nnet/qrtr/af_qrtr.c-1210-\tstruct sock *sk = sock-\u003esk;\nnet/qrtr/af_qrtr.c:1211:\tstruct sockaddr_qrtr *sq;\nnet/qrtr/af_qrtr.c-1212-\tstruct sk_buff *skb;\n--\nnet/qrtr/af_qrtr.c-1238-\t\tmemset(\u0026ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));\nnet/qrtr/af_qrtr.c:1239:\t\tsq = (struct sockaddr_qrtr *)\u0026ifr.ifr_addr;\nnet/qrtr/af_qrtr.c-1240-\t\tsq-\u003esq_family = ipc-\u003eus.sq_family;\n--\nnet/qrtr/ns.c=21=static struct {\nnet/qrtr/ns.c-22-\tstruct socket *sock;\nnet/qrtr/ns.c:23:\tstruct sockaddr_qrtr bcast_sq;\nnet/qrtr/ns.c-24-\tstruct list_head lookups;\n--\nnet/qrtr/ns.c=51=struct qrtr_lookup {\n--\nnet/qrtr/ns.c-54-\nnet/qrtr/ns.c:55:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-56-\tstruct list_head li;\n--\nnet/qrtr/ns.c=116=static int server_match(const struct qrtr_server *srv,\n--\nnet/qrtr/ns.c-128-\nnet/qrtr/ns.c:129:static int service_announce_new(struct sockaddr_qrtr *dest,\nnet/qrtr/ns.c-130-\t\t\t\tstruct qrtr_server *srv)\n--\nnet/qrtr/ns.c-154-\nnet/qrtr/ns.c:155:static void service_announce_del(struct sockaddr_qrtr *dest,\nnet/qrtr/ns.c-156-\t\t\t\t struct qrtr_server *srv)\n--\nnet/qrtr/ns.c-185-\nnet/qrtr/ns.c:186:static void lookup_notify(struct sockaddr_qrtr *to, struct qrtr_server *srv,\nnet/qrtr/ns.c-187-\t\t\t bool new)\n--\nnet/qrtr/ns.c-215-/* Announce the list of servers registered on the local node */\nnet/qrtr/ns.c:216:static int announce_servers(struct sockaddr_qrtr *sq)\nnet/qrtr/ns.c-217-{\n--\nnet/qrtr/ns.c=297=static int server_del(struct qrtr_node *node, unsigned int port, bool bcast)\n--\nnet/qrtr/ns.c-329-\nnet/qrtr/ns.c:330:static int ctrl_cmd_hello(struct sockaddr_qrtr *sq)\nnet/qrtr/ns.c-331-{\n--\nnet/qrtr/ns.c-334-\nnet/qrtr/ns.c:335:static int ctrl_cmd_bye(struct sockaddr_qrtr *from)\nnet/qrtr/ns.c-336-{\n--\nnet/qrtr/ns.c-339-\tstruct qrtr_server *srv;\nnet/qrtr/ns.c:340:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-341-\tstruct msghdr msg = { };\n--\nnet/qrtr/ns.c-394-\nnet/qrtr/ns.c:395:static int ctrl_cmd_del_client(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-396-\t\t\t unsigned int node_id, unsigned int port)\n--\nnet/qrtr/ns.c-402-\tstruct qrtr_server *srv;\nnet/qrtr/ns.c:403:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-404-\tstruct qrtr_node *node;\n--\nnet/qrtr/ns.c-469-\nnet/qrtr/ns.c:470:static int ctrl_cmd_new_server(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-471-\t\t\t unsigned int service, unsigned int instance,\n--\nnet/qrtr/ns.c-510-\nnet/qrtr/ns.c:511:static int ctrl_cmd_del_server(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-512-\t\t\t unsigned int service, unsigned int instance,\n--\nnet/qrtr/ns.c-535-\nnet/qrtr/ns.c:536:static int ctrl_cmd_new_lookup(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-537-\t\t\t unsigned int service, unsigned int instance)\n--\nnet/qrtr/ns.c-583-\nnet/qrtr/ns.c:584:static void ctrl_cmd_del_lookup(struct sockaddr_qrtr *from,\nnet/qrtr/ns.c-585-\t\t\t\tunsigned int service, unsigned int instance)\n--\nnet/qrtr/ns.c=608=static void qrtr_ns_worker(struct work_struct *work)\n--\nnet/qrtr/ns.c-611-\tsize_t recv_buf_size = 4096;\nnet/qrtr/ns.c:612:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-613-\tstruct msghdr msg = { };\n--\nnet/qrtr/ns.c=707=int qrtr_ns_init(void)\nnet/qrtr/ns.c-708-{\nnet/qrtr/ns.c:709:\tstruct sockaddr_qrtr sq;\nnet/qrtr/ns.c-710-\tint ret;\n--\nsamples/qmi/qmi_sample_client.c=331=static const struct file_operations ping_fops = {\n--\nsamples/qmi/qmi_sample_client.c-335-\nsamples/qmi/qmi_sample_client.c:336:static void ping_pong_cb(struct qmi_handle *qmi, struct sockaddr_qrtr *sq,\nsamples/qmi/qmi_sample_client.c-337-\t\t\t struct qmi_txn *txn, const void *data)\n--\nsamples/qmi/qmi_sample_client.c=453=static int qmi_sample_probe(struct platform_device *pdev)\nsamples/qmi/qmi_sample_client.c-454-{\nsamples/qmi/qmi_sample_client.c:455:\tstruct sockaddr_qrtr *sq;\nsamples/qmi/qmi_sample_client.c-456-\tstruct qmi_sample *sample;\n--\nsamples/qmi/qmi_sample_client.c=533=static int qmi_sample_new_server(struct qmi_handle *qmi,\n--\nsamples/qmi/qmi_sample_client.c-536-\tstruct platform_device *pdev;\nsamples/qmi/qmi_sample_client.c:537:\tstruct sockaddr_qrtr sq = { AF_QIPCRTR, service-\u003enode, service-\u003eport };\nsamples/qmi/qmi_sample_client.c-538-\tint ret;\n--\nsound/usb/qcom/qc_audio_offload.c=144=struct uaudio_qmi_svc {\nsound/usb/qcom/qc_audio_offload.c-145-\tstruct qmi_handle *uaudio_svc_hdl;\nsound/usb/qcom/qc_audio_offload.c:146:\tstruct sockaddr_qrtr client_sq;\nsound/usb/qcom/qc_audio_offload.c-147-\tbool client_connected;\n--\nsound/usb/qcom/qc_audio_offload.c=1545=static void handle_uaudio_stream_req(struct qmi_handle *handle,\nsound/usb/qcom/qc_audio_offload.c:1546:\t\t\t\t struct sockaddr_qrtr *sq,\nsound/usb/qcom/qc_audio_offload.c-1547-\t\t\t\t struct qmi_txn *txn,\n"
} |
| 27/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15533 output: 37 thoughts: 17 Thoughts: Here's a summary of my thought process, as if I were the one thinking it: **Diving into the QRTR Header** Okay, time to get my hands dirty. Let's start by digging into the heart of the QRTR implementation. The obvious first step is to examine the core definitions and structures, so I'll begin by checking `include/uapi/linux/qrtr.h`. That header file is usually the best place to find the canonical declarations for user-space interaction. I need to refresh my memory on the underlying data structures, error codes, and message formats, so I can start to reason about how this thing actually works. I need to be sure I understand the fundamentals before I can tackle any real analysis or modification. |
| 28/3 | 2026/09/21 17:09 | tool | read-file |
0mArgs:{
"File": "include/uapi/linux/qrtr.h",
"FirstLine": 1,
"LineCount": 40
}Results: {
"Contents": " 1:\t/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */\n 2:\t#ifndef _LINUX_QRTR_H\n 3:\t#define _LINUX_QRTR_H\n 4:\t\n 5:\t#include \u003clinux/socket.h\u003e\n 6:\t#include \u003clinux/types.h\u003e\n 7:\t\n 8:\t#define QRTR_NODE_BCAST\t0xffffffffu\n 9:\t#define QRTR_PORT_CTRL\t0xfffffffeu\n 10:\t\n 11:\tstruct sockaddr_qrtr {\n 12:\t\t__kernel_sa_family_t sq_family;\n 13:\t\t__u32 sq_node;\n 14:\t\t__u32 sq_port;\n 15:\t};\n 16:\t\n 17:\tenum qrtr_pkt_type {\n 18:\t\tQRTR_TYPE_DATA\t\t= 1,\n 19:\t\tQRTR_TYPE_HELLO\t\t= 2,\n 20:\t\tQRTR_TYPE_BYE\t\t= 3,\n 21:\t\tQRTR_TYPE_NEW_SERVER\t= 4,\n 22:\t\tQRTR_TYPE_DEL_SERVER\t= 5,\n 23:\t\tQRTR_TYPE_DEL_CLIENT\t= 6,\n 24:\t\tQRTR_TYPE_RESUME_TX\t= 7,\n 25:\t\tQRTR_TYPE_EXIT = 8,\n 26:\t\tQRTR_TYPE_PING = 9,\n 27:\t\tQRTR_TYPE_NEW_LOOKUP\t= 10,\n 28:\t\tQRTR_TYPE_DEL_LOOKUP\t= 11,\n 29:\t};\n 30:\t\n 31:\tstruct qrtr_ctrl_pkt {\n 32:\t\t__le32 cmd;\n 33:\t\n 34:\t\tunion {\n 35:\t\t\tstruct {\n 36:\t\t\t\t__le32 service;\n 37:\t\t\t\t__le32 instance;\n 38:\t\t\t\t__le32 node;\n 39:\t\t\t\t__le32 port;\n 40:\t\t\t} server;\n"
} |
| 29/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16301 output: 28 thoughts: 1023 Thoughts: **Analyzing a Potential Information Leak in `sockaddr_qrtr`**
Okay, let's break this down. First, I'm looking at the `struct sockaddr_qrtr` definition. Hmm, `sq_family` is a `__kernel_sa_family_t`, which is an `unsigned short` – that's 2 bytes. Then we have `sq_node`, which is a `__u32` – 4 bytes. Wait a minute… there's going to be padding! On 32-bit and 64-bit architectures, the compiler will likely insert 2 bytes of padding between `sq_family` and `sq_node` to ensure `sq_node` is aligned properly.
Let's confirm this: `sq_family` at offset 0 (2 bytes), padding at offset 2 (2 bytes), `sq_node` at offset 4 (4 bytes), and finally `sq_port` at offset 8 (4 bytes). So, the total `sizeof(struct sockaddr_qrtr)` is 12 bytes.
Now, I'm examining the `qrtr_getname()` function. Previously, this function had a problem. `qaddr` was an uninitialized local variable, which could have contained garbage data. The code then copied data into it. If `ipc->peer` or `ipc->us` contained uninitialized padding, or if the structure assignment copied padding, that garbage would be copied too. That's a definite vulnerability!
Now I'm looking at the patch that fixed it. They changed the declaration of `qaddr` to `struct sockaddr_qrtr qaddr = {};` which zero-initializes the struct, thus, eliminating the information leak. The patch also changed how the values are copied, directly assigning `sq_node` and `sq_port`.
Then I see the `qrtr_ioctl` function is also changed. The patch initializes `ifr.ifr_addr` with `memset`, and then copies the individual members of the struct.
This patch is fixing an information leak! The old code could have exposed uninitialized memory if the struct contained uninitialized data! This is important! The patch's changes eliminate any data leak from `ipc->us` or `ipc->peer` to userspace. I need to dig into the commit history or `git log` to get the full context of this patch.
|
| 30/3 | 2026/09/21 17:09 | tool | grepper |
0mArgs:{
"Expression": "qaddr.sq_node = ipc-\u003epeer.sq_node"
}Results: {
"Output": "net/qrtr/af_qrtr.c=1177=static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n--\nnet/qrtr/af_qrtr.c-1190-\nnet/qrtr/af_qrtr.c:1191:\t\tqaddr.sq_node = ipc-\u003epeer.sq_node;\nnet/qrtr/af_qrtr.c-1192-\t\tqaddr.sq_port = ipc-\u003epeer.sq_port;\n"
} |
| 31/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18006 output: 20 thoughts: 1332 Thoughts: **Analyzing the KMSAN Needs for a QRTR Patch**
Okay, first things first. Before jumping into any tooling, I need to meticulously evaluate the patch's impact according to the KMSAN guidelines. Forget the Git log for now; I need to read the instructions. Right, I need to see if this patch introduces or exposes uninitialized memory risks ONLY detectable by KMSAN. Specifically, I must determine if the criteria for `NeedsKMSAN=true` are met. Let's make sure I'm crystal clear on this.
The criteria say to check for:
1. Kernel structures sent to userspace with uninitialized fields.
2. Conditional logic or branching using uninitialized variables.
3. Allocation or initialization of complex data structures with later-read uninitialized fields.
4. Bounds checks and lengths that allow access to uninitialized bytes of existing buffers.
And, if it's NOT those things, then `NeedsKMSAN=false` which means:
- All stack/heap structures are fully zeroed or initialized.
- No risk of uninitialized memory usage or info-leaks.
Okay, let's look at the patch itself. I'm focusing on the `qrtr_getname` and `qrtr_ioctl` functions.
In `qrtr_getname`, the patch seems to be *initializing* `struct sockaddr_qrtr qaddr = {};` instead of letting it be uninitialized:
```c
- struct sockaddr_qrtr qaddr;
+ struct sockaddr_qrtr qaddr = {};
```
And then copies the `sq_node` and `sq_port` from another structure. It looks like a *fix* to uninitialized memory.
Now, checking the `qrtr_ioctl` function, this looks similar, too, a fix of uninitialized memory.
```c
memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));
sq = (struct sockaddr_qrtr *)&ifr.ifr_addr;
- *sq = ipc->us;
+ sq->sq_family = ipc->us.sq_family;
+ sq->sq_node = ipc->us.sq_node;
+ sq->sq_port = ipc->us.sq_port;
```
Here, the code *zeroes* the `ifr_addr` (which is a `sockaddr_qrtr`), then copies specific fields. Also, it defines `struct ifreq ifr;`.
So, it seems the patch is *preventing* uninitialized memory issues. It's initializing or zeroing memory *before* using it, both on the stack and when copying data. The patch doesn't introduce any new risks, it's cleaning up potential issues. Therefore, after this careful analysis, it would seem that `NeedsKMSAN=false`.
|
| 32/3 | 2026/09/21 17:09 | tool | grepper |
0mArgs:{
"Expression": "put_user_ifreq"
}Results: {
"Output": "include/linux/netdevice.h=4371=int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg);\ninclude/linux/netdevice.h:4372:int put_user_ifreq(struct ifreq *ifr, void __user *arg);\ninclude/linux/netdevice.h-4373-int dev_ioctl(struct net *net, unsigned int cmd, struct ifreq *ifr,\n--\nnet/bluetooth/af_bluetooth.c=665=static int bt_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)\n--\nnet/bluetooth/af_bluetooth.c-689-\nnet/bluetooth/af_bluetooth.c:690:\tif (put_user_ifreq(\u0026ifr, arg))\nnet/bluetooth/af_bluetooth.c-691-\t\treturn -EFAULT;\n--\nnet/ieee802154/socket.c=124=static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,\n--\nnet/ieee802154/socket.c-145-\nnet/ieee802154/socket.c:146:\tif (!ret \u0026\u0026 put_user_ifreq(\u0026ifr, arg))\nnet/ieee802154/socket.c-147-\t\tret = -EFAULT;\n--\nnet/ipv4/af_inet.c=962=int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n--\nnet/ipv4/af_inet.c-993-\t\terr = devinet_ioctl(net, cmd, \u0026ifr);\nnet/ipv4/af_inet.c:994:\t\tif (!err \u0026\u0026 put_user_ifreq(\u0026ifr, p))\nnet/ipv4/af_inet.c-995-\t\t\terr = -EFAULT;\n--\nnet/qrtr/af_qrtr.c=1206=static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n--\nnet/qrtr/af_qrtr.c-1242-\t\tsq-\u003esq_port = ipc-\u003eus.sq_port;\nnet/qrtr/af_qrtr.c:1243:\t\tif (put_user_ifreq(\u0026ifr, argp)) {\nnet/qrtr/af_qrtr.c-1244-\t\t\trc = -EFAULT;\n--\nnet/socket.c=1315=static long sock_do_ioctl(struct net *net, struct socket *sock,\n--\nnet/socket.c-1340-\tif (!err \u0026\u0026 need_copyout)\nnet/socket.c:1341:\t\tif (put_user_ifreq(\u0026ifr, argp))\nnet/socket.c-1342-\t\t\treturn -EFAULT;\n--\nnet/socket.c=1352=static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)\n--\nnet/socket.c-1372-\t\tif (!err \u0026\u0026 need_copyout)\nnet/socket.c:1373:\t\t\tif (put_user_ifreq(\u0026ifr, argp))\nnet/socket.c-1374-\t\t\t\treturn -EFAULT;\n--\nnet/socket.c=3478=EXPORT_SYMBOL(get_user_ifreq);\nnet/socket.c-3479-\nnet/socket.c:3480:int put_user_ifreq(struct ifreq *ifr, void __user *arg)\nnet/socket.c-3481-{\n--\nnet/socket.c-3491-}\nnet/socket.c:3492:EXPORT_SYMBOL(put_user_ifreq);\nnet/socket.c-3493-\n--\nnet/socket.c=3495=static int compat_siocwandev(struct net *net, struct compat_ifreq __user *uifr32)\n--\nnet/socket.c-3513-\t\tifr.ifr_settings.ifs_ifsu.raw_hdlc = saved;\nnet/socket.c:3514:\t\tif (put_user_ifreq(\u0026ifr, uifr32))\nnet/socket.c-3515-\t\t\terr = -EFAULT;\n"
} |
| 33/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21056 output: 34 thoughts: 22 Thoughts: Okay, let's dive into this. Here's my take on those thoughts, as though they were my own: **Analyzing `put_user_ifreq` in `net/socket.c`** Alright, time to get my hands dirty. My initial thought is to zero in on `put_user_ifreq` within `net/socket.c`. This is where the rubber meets the road, where the user-space interface related to interface requests is handled. I immediately start mentally parsing that filename and function name. `net/socket.c`… suggests this function's at the heart of socket-related interface configuration or retrieval. `put_user_ifreq`… the "put_user" implies data is being copied *to* user space, likely an `ifreq` structure. I expect this structure to contain interface-specific information, like address, flags, and so on. Understanding *this* function is key to really grasping how user space interacts with and configures network interfaces. This is definitely going to be interesting and a fundamental part of the network stack. Let’s see what we can find. |
| 34/3 | 2026/09/21 17:09 | tool | read-file |
0mArgs:{
"File": "net/socket.c",
"FirstLine": 3478,
"LineCount": 25
}Results: {
"Contents": "3478:\tEXPORT_SYMBOL(get_user_ifreq);\n3479:\t\n3480:\tint put_user_ifreq(struct ifreq *ifr, void __user *arg)\n3481:\t{\n3482:\t\tsize_t size = sizeof(*ifr);\n3483:\t\n3484:\t\tif (in_compat_syscall())\n3485:\t\t\tsize = sizeof(struct compat_ifreq);\n3486:\t\n3487:\t\tif (copy_to_user(arg, ifr, size))\n3488:\t\t\treturn -EFAULT;\n3489:\t\n3490:\t\treturn 0;\n3491:\t}\n3492:\tEXPORT_SYMBOL(put_user_ifreq);\n3493:\t\n3494:\t#ifdef CONFIG_COMPAT\n3495:\tstatic int compat_siocwandev(struct net *net, struct compat_ifreq __user *uifr32)\n3496:\t{\n3497:\t\tcompat_uptr_t uptr32;\n3498:\t\tstruct ifreq ifr;\n3499:\t\tvoid __user *saved;\n3500:\t\tint err;\n3501:\t\n3502:\t\tif (get_user_ifreq(\u0026ifr, NULL, uifr32))\n"
} |
| 35/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 21711 output: 18 thoughts: 341 Thoughts: **Analyzing `put_user_ifreq` and `qrtr_ioctl` in Relation to `struct ifreq`** Okay, hold on a second. Let me take a closer look at this `put_user_ifreq` function. It seems pretty straightforward: it's designed to copy an `ifreq` struct to userspace. The critical part is the size calculation: it checks for compatibility mode and adjusts the size accordingly, otherwise, it's just the size of the `ifreq` struct itself. Then, it uses `copy_to_user` to do the actual transfer. Got it. Now, let's swing over to where `put_user_ifreq` is being *used*, specifically within the `qrtr_ioctl` function. Aha! I see it: it's being used to handle the `SIOCGIFADDR` command. The code retrieves an `ifreq` struct, populates some of its fields (family, node, and port from `ipc->us`), and then calls `put_user_ifreq` to send it back to the user. Now the bells are going off. We need to be absolutely sure the sizes match. Let's make sure that `ifr` is the correct size. The potential source of a bug is in making an assumption on the size of the various structs. The question then becomes... what is the size of `struct ifreq` and, more importantly, `ifr.ifr_addr`? We need to verify that those sizes are handled correctly, especially when the kernel switches between architecture modes. That's where a mismatch could introduce vulnerabilities. Time to dig into the actual definitions. |
| 36/3 | 2026/09/21 17:09 | tool | grepper |
0mArgs:{
"Expression": "struct ifreq \\{"
}Results: {
"Output": "include/uapi/linux/if.h=207=struct if_settings {\n--\ninclude/uapi/linux/if.h-233-#if __UAPI_DEF_IF_IFREQ\ninclude/uapi/linux/if.h:234:struct ifreq {\ninclude/uapi/linux/if.h-235-#define IFHWADDRLEN\t6\n"
} |
| 37/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 22526 output: 38 thoughts: 23 Thoughts: Here's a summary of my thought process, as requested: **Navigating the Linux Network Interface Header** Okay, time to dive into the nitty-gritty. I need to look at the `include/uapi/linux/if.h` file. Specifically, I recall something interesting around line 234. I'm going to quickly reference that section. I'm hoping I find something insightful about a specific structure or definition. Let's see what's in there. I bet I will find the structure I am looking for. I am really hoping it addresses the network interface, maybe it has something about flags or interface-specific data I need to review. I should double-check the relevant kernel documentation for any recent changes that might influence my interpretation. |
| 38/3 | 2026/09/21 17:09 | tool | read-file |
0mArgs:{
"File": "include/uapi/linux/if.h",
"FirstLine": 230,
"LineCount": 50
}Results: {
"Contents": " 230:\t */\n 231:\t\n 232:\t/* for compatibility with glibc net/if.h */\n 233:\t#if __UAPI_DEF_IF_IFREQ\n 234:\tstruct ifreq {\n 235:\t#define IFHWADDRLEN\t6\n 236:\t\tunion\n 237:\t\t{\n 238:\t\t\tchar\tifrn_name[IFNAMSIZ];\t\t/* if name, e.g. \"en0\" */\n 239:\t\t} ifr_ifrn;\n 240:\t\t\n 241:\t\tunion {\n 242:\t\t\tstruct\tsockaddr ifru_addr;\n 243:\t\t\tstruct\tsockaddr ifru_dstaddr;\n 244:\t\t\tstruct\tsockaddr ifru_broadaddr;\n 245:\t\t\tstruct\tsockaddr ifru_netmask;\n 246:\t\t\tstruct sockaddr ifru_hwaddr;\n 247:\t\t\tshort\tifru_flags;\n 248:\t\t\tint\tifru_ivalue;\n 249:\t\t\tint\tifru_mtu;\n 250:\t\t\tstruct ifmap ifru_map;\n 251:\t\t\tchar\tifru_slave[IFNAMSIZ];\t/* Just fits the size */\n 252:\t\t\tchar\tifru_newname[IFNAMSIZ];\n 253:\t\t\tvoid __user *\tifru_data;\n 254:\t\t\tstruct\tif_settings ifru_settings;\n 255:\t\t} ifr_ifru;\n 256:\t};\n 257:\t#endif /* __UAPI_DEF_IF_IFREQ */\n 258:\t\n 259:\t#define ifr_name\tifr_ifrn.ifrn_name\t/* interface name \t*/\n 260:\t#define ifr_hwaddr\tifr_ifru.ifru_hwaddr\t/* MAC address \t\t*/\n 261:\t#define\tifr_addr\tifr_ifru.ifru_addr\t/* address\t\t*/\n 262:\t#define\tifr_dstaddr\tifr_ifru.ifru_dstaddr\t/* other end of p-p lnk\t*/\n 263:\t#define\tifr_broadaddr\tifr_ifru.ifru_broadaddr\t/* broadcast address\t*/\n 264:\t#define\tifr_netmask\tifr_ifru.ifru_netmask\t/* interface net mask\t*/\n 265:\t#define\tifr_flags\tifr_ifru.ifru_flags\t/* flags\t\t*/\n 266:\t#define\tifr_metric\tifr_ifru.ifru_ivalue\t/* metric\t\t*/\n 267:\t#define\tifr_mtu\t\tifr_ifru.ifru_mtu\t/* mtu\t\t\t*/\n 268:\t#define ifr_map\t\tifr_ifru.ifru_map\t/* device map\t\t*/\n 269:\t#define ifr_slave\tifr_ifru.ifru_slave\t/* slave device\t\t*/\n 270:\t#define\tifr_data\tifr_ifru.ifru_data\t/* for use by interface\t*/\n 271:\t#define ifr_ifindex\tifr_ifru.ifru_ivalue\t/* interface index\t*/\n 272:\t#define ifr_bandwidth\tifr_ifru.ifru_ivalue /* link bandwidth\t*/\n 273:\t#define ifr_qlen\tifr_ifru.ifru_ivalue\t/* Queue length \t*/\n 274:\t#define ifr_newname\tifr_ifru.ifru_newname\t/* New name\t\t*/\n 275:\t#define ifr_settings\tifr_ifru.ifru_settings\t/* Device/proto settings*/\n 276:\t\n 277:\t/*\n 278:\t * Structure used in SIOCGIFCONF request.\n 279:\t * Used to retrieve interface configuration\n"
} |
| 39/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 23757 output: 38 thoughts: 159 Thoughts: **Dissecting the `struct ifreq` Structure** Okay, hold on a second! I need to take a closer look at this `struct ifreq`. Right, `ifr_addr` is a `struct sockaddr`, which is nested inside the `union ifr_ifru`. Now, I need to remember, what's the size of that `union ifr_ifru`? Okay, `struct sockaddr` is 16 bytes in size. (sa_family_t is 2 bytes and `char sa_data[14]` is 14 bytes) But wait, hold on. What are `struct if_settings` or `struct ifmap`? Oh, and what about that `char ifru_slave[IFNAMSIZ]` field? Okay, `IFNAMSIZ` is 16 bytes. Let's dig deeper and figure out what the size of `struct if_settings` actually is. I should check lines 207 through 229 of `include/uapi/linux/if.h`. That's where I need to look. I'll get the answer there. |
| 40/3 | 2026/09/21 17:09 | tool | read-file |
0mArgs:{
"File": "include/uapi/linux/if.h",
"FirstLine": 205,
"LineCount": 26
}Results: {
"Contents": " 205:\t#endif /* __UAPI_DEF_IF_IFMAP */\n 206:\t\n 207:\tstruct if_settings {\n 208:\t\tunsigned int type;\t/* Type of physical device or protocol */\n 209:\t\tunsigned int size;\t/* Size of the data allocated by the caller */\n 210:\t\tunion {\n 211:\t\t\t/* {atm/eth/dsl}_settings anyone ? */\n 212:\t\t\traw_hdlc_proto\t\t__user *raw_hdlc;\n 213:\t\t\tcisco_proto\t\t__user *cisco;\n 214:\t\t\tfr_proto\t\t__user *fr;\n 215:\t\t\tfr_proto_pvc\t\t__user *fr_pvc;\n 216:\t\t\tfr_proto_pvc_info\t__user *fr_pvc_info;\n 217:\t\t\tx25_hdlc_proto\t\t__user *x25;\n 218:\t\n 219:\t\t\t/* interface settings */\n 220:\t\t\tsync_serial_settings\t__user *sync;\n 221:\t\t\tte1_settings\t\t__user *te1;\n 222:\t\t} ifs_ifsu;\n 223:\t};\n 224:\t\n 225:\t/*\n 226:\t * Interface request structure used for socket\n 227:\t * ioctl's. All interface ioctl's must have parameter\n 228:\t * definitions which begin with ifr_name. The\n 229:\t * remainder may be interface specific.\n 230:\t */\n"
} |
| 41/3 | 2026/09/21 17:09 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 24617 output: 18 thoughts: 18 Thoughts: Here's my understanding of the situation, presented from my perspective as an expert: **Investigating the `struct ifmap`** Okay, so the prompt directs me to examine `struct ifmap`. My initial thought is to immediately dive into its definition. I'll need to know its purpose, its members, and the overall context in which it's used. Based on that information, I'll be able to infer its relationship to other structures and functionality within this system. I'll be looking for hints about its role in mapping something—perhaps interfaces, memory regions, or some other resource. I'm eager to ascertain the specific "if" being mapped and the "map" that describes the process. |
| 42/3 | 2026/09/21 17:09 | tool | grepper |
0mArgs:{
"Expression": "struct ifmap \\{"
}Results: {
"Output": "include/uapi/linux/if.h=178=enum {\n--\ninclude/uapi/linux/if.h-195-#if __UAPI_DEF_IF_IFMAP\ninclude/uapi/linux/if.h:196:struct ifmap {\ninclude/uapi/linux/if.h-197-\tunsigned long mem_start;\n"
} |
| 43/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 24904 output: 21 thoughts: 188 Thoughts: **Analyzing Potential Size Issues in Network Interface Structure** Okay, let's break this down. I'm looking at this `struct ifmap` definition: `unsigned long mem_start; unsigned long mem_end; unsigned short base_addr; unsigned char irq; unsigned char dma; unsigned char port;`. On a 64-bit architecture, that's what I'd expect. Let's do the math on the size: `mem_start` is 8 bytes, `mem_end` is 8 bytes, `base_addr` is 2, `irq` is 1, `dma` is 1, and `port` is 1. That leaves 3 bytes of padding to get to a multiple of 4. So, the total size of `struct ifmap` is 24 bytes. That's a bit larger than I initially anticipated, but expected with the `unsigned long` elements. Hmm, comparing that with `struct sockaddr` which is only 16 bytes is interesting. Now, where did I see this used? Ah yes, in `qrtr_ioctl`. I remember seeing this line: `get_user_ifreq(&ifr, NULL, argp);`. *That* looks potentially significant. How does `get_user_ifreq` work? The implications here could impact how interfaces are being handled. Best to go and look it up in `net/socket.c` to be sure. Time to go dig into that code! |
| 44/3 | 2026/09/21 17:10 | tool | grepper |
0mArgs:{
"Expression": "int get_user_ifreq"
}Results: {
"Output": "include/linux/netdevice.h=4367=static inline bool is_socket_ioctl_cmd(unsigned int cmd)\n--\ninclude/linux/netdevice.h-4370-}\ninclude/linux/netdevice.h:4371:int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg);\ninclude/linux/netdevice.h-4372-int put_user_ifreq(struct ifreq *ifr, void __user *arg);\n--\nnet/socket.c=3439=void socket_seq_show(struct seq_file *seq)\n--\nnet/socket.c-3454- */\nnet/socket.c:3455:int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg)\nnet/socket.c-3456-{\n"
} |
| 45/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 25665 output: 34 thoughts: 19 Thoughts: Here's a first-person summary, tailored for an expert audience, as requested: **Diving into the Socket Implementation** Okay, time to get my hands dirty. I want to delve into the `net/socket.c` source code, specifically around line 3455. This usually indicates a critical point in the socket lifecycle, likely related to connection management, data transfer, or possibly an edge-case handler. I'm hoping to understand a specific optimization or debug a potential bottleneck, but first, I need the context around that line. Let's see what interesting tidbits the code holds. |
| 46/3 | 2026/09/21 17:10 | tool | read-file |
0mArgs:{
"File": "net/socket.c",
"FirstLine": 3455,
"LineCount": 35
}Results: {
"Contents": "3455:\tint get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg)\n3456:\t{\n3457:\t\tif (in_compat_syscall()) {\n3458:\t\t\tstruct compat_ifreq *ifr32 = (struct compat_ifreq *)ifr;\n3459:\t\n3460:\t\t\tmemset(ifr, 0, sizeof(*ifr));\n3461:\t\t\tif (copy_from_user(ifr32, arg, sizeof(*ifr32)))\n3462:\t\t\t\treturn -EFAULT;\n3463:\t\n3464:\t\t\tif (ifrdata)\n3465:\t\t\t\t*ifrdata = compat_ptr(ifr32-\u003eifr_data);\n3466:\t\n3467:\t\t\treturn 0;\n3468:\t\t}\n3469:\t\n3470:\t\tif (copy_from_user(ifr, arg, sizeof(*ifr)))\n3471:\t\t\treturn -EFAULT;\n3472:\t\n3473:\t\tif (ifrdata)\n3474:\t\t\t*ifrdata = ifr-\u003eifr_data;\n3475:\t\n3476:\t\treturn 0;\n3477:\t}\n3478:\tEXPORT_SYMBOL(get_user_ifreq);\n3479:\t\n3480:\tint put_user_ifreq(struct ifreq *ifr, void __user *arg)\n3481:\t{\n3482:\t\tsize_t size = sizeof(*ifr);\n3483:\t\n3484:\t\tif (in_compat_syscall())\n3485:\t\t\tsize = sizeof(struct compat_ifreq);\n3486:\t\n3487:\t\tif (copy_to_user(arg, ifr, size))\n3488:\t\t\treturn -EFAULT;\n3489:\t\n"
} |
| 47/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26344 output: 34 thoughts: 643 Thoughts: **Analyzing the Potential Vulnerability in `get_user_ifreq` and Subsequent Code** Okay, let's break this down. First, I'm examining the `get_user_ifreq` function. It looks like it handles copying user-provided data into an `ifr` structure, with slightly different behavior based on whether it's a "compat" syscall. The important part is that `get_user_ifreq` *does* initialize all the bytes of `ifr`. That's good. However, then things get interesting. After the data is copied, there's this `memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr))` call. This zeroes out a chunk, effectively wiping out the contents of `ifr.ifr_addr`, which is of type `struct sockaddr`. Then, it proceeds to initialize a `struct sockaddr_qrtr` within that zeroed-out memory via `sq->sq_family = ...`, `sq->sq_node = ...`, and `sq->sq_port = ...`. Now, here's where the potential problem lies. The hole or padding in `struct sockaddr_qrtr` (specifically the bytes between `sq_family` and `sq_node`, and any tail padding in `ifr.ifr_addr`) *will* be zeroed by that `memset`. This is the *patched* behavior. Before the patch, the code was doing `*sq = ipc->us;`. This previous assignment, `*sq = ipc->us;`, is where things are fuzzy. Specifically, if `ipc->us` wasn't zero-initialized, or if the write only wrote `sizeof(struct sockaddr_qrtr)` (12 bytes), there's a good chance that uninitialized bytes could have been written into `ifr.ifr_addr`, in bytes 12-15 or the padding region. So, the key question is: what was the *intended* behavior? The commit author likely had a reason for making this change. I need to find the commit message, look at similar commits, or examine the code history in `net/qrtr/af_qrtr.c` to understand the rationale. My next step is to examine the initialization of `ipc->us` and `ipc->peer` within `net/qrtr/af_qrtr.c` for some clues. |
| 48/3 | 2026/09/21 17:10 | tool | grepper |
0mArgs:{
"Expression": "ipc-\u003eus",
"PathPrefix": "net/qrtr/af_qrtr.c"
}Results: {
"Output": "net/qrtr/af_qrtr.c=744=static void qrtr_port_remove(struct qrtr_sock *ipc)\n--\nnet/qrtr/af_qrtr.c-747-\tstruct sk_buff *skb;\nnet/qrtr/af_qrtr.c:748:\tint port = ipc-\u003eus.sq_port;\nnet/qrtr/af_qrtr.c-749-\tstruct sockaddr_qrtr to;\n--\nnet/qrtr/af_qrtr.c-757-\t\tpkt-\u003ecmd = cpu_to_le32(QRTR_TYPE_DEL_CLIENT);\nnet/qrtr/af_qrtr.c:758:\t\tpkt-\u003eclient.node = cpu_to_le32(ipc-\u003eus.sq_node);\nnet/qrtr/af_qrtr.c:759:\t\tpkt-\u003eclient.port = cpu_to_le32(ipc-\u003eus.sq_port);\nnet/qrtr/af_qrtr.c-760-\nnet/qrtr/af_qrtr.c-761-\t\tskb_set_owner_w(skb, \u0026ipc-\u003esk);\nnet/qrtr/af_qrtr.c:762:\t\tqrtr_bcast_enqueue(NULL, skb, QRTR_TYPE_DEL_CLIENT, \u0026ipc-\u003eus,\nnet/qrtr/af_qrtr.c-763-\t\t\t\t \u0026to);\n--\nnet/qrtr/af_qrtr.c=833=static int __qrtr_bind(struct socket *sock,\n--\nnet/qrtr/af_qrtr.c-841-\t/* rebinding ok */\nnet/qrtr/af_qrtr.c:842:\tif (!zapped \u0026\u0026 addr-\u003esq_port == ipc-\u003eus.sq_port)\nnet/qrtr/af_qrtr.c-843-\t\treturn 0;\n--\nnet/qrtr/af_qrtr.c-852-\t\tqrtr_port_remove(ipc);\nnet/qrtr/af_qrtr.c:853:\tipc-\u003eus.sq_port = port;\nnet/qrtr/af_qrtr.c-854-\n--\nnet/qrtr/af_qrtr.c=881=static int qrtr_bind(struct socket *sock, struct sockaddr_unsized *saddr, int len)\n--\nnet/qrtr/af_qrtr.c-890-\nnet/qrtr/af_qrtr.c:891:\tif (addr-\u003esq_node != ipc-\u003eus.sq_node)\nnet/qrtr/af_qrtr.c-892-\t\treturn -EINVAL;\n--\nnet/qrtr/af_qrtr.c=957=static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)\n--\nnet/qrtr/af_qrtr.c-1009-\t\tenqueue_fn = qrtr_bcast_enqueue;\nnet/qrtr/af_qrtr.c:1010:\t} else if (addr-\u003esq_node == ipc-\u003eus.sq_node) {\nnet/qrtr/af_qrtr.c-1011-\t\tenqueue_fn = qrtr_local_enqueue;\n--\nnet/qrtr/af_qrtr.c-1036-\nnet/qrtr/af_qrtr.c:1037:\tif (ipc-\u003eus.sq_port == QRTR_PORT_CTRL) {\nnet/qrtr/af_qrtr.c-1038-\t\tif (len \u003c 4) {\n--\nnet/qrtr/af_qrtr.c-1048-\ttype = le32_to_cpu(qrtr_type);\nnet/qrtr/af_qrtr.c:1049:\trc = enqueue_fn(node, skb, type, \u0026ipc-\u003eus, addr);\nnet/qrtr/af_qrtr.c-1050-\tif (rc \u003e= 0)\n--\nnet/qrtr/af_qrtr.c=1177=static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n--\nnet/qrtr/af_qrtr.c-1193-\t} else {\nnet/qrtr/af_qrtr.c:1194:\t\tqaddr.sq_node = ipc-\u003eus.sq_node;\nnet/qrtr/af_qrtr.c:1195:\t\tqaddr.sq_port = ipc-\u003eus.sq_port;\nnet/qrtr/af_qrtr.c-1196-\t}\n--\nnet/qrtr/af_qrtr.c=1206=static int qrtr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)\n--\nnet/qrtr/af_qrtr.c-1239-\t\tsq = (struct sockaddr_qrtr *)\u0026ifr.ifr_addr;\nnet/qrtr/af_qrtr.c:1240:\t\tsq-\u003esq_family = ipc-\u003eus.sq_family;\nnet/qrtr/af_qrtr.c:1241:\t\tsq-\u003esq_node = ipc-\u003eus.sq_node;\nnet/qrtr/af_qrtr.c:1242:\t\tsq-\u003esq_port = ipc-\u003eus.sq_port;\nnet/qrtr/af_qrtr.c-1243-\t\tif (put_user_ifreq(\u0026ifr, argp)) {\n--\nnet/qrtr/af_qrtr.c=1324=static int qrtr_create(struct net *net, struct socket *sock,\n--\nnet/qrtr/af_qrtr.c-1350-\tipc = qrtr_sk(sk);\nnet/qrtr/af_qrtr.c:1351:\tipc-\u003eus.sq_family = AF_QIPCRTR;\nnet/qrtr/af_qrtr.c:1352:\tipc-\u003eus.sq_node = qrtr_local_nid;\nnet/qrtr/af_qrtr.c:1353:\tipc-\u003eus.sq_port = 0;\nnet/qrtr/af_qrtr.c-1354-\n"
} |
| 49/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29078 output: 40 thoughts: 34 Thoughts: Here's a summary of my thought process, as requested: **Diving into `qrtr_create`** Okay, so I'm digging into this `qrtr_create` function. I need to get a better grasp of how it works within the broader QRTR network. Right now, I'm specifically thinking about what's happening around line 1350 of `net/qrtr/af_qrtr.c`. That should give me a good entry point to understand a crucial aspect of its implementation. Let's see what interesting things are happening there. |
| 50/3 | 2026/09/21 17:10 | tool | read-file |
0mArgs:{
"File": "net/qrtr/af_qrtr.c",
"FirstLine": 1335,
"LineCount": 40
}Results: {
"Contents": "1335:\t\t * service only operates in init_net. Confine the family to init_net so\n1336:\t\t * a socket in another namespace cannot reach the global control plane.\n1337:\t\t */\n1338:\t\tif (!net_eq(net, \u0026init_net))\n1339:\t\t\treturn -EAFNOSUPPORT;\n1340:\t\n1341:\t\tsk = sk_alloc(net, AF_QIPCRTR, GFP_KERNEL, \u0026qrtr_proto, kern);\n1342:\t\tif (!sk)\n1343:\t\t\treturn -ENOMEM;\n1344:\t\n1345:\t\tsock_set_flag(sk, SOCK_ZAPPED);\n1346:\t\n1347:\t\tsock_init_data(sock, sk);\n1348:\t\tsock-\u003eops = \u0026qrtr_proto_ops;\n1349:\t\n1350:\t\tipc = qrtr_sk(sk);\n1351:\t\tipc-\u003eus.sq_family = AF_QIPCRTR;\n1352:\t\tipc-\u003eus.sq_node = qrtr_local_nid;\n1353:\t\tipc-\u003eus.sq_port = 0;\n1354:\t\n1355:\t\treturn 0;\n1356:\t}\n1357:\t\n1358:\tstatic const struct net_proto_family qrtr_family = {\n1359:\t\t.owner\t= THIS_MODULE,\n1360:\t\t.family\t= AF_QIPCRTR,\n1361:\t\t.create\t= qrtr_create,\n1362:\t};\n1363:\t\n1364:\tstatic int __init qrtr_proto_init(void)\n1365:\t{\n1366:\t\tint rc;\n1367:\t\n1368:\t\trc = proto_register(\u0026qrtr_proto, 1);\n1369:\t\tif (rc)\n1370:\t\t\treturn rc;\n1371:\t\n1372:\t\trc = sock_register(\u0026qrtr_family);\n1373:\t\tif (rc)\n1374:\t\t\tgoto err_proto;\n"
} |
| 51/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 29850 output: 18 thoughts: 94 Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue: **Investigating `sk_alloc`'s Memory Initialization** Alright, let's dive into this `sk_alloc` call – specifically, `sk_alloc(net, AF_QIPCRTR, GFP_KERNEL, &qrtr_proto, kern)`. I'm curious about the memory initialization. Does `sk_alloc` perform a zeroing operation? That's always a critical consideration, especially in networking contexts where stale data can lead to security vulnerabilities or unexpected behavior. I know `sk_alloc` itself calls `sk_prot_alloc`. Right, and `sk_prot_alloc`… aha, it uses `kmem_cache_alloc` under the hood. Now, `kmem_cache_alloc` can be used directly or through `kzalloc`. So, does it use the regular `kmem_cache_alloc` or the one that zeros memory (`kzalloc`)? I need to double-check `sk_alloc` itself to be completely certain. I can’t rely on assumptions here. Gotta be precise. |
| 52/3 | 2026/09/21 17:10 | tool | grepper |
0mArgs:{
"Expression": "sk_alloc\\("
}Results: {
"Output": "\nFull output is too long, showing 500 out of 716 lines.\nUse more precise expression if possible.\n\ncrypto/af_alg.c=464=int af_alg_accept(struct sock *sk, struct socket *newsock,\n--\ncrypto/af_alg.c-479-\ncrypto/af_alg.c:480:\tsk2 = sk_alloc(sock_net(sk), PF_ALG, GFP_KERNEL, \u0026alg_proto, arg-\u003ekern);\ncrypto/af_alg.c-481-\terr = -ENOMEM;\n--\ncrypto/af_alg.c=559=static int alg_create(struct net *net, struct socket *sock, int protocol,\n--\ncrypto/af_alg.c-573-\terr = -ENOMEM;\ncrypto/af_alg.c:574:\tsk = sk_alloc(net, PF_ALG, GFP_KERNEL, \u0026alg_proto, kern);\ncrypto/af_alg.c-575-\tif (!sk)\n--\ndrivers/dma/bestcomm/ata.c=54=bcom_ata_init(int queue_len, int maxbufsize)\n--\ndrivers/dma/bestcomm/ata.c-62-\ndrivers/dma/bestcomm/ata.c:63:\ttsk = bcom_task_alloc(queue_len, sizeof(struct bcom_ata_bd), 0);\ndrivers/dma/bestcomm/ata.c-64-\tif (!tsk)\n--\ndrivers/dma/bestcomm/bestcomm.c=46=struct bcom_task *\ndrivers/dma/bestcomm/bestcomm.c:47:bcom_task_alloc(int bd_count, int bd_size, int priv_size)\ndrivers/dma/bestcomm/bestcomm.c-48-{\n--\ndrivers/dma/bestcomm/fec.c=81=bcom_fec_rx_init(int queue_len, phys_addr_t fifo, int maxbufsize)\n--\ndrivers/dma/bestcomm/fec.c-85-\ndrivers/dma/bestcomm/fec.c:86:\ttsk = bcom_task_alloc(queue_len, sizeof(struct bcom_fec_bd),\ndrivers/dma/bestcomm/fec.c-87-\t\t\t\tsizeof(struct bcom_fec_priv));\n--\ndrivers/dma/bestcomm/fec.c=183=bcom_fec_tx_init(int queue_len, phys_addr_t fifo)\n--\ndrivers/dma/bestcomm/fec.c-187-\ndrivers/dma/bestcomm/fec.c:188:\ttsk = bcom_task_alloc(queue_len, sizeof(struct bcom_fec_bd),\ndrivers/dma/bestcomm/fec.c-189-\t\t\t\tsizeof(struct bcom_fec_priv));\n--\ndrivers/dma/bestcomm/gen_bd.c=85=bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo,\n--\ndrivers/dma/bestcomm/gen_bd.c-90-\ndrivers/dma/bestcomm/gen_bd.c:91:\ttsk = bcom_task_alloc(queue_len, sizeof(struct bcom_gen_bd),\ndrivers/dma/bestcomm/gen_bd.c-92-\t\t\tsizeof(struct bcom_gen_bd_priv));\n--\ndrivers/dma/bestcomm/gen_bd.c=170=bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo,\n--\ndrivers/dma/bestcomm/gen_bd.c-175-\ndrivers/dma/bestcomm/gen_bd.c:176:\ttsk = bcom_task_alloc(queue_len, sizeof(struct bcom_gen_bd),\ndrivers/dma/bestcomm/gen_bd.c-177-\t\t\tsizeof(struct bcom_gen_bd_priv));\n--\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c=258=static inline struct exynos_drm_ipp_task *\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c:259:\t\t\texynos_drm_ipp_task_alloc(struct exynos_drm_ipp *ipp)\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c-260-{\n--\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c=872=int exynos_drm_ipp_commit_ioctl(struct drm_device *dev, void *data,\n--\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c-891-\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c:892:\ttask = exynos_drm_ipp_task_alloc(ipp);\ndrivers/gpu/drm/exynos/exynos_drm_ipp.c-893-\tif (!task)\n--\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c=137=static int nfp_release_mask_id(struct nfp_app *app, u8 mask_id)\n--\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c-160-\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c:161:static int nfp_mask_alloc(struct nfp_app *app, u8 *mask_id)\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c-162-{\n--\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c=207=nfp_add_mask_table(struct nfp_app *app, char *mask_data, u32 mask_len)\n--\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c-213-\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c:214:\tif (nfp_mask_alloc(app, \u0026mask_id))\ndrivers/net/ethernet/netronome/nfp/flower/metadata.c-215-\t\treturn -ENOENT;\n--\ndrivers/net/ppp/pppoe.c=511=static int pppoe_create(struct net *net, struct socket *sock, int kern)\n--\ndrivers/net/ppp/pppoe.c-514-\ndrivers/net/ppp/pppoe.c:515:\tsk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, \u0026pppoe_sk_proto, kern);\ndrivers/net/ppp/pppoe.c-516-\tif (!sk)\n--\ndrivers/net/ppp/pptp.c=542=static int pptp_create(struct net *net, struct socket *sock, int kern)\n--\ndrivers/net/ppp/pptp.c-548-\ndrivers/net/ppp/pptp.c:549:\tsk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, \u0026pptp_sk_proto, kern);\ndrivers/net/ppp/pptp.c-550-\tif (!sk)\n--\ndrivers/net/tap.c=446=static int tap_open(struct inode *inode, struct file *file)\n--\ndrivers/net/tap.c-458-\terr = -ENOMEM;\ndrivers/net/tap.c:459:\tq = (struct tap_queue *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL,\ndrivers/net/tap.c-460-\t\t\t\t\t \u0026tap_proto, 0);\n--\ndrivers/net/tun.c=3544=static int tun_chr_open(struct inode *inode, struct file * file)\n--\ndrivers/net/tun.c-3548-\ndrivers/net/tun.c:3549:\ttfile = (struct tun_file *)sk_alloc(net, AF_UNSPEC, GFP_KERNEL,\ndrivers/net/tun.c-3550-\t\t\t\t\t \u0026tun_proto, 0);\n--\ndrivers/s390/block/dasd.c=240=static int dasd_state_known_to_basic(struct dasd_device *device)\n--\ndrivers/s390/block/dasd.c-246-\tif (block) {\ndrivers/s390/block/dasd.c:247:\t\trc = dasd_gendisk_alloc(block);\ndrivers/s390/block/dasd.c-248-\t\tif (rc)\n--\ndrivers/s390/block/dasd_genhd.c=40=static int dasd_name_format(char *prefix, int index, char *buf, int buflen)\n--\ndrivers/s390/block/dasd_genhd.c-66- */\ndrivers/s390/block/dasd_genhd.c:67:int dasd_gendisk_alloc(struct dasd_block *block)\ndrivers/s390/block/dasd_genhd.c-68-{\n--\ndrivers/s390/block/dasd_int.h=1075=void dasd_gendisk_exit(void);\ndrivers/s390/block/dasd_int.h:1076:int dasd_gendisk_alloc(struct dasd_block *);\ndrivers/s390/block/dasd_int.h-1077-void dasd_gendisk_free(struct dasd_block *);\n--\ndrivers/xen/pvcalls-front.c=825=int pvcalls_front_accept(struct socket *sock, struct socket *newsock,\n--\ndrivers/xen/pvcalls-front.c-954-\tmap2-\u003esock = newsock;\ndrivers/xen/pvcalls-front.c:955:\tnewsock-\u003esk = sk_alloc(sock_net(sock-\u003esk), PF_INET, GFP_KERNEL, \u0026pvcalls_proto, false);\ndrivers/xen/pvcalls-front.c-956-\tif (!newsock-\u003esk) {\n--\nfs/xfs/xfs_dquot.c=342=STATIC int\nfs/xfs/xfs_dquot.c:343:xfs_dquot_disk_alloc(\nfs/xfs/xfs_dquot.c-344-\tstruct xfs_dquot\t*dqp,\n--\nfs/xfs/xfs_dquot.c=703=xfs_qm_dqread(\n--\nfs/xfs/xfs_dquot.c-719-\tif (error == -ENOENT \u0026\u0026 can_alloc)\nfs/xfs/xfs_dquot.c:720:\t\terror = xfs_dquot_disk_alloc(dqp, \u0026bp);\nfs/xfs/xfs_dquot.c-721-\tif (error)\n--\ninclude/linux/cgroup.h=897=static inline void cgroup_account_cputime_field(struct task_struct *task,\n--\ninclude/linux/cgroup.h-908-\ninclude/linux/cgroup.h:909:void cgroup_sk_alloc(struct sock_cgroup_data *skcd);\ninclude/linux/cgroup.h-910-void cgroup_sk_clone(struct sock_cgroup_data *skcd);\n--\ninclude/linux/cgroup.h=913=static inline struct cgroup *sock_cgroup_ptr(struct sock_cgroup_data *skcd)\n--\ninclude/linux/cgroup.h-919-\ninclude/linux/cgroup.h:920:static inline void cgroup_sk_alloc(struct sock_cgroup_data *skcd) {}\ninclude/linux/cgroup.h-921-static inline void cgroup_sk_clone(struct sock_cgroup_data *skcd) {}\n--\ninclude/linux/fsl/bestcomm/bestcomm_priv.h=91=struct bcom_task_header {\n--\ninclude/linux/fsl/bestcomm/bestcomm_priv.h-235-\ninclude/linux/fsl/bestcomm/bestcomm_priv.h:236:extern struct bcom_task *bcom_task_alloc(int bd_count, int bd_size, int priv_size);\ninclude/linux/fsl/bestcomm/bestcomm_priv.h-237-extern void bcom_task_free(struct bcom_task *tsk);\n--\ninclude/linux/memcontrol.h=1633=extern struct static_key_false memcg_sockets_enabled_key;\n--\ninclude/linux/memcontrol.h-1635-\ninclude/linux/memcontrol.h:1636:void mem_cgroup_sk_alloc(struct sock *sk);\ninclude/linux/memcontrol.h-1637-void mem_cgroup_sk_free(struct sock *sk);\n--\ninclude/linux/memcontrol.h=1683=static inline int shrinker_id(struct shrinker *shrinker)\n--\ninclude/linux/memcontrol.h-1689-\ninclude/linux/memcontrol.h:1690:static inline void mem_cgroup_sk_alloc(struct sock *sk)\ninclude/linux/memcontrol.h-1691-{\n--\ninclude/linux/security.h=497=int security_file_truncate(struct file *file);\ninclude/linux/security.h:498:int security_task_alloc(struct task_struct *task, u64 clone_flags);\ninclude/linux/security.h-499-void security_task_free(struct task_struct *task);\n--\ninclude/linux/security.h=1236=static inline int security_file_truncate(struct file *file)\n--\ninclude/linux/security.h-1240-\ninclude/linux/security.h:1241:static inline int security_task_alloc(struct task_struct *task,\ninclude/linux/security.h-1242-\t\t\t\t u64 clone_flags)\n--\ninclude/linux/security.h=1687=int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid);\ninclude/linux/security.h:1688:int security_sk_alloc(struct sock *sk, int family, gfp_t priority);\ninclude/linux/security.h-1689-void security_sk_free(struct sock *sk);\n--\ninclude/linux/security.h=1837=static inline int security_socket_getpeersec_dgram(struct socket *sock, struct sk_buff *skb, u32 *secid)\n--\ninclude/linux/security.h-1841-\ninclude/linux/security.h:1842:static inline int security_sk_alloc(struct sock *sk, int family, gfp_t priority)\ninclude/linux/security.h-1843-{\n--\ninclude/linux/smp.h=234=static inline int get_boot_cpu_id(void)\n--\ninclude/linux/smp.h-241-#if defined(CONFIG_PREEMPTION) \u0026\u0026 defined(CONFIG_SMP)\ninclude/linux/smp.h:242:int smp_task_ipi_mask_alloc(struct task_struct *task);\ninclude/linux/smp.h-243-void smp_task_ipi_mask_free(struct task_struct *task);\ninclude/linux/smp.h-244-#else\ninclude/linux/smp.h:245:static inline int smp_task_ipi_mask_alloc(struct task_struct *task)\ninclude/linux/smp.h-246-{\n--\ninclude/net/inet_sock.h=391=static inline unsigned int __inet_ehashfn(const __be32 laddr,\n--\ninclude/net/inet_sock.h-402-\ninclude/net/inet_sock.h:403:struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,\ninclude/net/inet_sock.h-404-\t\t\t\t struct sock *sk_listener,\n--\ninclude/net/inet_timewait_sock.h=104=void inet_twsk_bind_unhash(struct inet_timewait_sock *tw,\n--\ninclude/net/inet_timewait_sock.h-106-\ninclude/net/inet_timewait_sock.h:107:struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,\ninclude/net/inet_timewait_sock.h-108-\t\t\t\t\t struct inet_timewait_death_row *dr,\n--\ninclude/net/llc_conn.h=88=static __inline__ char llc_backlog_type(struct sk_buff *skb)\n--\ninclude/net/llc_conn.h-92-\ninclude/net/llc_conn.h:93:struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority,\ninclude/net/llc_conn.h-94-\t\t\t struct proto *prot, int kern);\n--\ninclude/net/mptcp.h=216=int mptcp_subflow_init_cookie_req(struct request_sock *req,\n--\ninclude/net/mptcp.h-218-\t\t\t\t struct sk_buff *skb);\ninclude/net/mptcp.h:219:struct request_sock *mptcp_subflow_reqsk_alloc(const struct request_sock_ops *ops,\ninclude/net/mptcp.h-220-\t\t\t\t\t struct sock *sk_listener,\n--\ninclude/net/mptcp.h=294=static inline int mptcp_subflow_init_cookie_req(struct request_sock *req,\n--\ninclude/net/mptcp.h-300-\ninclude/net/mptcp.h:301:static inline struct request_sock *mptcp_subflow_reqsk_alloc(const struct request_sock_ops *ops,\ninclude/net/mptcp.h-302-\t\t\t\t\t\t\t struct sock *sk_listener,\n--\ninclude/net/sock.h=1831=static inline bool sock_allow_reclassification(const struct sock *csk)\n--\ninclude/net/sock.h-1838-\ninclude/net/sock.h:1839:struct sock *sk_alloc(struct net *net, int family, gfp_t priority,\ninclude/net/sock.h-1840-\t\t struct proto *prot, int kern);\n--\ninclude/net/tcp.h=593=struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb);\ninclude/net/tcp.h:594:struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops,\ninclude/net/tcp.h-595-\t\t\t\t\t struct sock *sk, struct sk_buff *skb,\n--\nkernel/cgroup/cgroup.c=7468=int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v)\n--\nkernel/cgroup/cgroup.c-7493-\nkernel/cgroup/cgroup.c:7494:void cgroup_sk_alloc(struct sock_cgroup_data *skcd)\nkernel/cgroup/cgroup.c-7495-{\n--\nkernel/fork.c=915=static struct task_struct *dup_task_struct(struct task_struct *orig, int node)\n--\nkernel/fork.c-938-\nkernel/fork.c:939:\terr = smp_task_ipi_mask_alloc(tsk);\nkernel/fork.c-940-\tif (err)\n--\nkernel/fork.c=2012=__latent_entropy struct task_struct *copy_process(\n--\nkernel/fork.c-2291-\tshm_init_task(p);\nkernel/fork.c:2292:\tretval = security_task_alloc(p, clone_flags);\nkernel/fork.c-2293-\tif (retval)\n--\nkernel/smp.c=836=static DEFINE_STATIC_KEY_FALSE(ipi_mask_inlined);\n--\nkernel/smp.c-839-\nkernel/smp.c:840:int smp_task_ipi_mask_alloc(struct task_struct *task)\nkernel/smp.c-841-{\n--\nmm/memcontrol-v1.c=1965=static int memcg_update_tcp_max(struct mem_cgroup *memcg, unsigned long max)\n--\nmm/memcontrol-v1.c-1978-\t\t * update. This is what guarantees that the socket activation\nmm/memcontrol-v1.c:1979:\t\t * function is the last one to run. See mem_cgroup_sk_alloc()\nmm/memcontrol-v1.c-1980-\t\t * for details, and note that we don't mark any socket as\n--\nmm/memcontrol-v1.c-1987-\t\t *\nmm/memcontrol-v1.c:1988:\t\t * We never race with the readers in mem_cgroup_sk_alloc(),\nmm/memcontrol-v1.c-1989-\t\t * because when this value change, the code to process it is not\n--\nmm/memcontrol.c=5563=EXPORT_SYMBOL(memcg_sockets_enabled_key);\nmm/memcontrol.c-5564-\nmm/memcontrol.c:5565:void mem_cgroup_sk_alloc(struct sock *sk)\nmm/memcontrol.c-5566-{\n--\nnet/atm/common.c=139=int vcc_create(struct net *net, struct socket *sock, int protocol, int family, int kern)\n--\nnet/atm/common.c-146-\t\treturn -EINVAL;\nnet/atm/common.c:147:\tsk = sk_alloc(net, family, GFP_KERNEL, \u0026vcc_proto, kern);\nnet/atm/common.c-148-\tif (!sk)\n--\nnet/bluetooth/af_bluetooth.c=143=struct sock *bt_sock_alloc(struct net *net, struct socket *sock,\n--\nnet/bluetooth/af_bluetooth.c-147-\nnet/bluetooth/af_bluetooth.c:148:\tsk = sk_alloc(net, PF_BLUETOOTH, prio, prot, kern);\nnet/bluetooth/af_bluetooth.c-149-\tif (!sk)\n--\nnet/bpf/test_run.c=1035=int bpf_prog_test_run_skb(struct bpf_prog *prog, const union bpf_attr *kattr,\n--\nnet/bpf/test_run.c-1105-\nnet/bpf/test_run.c:1106:\tsk = sk_alloc(net, AF_UNSPEC, GFP_USER, \u0026bpf_dummy_proto, 1);\nnet/bpf/test_run.c-1107-\tif (!sk) {\n--\nnet/can/af_can.c=114=static int can_create(struct net *net, struct socket *sock, int protocol,\n--\nnet/can/af_can.c-157-\nnet/can/af_can.c:158:\tsk = sk_alloc(net, PF_CAN, GFP_KERNEL, cp-\u003eprot, kern);\nnet/can/af_can.c-159-\tif (!sk) {\n--\nnet/core/filter.c=12505=__bpf_kfunc int bpf_sk_assign_tcp_reqsk(struct __sk_buff *s, struct sock *sk,\n--\nnet/core/filter.c-12569-\nnet/core/filter.c:12570:\treq = inet_reqsk_alloc(ops, sk, false);\nnet/core/filter.c-12571-\tif (!req)\n--\nnet/core/sock.c=2238=static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,\n--\nnet/core/sock.c-2254-\tif (sk != NULL) {\nnet/core/sock.c:2255:\t\tif (security_sk_alloc(sk, family, priority))\nnet/core/sock.c-2256-\t\t\tgoto out_free;\n--\nnet/core/sock.c=2274=static void sk_prot_free(struct proto *prot, struct sock *sk)\n--\nnet/core/sock.c-2302- */\nnet/core/sock.c:2303:struct sock *sk_alloc(struct net *net, int family, gfp_t priority,\nnet/core/sock.c-2304-\t\t struct proto *prot, int kern)\n--\nnet/core/sock.c-2335-\nnet/core/sock.c:2336:\t\tmem_cgroup_sk_alloc(sk);\nnet/core/sock.c:2337:\t\tcgroup_sk_alloc(\u0026sk-\u003esk_cgrp_data);\nnet/core/sock.c-2338-\t\tsock_update_classid(\u0026sk-\u003esk_cgrp_data);\n--\nnet/ieee802154/socket.c=1016=static int ieee802154_create(struct net *net, struct socket *sock,\n--\nnet/ieee802154/socket.c-1044-\trc = -ENOMEM;\nnet/ieee802154/socket.c:1045:\tsk = sk_alloc(net, PF_IEEE802154, GFP_KERNEL, proto, kern);\nnet/ieee802154/socket.c-1046-\tif (!sk)\n--\nnet/ipv4/af_inet.c=259=static int inet_create(struct net *net, struct socket *sock, int protocol,\n--\nnet/ipv4/af_inet.c-332-\terr = -ENOMEM;\nnet/ipv4/af_inet.c:333:\tsk = sk_alloc(net, PF_INET, GFP_KERNEL, answer_prot, kern);\nnet/ipv4/af_inet.c-334-\tif (!sk)\n--\nnet/ipv4/af_inet.c=760=void __inet_accept(struct socket *sock, struct socket *newsock, struct sock *newsk)\n--\nnet/ipv4/af_inet.c-762-\tif (mem_cgroup_sockets_enabled) {\nnet/ipv4/af_inet.c:763:\t\tmem_cgroup_sk_alloc(newsk);\nnet/ipv4/af_inet.c-764-\t\t__sk_charge(newsk, GFP_KERNEL);\n--\nnet/ipv4/inet_connection_sock.c=850=reqsk_alloc_noprof(const struct request_sock_ops *ops, struct sock *sk_listener,\n--\nnet/ipv4/inet_connection_sock.c-878-}\nnet/ipv4/inet_connection_sock.c:879:#define reqsk_alloc(...)\talloc_hooks(reqsk_alloc_noprof(__VA_ARGS__))\nnet/ipv4/inet_connection_sock.c-880-\nnet/ipv4/inet_connection_sock.c:881:struct request_sock *inet_reqsk_alloc(const struct request_sock_ops *ops,\nnet/ipv4/inet_connection_sock.c-882-\t\t\t\t struct sock *sk_listener,\n--\nnet/ipv4/inet_connection_sock.c-884-{\nnet/ipv4/inet_connection_sock.c:885:\tstruct request_sock *req = reqsk_alloc(ops, sk_listener,\nnet/ipv4/inet_connection_sock.c-886-\t\t\t\t\t attach_listener);\n--\nnet/ipv4/inet_timewait_sock.c=163=static void tw_timer_handler(struct timer_list *t)\n--\nnet/ipv4/inet_timewait_sock.c-169-\nnet/ipv4/inet_timewait_sock.c:170:struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,\nnet/ipv4/inet_timewait_sock.c-171-\t\t\t\t\t struct inet_timewait_death_row *dr,\n--\nnet/ipv4/syncookies.c=302=struct request_sock *cookie_bpf_check(struct sock *sk, struct sk_buff *skb)\n--\nnet/ipv4/syncookies.c-317-\nnet/ipv4/syncookies.c:318:struct request_sock *cookie_tcp_reqsk_alloc(const struct request_sock_ops *ops,\nnet/ipv4/syncookies.c-319-\t\t\t\t\t struct sock *sk, struct sk_buff *skb,\n--\nnet/ipv4/syncookies.c-327-\tif (sk_is_mptcp(sk))\nnet/ipv4/syncookies.c:328:\t\treq = mptcp_subflow_reqsk_alloc(ops, sk, false);\nnet/ipv4/syncookies.c-329-\telse\nnet/ipv4/syncookies.c:330:\t\treq = inet_reqsk_alloc(ops, sk, false);\nnet/ipv4/syncookies.c-331-\n--\nnet/ipv4/syncookies.c=358=static struct request_sock *cookie_tcp_check(struct net *net, struct sock *sk,\n--\nnet/ipv4/syncookies.c-394-\nnet/ipv4/syncookies.c:395:\treturn cookie_tcp_reqsk_alloc(\u0026tcp_request_sock_ops, sk, skb,\nnet/ipv4/syncookies.c-396-\t\t\t\t \u0026tcp_opt, mss, tsoff);\n--\nnet/ipv4/tcp.c=402=void tcp_md5_destruct_sock(struct sock *sk)\n--\nnet/ipv4/tcp.c-417- * NOTE: A lot of things set to zero explicitly by call to\nnet/ipv4/tcp.c:418: * sk_alloc() so need not be done here.\nnet/ipv4/tcp.c-419- */\n--\nnet/ipv4/tcp_input.c=7621=int tcp_conn_request(struct request_sock_ops *rsk_ops,\n--\nnet/ipv4/tcp_input.c-7661-\nnet/ipv4/tcp_input.c:7662:\treq = inet_reqsk_alloc(rsk_ops, sk, !want_cookie);\nnet/ipv4/tcp_input.c-7663-\tif (!req)\n--\nnet/ipv4/tcp_ipv4.c=2385=static void tcp4_destruct_sock(struct sock *sk)\n--\nnet/ipv4/tcp_ipv4.c-2393-/* NOTE: A lot of things set to zero explicitly by call to\nnet/ipv4/tcp_ipv4.c:2394: * sk_alloc() so need not be done here.\nnet/ipv4/tcp_ipv4.c-2395- */\n--\nnet/ipv4/tcp_minisocks.c=326=void tcp_time_wait(struct sock *sk, int state, int timeo)\n--\nnet/ipv4/tcp_minisocks.c-332-\nnet/ipv4/tcp_minisocks.c:333:\ttw = inet_twsk_alloc(sk, \u0026net-\u003eipv4.tcp_death_row, state);\nnet/ipv4/tcp_minisocks.c-334-\n--\nnet/ipv6/af_inet6.c=105=static int inet6_create(struct net *net, struct socket *sock, int protocol,\n--\nnet/ipv6/af_inet6.c-177-\terr = -ENOBUFS;\nnet/ipv6/af_inet6.c:178:\tsk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot, kern);\nnet/ipv6/af_inet6.c-179-\tif (!sk)\n--\nnet/ipv6/syncookies.c=131=static struct request_sock *cookie_tcp_check(struct net *net, struct sock *sk,\n--\nnet/ipv6/syncookies.c-167-\nnet/ipv6/syncookies.c:168:\treturn cookie_tcp_reqsk_alloc(\u0026tcp6_request_sock_ops, sk, skb,\nnet/ipv6/syncookies.c-169-\t\t\t\t \u0026tcp_opt, mss, tsoff);\n--\nnet/ipv6/tcp_ipv6.c=2066=static void tcp6_destruct_sock(struct sock *sk)\n--\nnet/ipv6/tcp_ipv6.c-2074-/* NOTE: A lot of things set to zero explicitly by call to\nnet/ipv6/tcp_ipv6.c:2075: * sk_alloc() so need not be done here.\nnet/ipv6/tcp_ipv6.c-2076- */\n--\nnet/iucv/af_iucv.c=477=static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio, int kern)\n--\nnet/iucv/af_iucv.c-481-\nnet/iucv/af_iucv.c:482:\tsk = sk_alloc(\u0026init_net, PF_IUCV, prio, \u0026iucv_proto, kern);\nnet/iucv/af_iucv.c-483-\tif (!sk)\n--\nnet/kcm/kcmsock.c=1528=static struct file *kcm_clone(struct socket *osock)\n--\nnet/kcm/kcmsock.c-1541-\nnet/kcm/kcmsock.c:1542:\tnewsk = sk_alloc(sock_net(osock-\u003esk), PF_KCM, GFP_KERNEL,\nnet/kcm/kcmsock.c-1543-\t\t\t \u0026kcm_proto, false);\n--\nnet/kcm/kcmsock.c=1789=static int kcm_create(struct net *net, struct socket *sock,\n--\nnet/kcm/kcmsock.c-1809-\nnet/kcm/kcmsock.c:1810:\tsk = sk_alloc(net, PF_KCM, GFP_KERNEL, \u0026kcm_proto, kern);\nnet/kcm/kcmsock.c-1811-\tif (!sk)\n--\nnet/key/af_key.c=138=static int pfkey_create(struct net *net, struct socket *sock, int protocol,\n--\nnet/key/af_key.c-151-\nnet/key/af_key.c:152:\tsk = sk_alloc(net, PF_KEY, GFP_KERNEL, \u0026key_proto, kern);\nnet/key/af_key.c-153-\tif (sk == NULL)\n--\nnet/l2tp/l2tp_ppp.c=470=static int pppol2tp_create(struct net *net, struct socket *sock, int kern)\n--\nnet/l2tp/l2tp_ppp.c-474-\nnet/l2tp/l2tp_ppp.c:475:\tsk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, \u0026pppol2tp_sk_proto, kern);\nnet/l2tp/l2tp_ppp.c-476-\tif (!sk)\n--\nnet/llc/af_llc.c=166=static int llc_ui_create(struct net *net, struct socket *sock, int protocol,\n--\nnet/llc/af_llc.c-179-\t\trc = -ENOMEM;\nnet/llc/af_llc.c:180:\t\tsk = llc_sk_alloc(net, PF_LLC, GFP_KERNEL, \u0026llc_proto, kern);\nnet/llc/af_llc.c-181-\t\tif (sk) {\n--\nnet/llc/llc_conn.c=753=static struct sock *llc_create_incoming_sock(struct sock *sk,\n--\nnet/llc/llc_conn.c-757-{\nnet/llc/llc_conn.c:758:\tstruct sock *newsk = llc_sk_alloc(sock_net(sk), sk-\u003esk_family, GFP_ATOMIC,\nnet/llc/llc_conn.c-759-\t\t\t\t\t sk-\u003esk_prot, 0);\n--\nnet/llc/llc_conn.c=884=static void llc_sk_init(struct sock *sk)\n--\nnet/llc/llc_conn.c-922- */\nnet/llc/llc_conn.c:923:struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority, struct proto *prot, int kern)\nnet/llc/llc_conn.c-924-{\nnet/llc/llc_conn.c:925:\tstruct sock *sk = sk_alloc(net, family, priority, prot, kern);\nnet/llc/llc_conn.c-926-\n--\nnet/mctp/af_mctp.c=799=static int mctp_pf_create(struct net *net, struct socket *sock,\n--\nnet/mctp/af_mctp.c-819-\nnet/mctp/af_mctp.c:820:\tsk = sk_alloc(net, PF_MCTP, GFP_KERNEL, proto, kern);\nnet/mctp/af_mctp.c-821-\tif (!sk)\n--\nnet/mptcp/subflow.c=732=static void subflow_v6_req_destructor(struct request_sock *req)\n--\nnet/mptcp/subflow.c-738-\nnet/mptcp/subflow.c:739:struct request_sock *mptcp_subflow_reqsk_alloc(const struct request_sock_ops *ops,\nnet/mptcp/subflow.c-740-\t\t\t\t\t struct sock *sk_listener,\n--\nnet/mptcp/subflow.c-749-\nnet/mptcp/subflow.c:750:\treturn inet_reqsk_alloc(ops, sk_listener, attach_listener);\nnet/mptcp/subflow.c-751-}\n--\nnet/netlink/af_netlink.c=619=static int __netlink_create(struct net *net, struct socket *sock,\n--\nnet/netlink/af_netlink.c-626-\nnet/netlink/af_netlink.c:627:\tsk = sk_alloc(net, PF_NETLINK, GFP_KERNEL, \u0026netlink_proto, kern);\nnet/netlink/af_netlink.c-628-\tif (!sk)\n--\nnet/nfc/llcp_sock.c=984=struct sock *nfc_llcp_sock_alloc(struct socket *sock, int type, gfp_t gfp, int kern)\n--\nnet/nfc/llcp_sock.c-988-\nnet/nfc/llcp_sock.c:989:\tsk = sk_alloc(\u0026init_net, PF_NFC, gfp, \u0026llcp_sock_proto, kern);\nnet/nfc/llcp_sock.c-990-\tif (!sk)\n--\nnet/nfc/rawsock.c=334=static int rawsock_create(struct net *net, struct socket *sock,\n--\nnet/nfc/rawsock.c-351-\nnet/nfc/rawsock.c:352:\tsk = sk_alloc(net, PF_NFC, GFP_ATOMIC, nfc_proto-\u003eproto, kern);\nnet/nfc/rawsock.c-353-\tif (!sk)\n--\nnet/openvswitch/flow_table.c=956=void ovs_flow_tbl_remove(struct flow_table *table, struct sw_flow *flow)\n--\nnet/openvswitch/flow_table.c-964-\nnet/openvswitch/flow_table.c:965:static struct sw_flow_mask *mask_alloc(void)\nnet/openvswitch/flow_table.c-966-{\n--\nnet/openvswitch/flow_table.c=1006=static int flow_mask_insert(struct flow_table *tbl, struct sw_flow *flow,\n--\nnet/openvswitch/flow_table.c-1013-\t\t/* Allocate a new mask if none exists. */\nnet/openvswitch/flow_table.c:1014:\t\tmask = mask_alloc();\nnet/openvswitch/flow_table.c-1015-\t\tif (!mask)\n\n"
} |
| 53/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 40642 output: 36 thoughts: 32 Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience: **Diving into `sock.c` for `sk_prot_alloc`** Okay, I'm thinking I need to refresh my memory on the socket protocol allocation process within the kernel. Let's start by digging into `net/core/sock.c`, specifically around line 2238. That area should contain the definition of `sk_prot_alloc`. I need to understand exactly what that function is doing. I'm especially curious about memory allocation and initial setup for a new socket's protocol-specific data structure, which `sk_prot_alloc` is responsible for. It's likely involved in allocating the per-socket protocol state, given the naming. I'll need to see how it interacts with the underlying memory management and how it sets up initial protocol-specific fields. Understanding how this function works is key to tracing how sockets are constructed. |
| 54/3 | 2026/09/21 17:10 | tool | read-file |
0mArgs:{
"File": "net/core/sock.c",
"FirstLine": 2238,
"LineCount": 35
}Results: {
"Contents": "2238:\tstatic struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority,\n2239:\t\t\tint family)\n2240:\t{\n2241:\t\tstruct sock *sk;\n2242:\t\tstruct kmem_cache *slab;\n2243:\t\n2244:\t\tslab = prot-\u003eslab;\n2245:\t\tif (slab != NULL) {\n2246:\t\t\tsk = kmem_cache_alloc(slab, priority \u0026 ~__GFP_ZERO);\n2247:\t\t\tif (!sk)\n2248:\t\t\t\treturn sk;\n2249:\t\t\tif (want_init_on_alloc(priority))\n2250:\t\t\t\tsk_prot_clear_nulls(sk, prot-\u003eobj_size);\n2251:\t\t} else\n2252:\t\t\tsk = kmalloc(prot-\u003eobj_size, priority);\n2253:\t\n2254:\t\tif (sk != NULL) {\n2255:\t\t\tif (security_sk_alloc(sk, family, priority))\n2256:\t\t\t\tgoto out_free;\n2257:\t\n2258:\t\t\tif (!try_module_get(prot-\u003eowner))\n2259:\t\t\t\tgoto out_free_sec;\n2260:\t\t}\n2261:\t\n2262:\t\treturn sk;\n2263:\t\n2264:\tout_free_sec:\n2265:\t\tsecurity_sk_free(sk);\n2266:\tout_free:\n2267:\t\tif (slab != NULL)\n2268:\t\t\tkmem_cache_free(slab, sk);\n2269:\t\telse\n2270:\t\t\tkfree(sk);\n2271:\t\treturn NULL;\n2272:\t}\n"
} |
| 55/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 41385 output: 40 thoughts: 359 Thoughts: **My Analysis of Potential Memory Leak in QRTR Socket Creation**
Okay, so I'm looking at how `qrtr_sock` structures are allocated, and something's bugging me. I see that the code is using either `kmem_cache_alloc(slab, priority & ~__GFP_ZERO)` or `kmalloc(prot->obj_size, priority)`. The critical thing is that `qrtr_proto` *doesn't* explicitly set the `__GFP_ZERO` flag. That immediately raises a red flag. This means the `struct qrtr_sock` itself, or more specifically, the memory *outside* the `struct sock` or within `qrtr_sock` like the `ipc->us` or `ipc->peer` members, might not be initialized after allocation.
Let's dig deeper. Looking at `qrtr_create`, I see that it sets the `ipc->us` member of the `qrtr_sock` struct. Specifically:
```c
ipc = qrtr_sk(sk);
ipc->us.sq_family = AF_QIPCRTR;
ipc->us.sq_node = qrtr_local_nid;
ipc->us.sq_port = 0;
```
`ipc->us` is a `struct sockaddr_qrtr`:
```c
struct sockaddr_qrtr {
__kernel_sa_family_t sq_family;
__u32 sq_node;
__u32 sq_port;
};
```
Here's the problem. Since `sq_family` is two bytes, and `sq_node` is four bytes, there is a two-byte hole in the structure at offset 2..3! Because the initial allocation might *not* be zeroed, this `ipc->us` potentially contains uninitialized bytes in this padding! That's a classic memory leak vulnerability waiting to happen. Information may be left behind that could be exploited.
Now, what about the `ipc->peer` member? I need to check where and how *that* is written to. I should start by examining the `qrtr_connect` function, which is the logical place to look. I'll head over to `net/qrtr/af_qrtr.c` and take a closer look at `qrtr_connect`.
|
| 56/3 | 2026/09/21 17:10 | tool | read-file |
0mArgs:{
"File": "net/qrtr/af_qrtr.c",
"FirstLine": 1145,
"LineCount": 35
}Results: {
"Contents": "1145:\t\n1146:\tstatic int qrtr_connect(struct socket *sock, struct sockaddr_unsized *saddr,\n1147:\t\t\t\tint len, int flags)\n1148:\t{\n1149:\t\tDECLARE_SOCKADDR(struct sockaddr_qrtr *, addr, saddr);\n1150:\t\tstruct qrtr_sock *ipc = qrtr_sk(sock-\u003esk);\n1151:\t\tstruct sock *sk = sock-\u003esk;\n1152:\t\tint rc;\n1153:\t\n1154:\t\tif (len \u003c sizeof(*addr) || addr-\u003esq_family != AF_QIPCRTR)\n1155:\t\t\treturn -EINVAL;\n1156:\t\n1157:\t\tlock_sock(sk);\n1158:\t\n1159:\t\tsk-\u003esk_state = TCP_CLOSE;\n1160:\t\tsock-\u003estate = SS_UNCONNECTED;\n1161:\t\n1162:\t\trc = qrtr_autobind(sock);\n1163:\t\tif (rc) {\n1164:\t\t\trelease_sock(sk);\n1165:\t\t\treturn rc;\n1166:\t\t}\n1167:\t\n1168:\t\tipc-\u003epeer = *addr;\n1169:\t\tsock-\u003estate = SS_CONNECTED;\n1170:\t\tsk-\u003esk_state = TCP_ESTABLISHED;\n1171:\t\n1172:\t\trelease_sock(sk);\n1173:\t\n1174:\t\treturn 0;\n1175:\t}\n1176:\t\n1177:\tstatic int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n1178:\t\t\t\tint peer)\n1179:\t{\n"
} |
| 57/3 | 2026/09/21 17:10 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 42763 output: 28 thoughts: 3887 Thoughts: **Patch Analysis and KMSAN Justification**
Okay, here's my assessment of this patch. My immediate thought is that this is a *good* patch – it's addressing a clear uninitialized memory leak and potential information disclosure issue. Specifically, it seems to be sanitizing data structures that are either copied to user space directly or are used as the basis of data being copied to user space.
My initial reaction is this: the patch looks pretty straightforward. It focuses on initializing `struct sockaddr_qrtr` variables either directly with `{}` to zero them, or, using `memset` on larger structures like `struct ifreq` before copying data into them. This will prevent leakage of kernel stack/heap memory, which is a very important security measure.
The prior version had potential issues where padding bytes within the `sockaddr_qrtr` structure, or even parts of larger structures containing a `sockaddr_qrtr`, wouldn't be explicitly initialized. This meant that whatever random garbage happened to be on the stack or in the heap would get copied to user space. It is a potential information leak. This patch aims to explicitly initialize the entire structures or zero out what is required, which ensures the leak is prevented.
But, a more important question is, does this mean KMSAN is required? Let's analyze carefully.
The guiding rules here are that we *shouldn't* use KMSAN unless absolutely necessary because it is an expensive tool. KMSAN is there to catch issues that are *only* catchable with KMSAN. If we don't need KMSAN, then it's a huge benefit not to use it.
The analysis is structured this way:
1. **`qrtr_getname` Analysis:** The patch introduces `struct sockaddr_qrtr qaddr = {};` This is great! It forces the structure to be fully zeroed. It then copies the relevant fields (`sq_node`, `sq_port`) from either `ipc->peer` or `ipc->us`. I've checked and these variables *are* initialized elsewhere. Finally, `sq_family` is set to `AF_QIPCRTR`. The patch *guarantees* that the entire structure, including padding, is initialized before being copied to `saddr` via `memcpy`.
* No uninitialized memory is leaked.
2. **`qrtr_ioctl` Analysis:** The patch adds a `memset(&ifr.ifr_addr, 0, sizeof(ifr.ifr_addr));` call before copying data into the `ifr.ifr_addr` which is of type `struct sockaddr`. This zeros out the entire 16-byte `ifr.ifr_addr`, which is perfect. Then, only `sq_family`, `sq_node` and `sq_port` are assigned. Again, these fields are initialized by earlier code paths. No possibility of uninitialized memory leakage here.
3. **KMSAN Justification:** The *key* question now is whether this patch *introduces* new uninitialized memory risks, or simply fixes existing ones. Given that *all* stack/heap structures touched are now fully zeroed, I'm fully confident that this patch *doesn't* introduce any *new* risks. It just addresses a problem that was already there. We are no longer copying the previous uninitialized data to the userspace. The patch does not introduce any risk of uninitialized memory usage or info-leaks.
The guiding instructions tell us explicitly: "Set NeedsKMSAN=false IF: - 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."
Because this patch adheres perfectly to these criteria, there is absolutely NO reason to enable KMSAN here. Standard KASAN should be sufficient, and we will avoid incurring the cost of KMSAN, which is extremely expensive. This patch is definitely a bugfix that makes the code *safer* by preventing the leak.
|
| 58/3 | 2026/09/21 17:11 | tool | grepper |
0mArgs:{
"Expression": "TCP_ESTABLISHED",
"PathPrefix": "net/qrtr"
}Results: {
"Output": "net/qrtr/af_qrtr.c=957=static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)\n--\nnet/qrtr/af_qrtr.c-994-\t\t}\nnet/qrtr/af_qrtr.c:995:\t} else if (sk-\u003esk_state == TCP_ESTABLISHED) {\nnet/qrtr/af_qrtr.c-996-\t\taddr = \u0026ipc-\u003epeer;\n--\nnet/qrtr/af_qrtr.c=1146=static int qrtr_connect(struct socket *sock, struct sockaddr_unsized *saddr,\n--\nnet/qrtr/af_qrtr.c-1169-\tsock-\u003estate = SS_CONNECTED;\nnet/qrtr/af_qrtr.c:1170:\tsk-\u003esk_state = TCP_ESTABLISHED;\nnet/qrtr/af_qrtr.c-1171-\n--\nnet/qrtr/af_qrtr.c=1177=static int qrtr_getname(struct socket *sock, struct sockaddr *saddr,\n--\nnet/qrtr/af_qrtr.c-1185-\tif (peer) {\nnet/qrtr/af_qrtr.c:1186:\t\tif (sk-\u003esk_state != TCP_ESTABLISHED) {\nnet/qrtr/af_qrtr.c-1187-\t\t\trelease_sock(sk);\n"
} |
| 59/3 | 2026/09/21 17:11 | llm | kmsan-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 47924 output: 233 thoughts: 1370 Thoughts: **Analysis of Uninitialized Memory Risks in QRTR Code**
Okay, let's break this down. My initial assessment was that the `TCP_ESTABLISHED` state in `qrtr_connect` guarantees initialization of the peer's node and port. The `addr` struct is sourced from `DECLARE_SOCKADDR`, and the code ensures the `sq_node` and `sq_port` fields within the `ipc->peer` struct are properly initialized. Then, within `qrtr_ioctl`, those values get copied to the socket's internal representation.
I then dug deeper into the `qrtr_ioctl` function, specifically looking at `SIOCGIFADDR`. My concern was that if `get_user_ifreq` was passed `argp` potentially containing uninitialized memory. But upon inspection of the code path I'm seeing now, this is clearly not a risk. Even if `get_user_ifreq` is passed `argp`, any data copied from user space to the `ifr` struct would be explicitly zeroed using `memset` before the QRTR-specific fields are set. Then, the initialized `ifr` is copied back to userspace with `put_user_ifreq`, and no uninitialized memory makes its way out.
Then, there's `qrtr_getname`, which also looks clean. It initializes the `qaddr` struct with `{}` which guarantees zero-initialization. Then it sets the node, port, and family, and finally copies the whole thing back to userspace with `memcpy`, which guarantees that there is no risk of uninitialized memory.
So, taking all of this into account, this patch doesn't introduce any uninitialized memory risks. Actually, it looks like this patch might be *fixing* some existing potential leaks, in both `qrtr_getname()` and `qrtr_ioctl(SIOCGIFADDR)` due to the explicit zeroing and initialization of the structures involved. The code is defensively handling user-provided data and ensuring all output structures are fully initialized.
The KMSAN rules explicitly state that `NeedsKMSAN` should be false if all structures are zeroed or initialized, and if the patch doesn't introduce any risk of uninitialized memory usage. This patch fits that perfectly. I am certain that there is no need for a KMSAN session here, because we are fixing previous issues. There's no KMSAN-specific bug being introduced by this patch.
I'm ready to proceed with setting `NeedsKMSAN=false` because the reasoning is sound, and all the conditions for avoiding a KMSAN session are met. Now let's prepare that tool call to set the results.
|
| 60/3 | 2026/09/21 17:11 | tool | set-results |
0mArgs:{
"KMSANReasoning": "The patch resolves potential kernel information leaks to user space in qrtr_getname() and qrtr_ioctl(SIOCGIFADDR) by ensuring proper zero-initialization. Specifically:\n1. In qrtr_getname(), 'struct sockaddr_qrtr qaddr' is explicitly zero-initialized with '= {}', and members sq_node, sq_port, and sq_family are explicitly assigned, preventing any uninitialized struct padding bytes from being copied to user space.\n2. In qrtr_ioctl(SIOCGIFADDR), 'ifr.ifr_addr' is zeroed via memset() before copying sq_family, sq_node, and sq_port, preventing struct padding or uninitialized sockaddr bytes from being leaked via put_user_ifreq().\n\nAll stack structures modified or introduced by this patch are fully initialized/zeroed before being read or copied. The patch does not introduce or expose any uninitialized memory risks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
}Results: {
"KMSANReasoning": "The patch resolves potential kernel information leaks to user space in qrtr_getname() and qrtr_ioctl(SIOCGIFADDR) by ensuring proper zero-initialization. Specifically:\n1. In qrtr_getname(), 'struct sockaddr_qrtr qaddr' is explicitly zero-initialized with '= {}', and members sq_node, sq_port, and sq_family are explicitly assigned, preventing any uninitialized struct padding bytes from being copied to user space.\n2. In qrtr_ioctl(SIOCGIFADDR), 'ifr.ifr_addr' is zeroed via memset() before copying sq_family, sq_node, and sq_port, preventing struct padding or uninitialized sockaddr bytes from being leaked via put_user_ifreq().\n\nAll stack structures modified or introduced by this patch are fully initialized/zeroed before being read or copied. The patch does not introduce or expose any uninitialized memory risks. Therefore, a dedicated KMSAN fuzzing session is not warranted.",
"NeedsKMSAN": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|