| 0/0 |
2026/09/14 00:46 |
flow |
moderation |
2m
Results: map[Actionable:true Explanation:An analysis of the bug report and kernel source code confirms that this bug
report is **actionable** and **self-consistent**.
### Analysis and Findings
1. **Stack Traces**:
The report contains all 3 required KASAN stack traces (allocation, free, and
bad access), which are clean and directly correlate with one another:
- **Allocation Stack**: Task 7081 creating a new network namespace (`clone` /
`copy_net_ns` -> `setup_net` -> `ops_init` -> `uevent_net_init` at
`lib/kobject_uevent.c:782`), allocating `struct uevent_sock` via
`kzalloc_obj(*ue_sk)`.
- **Free Stack**: Task 13 tearing down the network namespace via workqueue
(`cleanup_net` -> `ops_undo_list` -> `ops_exit_list` -> `uevent_net_exit` at
`lib/kobject_uevent.c:816`), releasing `ue_sk->sk` and freeing `ue_sk` via
`kfree(ue_sk)`.
- **Bad Access Stack**: Worker `ib-unreg-wq` running `ib_unregister_work` ->
`__ib_unregister_device` -> `disable_device` -> `remove_compat_devs` ->
`remove_one_compat_dev` -> `device_del` -> `kobject_uevent` ->
`kobject_uevent_net_broadcast` at `lib/kobject_uevent.c:415`.
2. **Object Type and Memory Offset Consistency**:
- `struct uevent_sock` contains:
- `struct list_head list` (16 bytes, offset 0β15)
- `struct sock *sk` (8 bytes, offset 16β23)
- Total size: 24 bytes, which is allocated from the `kmalloc-32` slab
cache.
- The crash report indicates a slab-use-after-free read of size 8 at
`ffff0000f621ced0`, exactly 16 bytes (+0x10) into the 32-byte object
(`[ffff0000f621cec0, ffff0000f621cee0)`).
- In `lib/kobject_uevent.c:415`:
```c
const struct net *net = container_of(ns, struct net, ns);
ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env, action_string,
devpath);
```
Dereferencing `net->uevent_sock->sk` performs an 8-byte load at offset 16
of `net->uevent_sock`, matching the crash report exactly.
3. **Subsystem and Mechanism Consistency (Root Cause)**:
- InfiniBand compat devices (`struct ib_core_device cdev`) created for
secondary network namespaces store a pointer to `struct net`
(`write_pnet(&coredev->rdma_net, net)`), without taking a reference count to
`struct net`.
- Its class (`ib_class`) defines namespace operations pointing to
`net_namespace()`, returning `coredev->rdma_net`.
- When a network namespace is destroyed, `cleanup_net()` executes
`uevent_net_exit()` (registered as a pernet subsys), freeing
`net->uevent_sock`.
- Asynchronous IB device unregistration (`ib_unregister_device_queued` via
`ib-unreg-wq`) concurrently or subsequently unregisters devices and calls
`device_del(&cdev->dev)` on the compat devices.
- `device_del()` emits a uevent (`KOBJ_REMOVE`), where
`kobject_uevent_net_broadcast()` looks up the namespace associated with the
device (`cdev->dev`) and accesses `net->uevent_sock->sk`, triggering
use-after-free on the already freed `uevent_sock`.
Since all three stack traces align to the same object type (`struct
uevent_sock`), the memory access offset and size match the struct layout
precisely, and the race between netns exit and async IB unregistration is fully
clear, the bug is self-consistent and actionable.]
|
| 1/1 |
2026/09/14 00:46 |
action |
kernel-checkouter |
0m
Results: map[KernelSrc:/app/workdir/cache/src/e4df1e35f73e8871a0bb5986e0a3f7f88903d380]
|
| 2/1 |
2026/09/14 00:46 |
action |
kernel-builder |
0m
Results: map[KernelObj:/app/workdir/cache/build/4052259e3ac679a0ea4a40bb36f332ce6ba3596e]
|
| 3/1 |
2026/09/14 00:46 |
action |
codesearch-prepare |
0m
Results: map[Index:codesearch-index]
|
| 4/1 |
2026/09/14 00:46 |
agent |
expert |
2m
Model:
Results:
Instruction: You are an experienced Linux kernel developer tasked with determining if the given kernel bug
report is actionable or not. Actionable means that it contains enough info to root cause
the underlying bug, and that the report is self-consistent and makes sense, rather than
e.g. a one-off nonsensical crash induced by a previous memory corruption.
The bug report is about a use-after-free bug generated by KASAN tool.
It should contain 3 stack traces: the bad memory access stack, the heap block allocation stack,
and the heap block free stack. If the report does not contain 3 stacks, it's not actionable.
All 3 stack traces should be related to the same object type,
and usually be in the same kernel subsystem (at least leaf stack frames).
An example of an actionable and consistent report would be: first access stack relates
to an access to a field of struct Foo, allocation/free stacks relate to allocation/free
of the struct Foo.
In inconsistent/nonsensical reports an access may be to a struct Foo, but allocation
stack allocates a different structure in a different subsystem.
Look for other suspicious signals/inconsistencies that can make this report hard to
debug/understand.
In the final reply explain why you think the report is self-consistent and actionable,
or why it's inconsistent and/or not actionable.
Use the provided tools to confirm any assumptions, variables/fields being accessed, etc.
Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.
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:
The bug report is:
==================================================================
BUG: KASAN: slab-use-after-free in kobject_uevent_net_broadcast+0x110/0x53c lib/kobject_uevent.c:415
Read of size 8 at addr ffff0000f621ced0 by task kworker/u8:17/6617
CPU: 0 UID: 0 PID: 6617 Comm: kworker/u8:17 Not tainted syzkaller #0 PREEMPT
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2026
Workqueue: ib-unreg-wq ib_unregister_work
Call trace:
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C)
__dump_stack+0x30/0x40 lib/dump_stack.c:94
dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120
print_address_description+0xb0/0x238 mm/kasan/report.c:378
print_report+0x68/0x84 mm/kasan/report.c:482
kasan_report+0x8c/0xc4 mm/kasan/report.c:595
__asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381
kobject_uevent_net_broadcast+0x110/0x53c lib/kobject_uevent.c:415
kobject_uevent_env+0x518/0x944 lib/kobject_uevent.c:611
kobject_uevent+0x2c/0x3c lib/kobject_uevent.c:659
device_del+0x5f8/0x71c drivers/base/core.c:3983
remove_one_compat_dev+0x5c/0x7c drivers/infiniband/core/device.c:1036
remove_compat_devs drivers/infiniband/core/device.c:1047 [inline]
disable_device+0x184/0x240 drivers/infiniband/core/device.c:1339
__ib_unregister_device+0x214/0x33c drivers/infiniband/core/device.c:1571
ib_unregister_work+0x20/0x38 drivers/infiniband/core/device.c:1683
process_one_work kernel/workqueue.c:3387 [inline]
process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3470
worker_thread+0x798/0xbd0 kernel/workqueue.c:3551
kthread+0x304/0x3d4 kernel/kthread.c:436
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:838
Allocated by task 7081:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x40/0x78 mm/kasan/common.c:78
kasan_save_alloc_info+0x40/0x50 mm/kasan/generic.c:570
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x2f4/0x5fc mm/slub.c:5563
_kmalloc_noprof include/linux/slab.h:991 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
uevent_net_init+0xcc/0x2a0 lib/kobject_uevent.c:782
ops_init+0x2cc/0x528 net/core/net_namespace.c:137
setup_net+0x118/0x2fc net/core/net_namespace.c:443
copy_net_ns+0x454/0x698 net/core/net_namespace.c:582
create_new_namespaces+0x304/0x50c kernel/nsproxy.c:132
copy_namespaces+0x3fc/0x474 kernel/nsproxy.c:195
copy_process+0x177c/0x332c kernel/fork.c:2310
kernel_clone+0x234/0x9fc kernel/fork.c:2766
__do_sys_clone kernel/fork.c:2908 [inline]
__se_sys_clone kernel/fork.c:2876 [inline]
__arm64_sys_clone+0x168/0x1d4 kernel/fork.c:2876
__invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121
do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
el0_svc+0x64/0x260 arch/arm64/kernel/entry-common.c:758
el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:777
el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:590
Freed by task 13:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x40/0x78 mm/kasan/common.c:78
kasan_save_free_info+0x54/0x6c mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x74/0xa4 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2748 [inline]
slab_free mm/slub.c:6499 [inline]
kfree+0x188/0x698 mm/slub.c:6792
uevent_net_exit+0x1b0/0x1cc lib/kobject_uevent.c:816
ops_exit_list net/core/net_namespace.c:200 [inline]
ops_undo_list+0x3cc/0x81c net/core/net_namespace.c:253
cleanup_net+0x474/0x6c4 net/core/net_namespace.c:706
process_one_work kernel/workqueue.c:3387 [inline]
process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3470
worker_thread+0x798/0xbd0 kernel/workqueue.c:3551
kthread+0x304/0x3d4 kernel/kthread.c:436
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:838
The buggy address belongs to the object at ffff0000f621cec0
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 16 bytes inside of
freed 32-byte region [ffff0000f621cec0, ffff0000f621cee0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000f621ca40 pfn:0x13621c
flags: 0x5ffc00000000200(workingset|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 05ffc00000000200 ffff0000c0001780 fffffdffc3334710 fffffdffc346e790
raw: ffff0000f621ca40 0000000000400039 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000f621cd80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
ffff0000f621ce00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
>ffff0000f621ce80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
^
ffff0000f621cf00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
ffff0000f621cf80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
==================================================================
Reply: An analysis of the bug report and kernel source code confirms that this bug report is **actionable** and **self-consistent**.
### Analysis and Findings
1. **Stack Traces**:
The report contains all 3 required KASAN stack traces (allocation, free, and bad access), which are clean and directly correlate with one another:
- **Allocation Stack**: Task 7081 creating a new network namespace (`clone` / `copy_net_ns` -> `setup_net` -> `ops_init` -> `uevent_net_init` at `lib/kobject_uevent.c:782`), allocating `struct uevent_sock` via `kzalloc_obj(*ue_sk)`.
- **Free Stack**: Task 13 tearing down the network namespace via workqueue (`cleanup_net` -> `ops_undo_list` -> `ops_exit_list` -> `uevent_net_exit` at `lib/kobject_uevent.c:816`), releasing `ue_sk->sk` and freeing `ue_sk` via `kfree(ue_sk)`.
- **Bad Access Stack**: Worker `ib-unreg-wq` running `ib_unregister_work` -> `__ib_unregister_device` -> `disable_device` -> `remove_compat_devs` -> `remove_one_compat_dev` -> `device_del` -> `kobject_uevent` -> `kobject_uevent_net_broadcast` at `lib/kobject_uevent.c:415`.
2. **Object Type and Memory Offset Consistency**:
- `struct uevent_sock` contains:
- `struct list_head list` (16 bytes, offset 0β15)
- `struct sock *sk` (8 bytes, offset 16β23)
- Total size: 24 bytes, which is allocated from the `kmalloc-32` slab cache.
- The crash report indicates a slab-use-after-free read of size 8 at `ffff0000f621ced0`, exactly 16 bytes (+0x10) into the 32-byte object (`[ffff0000f621cec0, ffff0000f621cee0)`).
- In `lib/kobject_uevent.c:415`:
```c
const struct net *net = container_of(ns, struct net, ns);
ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env, action_string, devpath);
```
Dereferencing `net->uevent_sock->sk` performs an 8-byte load at offset 16 of `net->uevent_sock`, matching the crash report exactly.
3. **Subsystem and Mechanism Consistency (Root Cause)**:
- InfiniBand compat devices (`struct ib_core_device cdev`) created for secondary network namespaces store a pointer to `struct net` (`write_pnet(&coredev->rdma_net, net)`), without taking a reference count to `struct net`.
- Its class (`ib_class`) defines namespace operations pointing to `net_namespace()`, returning `coredev->rdma_net`.
- When a network namespace is destroyed, `cleanup_net()` executes `uevent_net_exit()` (registered as a pernet subsys), freeing `net->uevent_sock`.
- Asynchronous IB device unregistration (`ib_unregister_device_queued` via `ib-unreg-wq`) concurrently or subsequently unregisters devices and calls `device_del(&cdev->dev)` on the compat devices.
- `device_del()` emits a uevent (`KOBJ_REMOVE`), where `kobject_uevent_net_broadcast()` looks up the namespace associated with the device (`cdev->dev`) and accesses `net->uevent_sock->sk`, triggering use-after-free on the already freed `uevent_sock`.
Since all three stack traces align to the same object type (`struct uevent_sock`), the memory access offset and size match the struct layout precisely, and the race between netns exit and async IB unregistration is fully clear, the bug is self-consistent and actionable.
|
| 5/2 |
2026/09/14 00:46 |
llm |
expert |
0m
Model:
Tokens:
input: 6839
output: 74
thoughts: 360
Thoughts: **Analyzing the KASAN Use-After-Free Report**
Okay, let's dive into this KASAN use-after-free report and determine its actionability. First, I need to confirm the basics. The instructions are clear: a KASAN UAF report should contain three crucial stack traces: the bad memory access, the heap block allocation, and the heap block free. This is the minimum requirement. Checking the report, it seems we have them! The traces are present: the bad memory access in `kobject_uevent_net_broadcast+0x110/0x53c` (line 415), the allocation via `uevent_net_init+0xcc/0x2a0` (line 782), and the free by `uevent_net_exit+0x1b0/0x1cc` (line 816), all in `lib/kobject_uevent.c`. So far, so good.
Next, I need to verify the traces are coherent. The object type and the kernel subsystem (or at least the leaf stack frames) need to be consistent across the three stacks. This means all three traces must relate to the same object type, and ideally, be within the same subsystem. It appears the subsystem is `lib/kobject_uevent.c`. Now, let's get into the code and determine the object type. I need to closely examine the code surrounding `uevent_net_init`, `uevent_net_exit`, and, crucially, `kobject_uevent_net_broadcast`. This is where I'll use my tools to dig into `lib/kobject_uevent.c`. I have a feeling this could be an interesting one to debug.
|
| 6/2 |
2026/09/14 00:46 |
tool |
read-file |
0m
Args: map[File:lib/kobject_uevent.c FirstLine:400 LineCount:40]
Results: map[Contents: 400:
401: /* kobjects currently only carry network namespace tags and they
402: * are the only tag relevant here since we want to decide which
403: * network namespaces to broadcast the uevent into.
404: */
405: if (ops && ops->netlink_ns && kobj->ktype->namespace)
406: if (ops->type == KOBJ_NS_TYPE_NET)
407: ns = kobj->ktype->namespace(kobj);
408:
409: if (!ns)
410: ret = uevent_net_broadcast_untagged(env, action_string,
411: devpath);
412: else {
413: const struct net *net = container_of(ns, struct net, ns);
414:
415: ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env,
416: action_string, devpath);
417: }
418: #endif
419:
420: return ret;
421: }
422:
423: static void zap_modalias_env(struct kobj_uevent_env *env)
424: {
425: static const char modalias_prefix[] = "MODALIAS=";
426: size_t len;
427: int i, j;
428:
429: for (i = 0; i < env->envp_idx;) {
430: if (strncmp(env->envp[i], modalias_prefix,
431: sizeof(modalias_prefix) - 1)) {
432: i++;
433: continue;
434: }
435:
436: len = strlen(env->envp[i]) + 1;
437:
438: if (i != env->envp_idx - 1) {
439: /* @env->envp[] contains pointers to @env->buf[]
]
|
| 7/2 |
2026/09/14 00:46 |
tool |
read-file |
0m
Args: map[File:lib/kobject_uevent.c FirstLine:770 LineCount:60]
Results: map[Contents: 770: netlink_rcv_skb(skb, &uevent_net_rcv_skb);
771: }
772:
773: static int uevent_net_init(struct net *net)
774: {
775: struct uevent_sock *ue_sk;
776: struct netlink_kernel_cfg cfg = {
777: .groups = 1,
778: .input = uevent_net_rcv,
779: .flags = NL_CFG_F_NONROOT_RECV
780: };
781:
782: ue_sk = kzalloc_obj(*ue_sk);
783: if (!ue_sk)
784: return -ENOMEM;
785:
786: ue_sk->sk = netlink_kernel_create(net, NETLINK_KOBJECT_UEVENT, &cfg);
787: if (!ue_sk->sk) {
788: pr_err("kobject_uevent: unable to create netlink socket!\n");
789: kfree(ue_sk);
790: return -ENODEV;
791: }
792:
793: net->uevent_sock = ue_sk;
794:
795: /* Restrict uevents to initial user namespace. */
796: if (sock_net(ue_sk->sk)->user_ns == &init_user_ns) {
797: mutex_lock(&uevent_sock_mutex);
798: list_add_tail(&ue_sk->list, &uevent_sock_list);
799: mutex_unlock(&uevent_sock_mutex);
800: }
801:
802: return 0;
803: }
804:
805: static void uevent_net_exit(struct net *net)
806: {
807: struct uevent_sock *ue_sk = net->uevent_sock;
808:
809: if (sock_net(ue_sk->sk)->user_ns == &init_user_ns) {
810: mutex_lock(&uevent_sock_mutex);
811: list_del(&ue_sk->list);
812: mutex_unlock(&uevent_sock_mutex);
813: }
814:
815: netlink_kernel_release(ue_sk->sk);
816: kfree(ue_sk);
817: }
818:
819: static struct pernet_operations uevent_net_ops = {
820: .init = uevent_net_init,
821: .exit = uevent_net_exit,
822: };
823:
824: static int __init kobject_uevent_init(void)
825: {
826: return register_pernet_subsys(&uevent_net_ops);
827: }
828:
829:
]
|
| 8/2 |
2026/09/14 00:46 |
llm |
expert |
0m
Model:
Tokens:
input: 9146
output: 37
thoughts: 151
Thoughts: **Examining the Kernel's uevent Socket Management**
Alright, let's take a look at this. I'm focusing on the `lib/kobject_uevent.c` file. Specifically, I'm zeroing in on how the kernel handles the uevent socket. Line 782, `uevent_net_init`, allocates a `struct uevent_sock` using `kzalloc_obj`. Okay, good. That sets up the socket. And then, at line 816 in `uevent_net_exit`, `kfree(ue_sk)` tells us that itβs deallocated when itβs no longer needed. That's standard and expected.
Now, line 415 looks interesting: `ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env, action_string, devpath);`. It appears we're broadcasting uevents using this socket. The structure itself is called `uevent_sock`, which means it's a socket dedicated to uevents.
My next step is to drill into the definition of `struct uevent_sock`. I need to understand what this structure contains. I should know what data it holds, what flags are set, and how this relates to the overall uevent mechanism. That will provide a more comprehensive view of the lifecycle and functionality of this specialized socket.
|
| 9/2 |
2026/09/14 00:47 |
tool |
codesearch-struct-layout |
0m
Args: map[ContextFile:lib/kobject_uevent.c Name:uevent_sock]
Results: map[Fields:[map[Name:list OffsetBits:0 SizeBits:128] map[Name:sk OffsetBits:128 SizeBits:64]]]
|
| 10/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 9681
output: 41
thoughts: 674
Thoughts: **Analyzing a Kernel Crash Related to `uevent_sock`**
Okay, let's break this down. I'm looking at a kernel crash report, and it looks like we've got a read out-of-bounds issue within a `uevent_sock` structure. The report points to an address within the `kmalloc-32` slab, specifically a 32-byte region. The buggy address, ffff0000f621ced0, is 16 bytes inside the freed region at ffff0000f621cec0, which is exactly the offset of the `sk` pointer within a `uevent_sock` struct.
My understanding is, the `uevent_sock` struct itself is 24 bytes, and the report is clear the system is attempting to read an 8-byte value (a pointer) at offset 16 within that structure, which is meant to be the `sk` (socket) pointer. The read is at the exact location that should hold the `sk` pointer, so that's where the corruption is happening.
The crash occurs because the code is attempting to dereference the `sk` pointer through `net->uevent_sock->sk`.
Now I need to find the context. The crash originated from `kobject_uevent_net_broadcast`. This then traces through `device_del` in `drivers/base/core.c`, so I'll check what is calling `device_del`. In this specific crash, `device_del` is called because of `remove_one_compat_dev`, which is called by `remove_compat_devs`. And the calls cascade through `disable_device`, and further into `__ib_unregister_device` and finally `ib_unregister_work`. So, this indicates an infiniband device is being unregistered, which leads to the `device_del` function call.
So, the next step is to examine the Infiniband code, specifically `drivers/infiniband/core/device.c` at lines 1036, 1047, 1339, 1571, and 1683. I need to understand why this unregistration process is triggering this out-of-bounds read when dealing with the `uevent_sock`. Is the socket being freed prematurely? Is there a race condition? Is `uevent_sock` not being handled correctly during device removal? I'll be looking for where and how the `uevent_sock` is being used in the context of device unregistration.
|
| 11/2 |
2026/09/14 00:47 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/core/device.c FirstLine:1020 LineCount:40]
Results: map[Contents:1020: cdev_err:
1021: xa_release(&device->compat_devs, rnet->id);
1022: done:
1023: mutex_unlock(&device->compat_devs_mutex);
1024: return ret;
1025: }
1026:
1027: static void remove_one_compat_dev(struct ib_device *device, u32 id)
1028: {
1029: struct ib_core_device *cdev;
1030:
1031: mutex_lock(&device->compat_devs_mutex);
1032: cdev = xa_erase(&device->compat_devs, id);
1033: mutex_unlock(&device->compat_devs_mutex);
1034: if (cdev) {
1035: ib_free_port_attrs(cdev);
1036: device_del(&cdev->dev);
1037: put_device(&cdev->dev);
1038: }
1039: }
1040:
1041: static void remove_compat_devs(struct ib_device *device)
1042: {
1043: struct ib_core_device *cdev;
1044: unsigned long index;
1045:
1046: xa_for_each (&device->compat_devs, index, cdev)
1047: remove_one_compat_dev(device, index);
1048: }
1049:
1050: static int add_compat_devs(struct ib_device *device)
1051: {
1052: struct rdma_dev_net *rnet;
1053: unsigned long index;
1054: int ret = 0;
1055:
1056: lockdep_assert_held(&devices_rwsem);
1057:
1058: down_read(&rdma_nets_rwsem);
1059: xa_for_each (&rdma_nets, index, rnet) {
]
|
| 12/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 11540
output: 35
thoughts: 99
Thoughts: **Delving into Device Removal and Namespace Management**
Okay, so I'm tracing the device removal process, specifically with `cdev`. Right, so `cdev` has its `dev` member, and that in turn has a `kobj` member. That makes sense. When `device_del(&cdev->dev)` gets called, I see the kernel calls `kobject_uevent(&dev->kobj, KOBJ_REMOVE)`. That confirms the removal event is propagated through the kobject system, as expected.
Now, the crucial question here is the namespace. I need to understand what namespace is associated with `cdev->dev` β or really, with `cdev` itself. Where does this initial association happen? I need to know this to be certain of the impact of the removal, especially regarding potential conflicts or dependencies.
Alright, I should check the device setup in the Infiniband core driver. I know that's where `cdev` is likely initialized and registered. Time to dive into `drivers/infiniband/core/device.c` and figure out where the namespace association happens. That's the key to understanding the broader impact of this `device_del` operation.
|
| 13/2 |
2026/09/14 00:47 |
tool |
grepper |
0m
Args: map[Expression:compat_dev PathPrefix:drivers/infiniband/core/device.c]
Results: map[Output:drivers/infiniband/core/device.c=355=static struct ib_device *__ib_device_get_by_name(const char *name,
--
drivers/infiniband/core/device.c-368-
drivers/infiniband/core/device.c:369:static int rename_compat_devs(struct ib_device *device)
drivers/infiniband/core/device.c-370-{
--
drivers/infiniband/core/device.c-374-
drivers/infiniband/core/device.c:375: mutex_lock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c:376: xa_for_each (&device->compat_devs, index, cdev) {
drivers/infiniband/core/device.c-377- ret = device_rename(&cdev->dev, dev_name(&device->dev));
--
drivers/infiniband/core/device.c-384- }
drivers/infiniband/core/device.c:385: mutex_unlock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c-386- return ret;
--
drivers/infiniband/core/device.c=389=int ib_device_rename(struct ib_device *ibdev, const char *name)
--
drivers/infiniband/core/device.c-412- strscpy(ibdev->name, name, IB_DEVICE_NAME_MAX);
drivers/infiniband/core/device.c:413: ret = rename_compat_devs(ibdev);
drivers/infiniband/core/device.c-414-
--
drivers/infiniband/core/device.c=497=static void ib_device_release(struct device *device)
--
drivers/infiniband/core/device.c-515- mutex_destroy(&dev->unregistration_lock);
drivers/infiniband/core/device.c:516: mutex_destroy(&dev->compat_devs_mutex);
drivers/infiniband/core/device.c-517-
drivers/infiniband/core/device.c:518: xa_destroy(&dev->compat_devs);
drivers/infiniband/core/device.c-519- xa_destroy(&dev->client_data);
--
drivers/infiniband/core/device.c=594=struct ib_device *_ib_alloc_device(size_t size, struct net *net)
--
drivers/infiniband/core/device.c-630- init_rwsem(&device->client_data_rwsem);
drivers/infiniband/core/device.c:631: xa_init_flags(&device->compat_devs, XA_FLAGS_ALLOC);
drivers/infiniband/core/device.c:632: mutex_init(&device->compat_devs_mutex);
drivers/infiniband/core/device.c-633- init_completion(&device->unreg_completion);
--
drivers/infiniband/core/device.c=688=void ib_dealloc_device(struct ib_device *device)
--
drivers/infiniband/core/device.c-706-
drivers/infiniband/core/device.c:707: WARN_ON(!xa_empty(&device->compat_devs));
drivers/infiniband/core/device.c-708- WARN_ON(!xa_empty(&device->client_data));
--
drivers/infiniband/core/device.c=945=static void compatdev_release(struct device *dev)
--
drivers/infiniband/core/device.c-952-
drivers/infiniband/core/device.c:953:static int add_one_compat_dev(struct ib_device *device,
drivers/infiniband/core/device.c-954- struct rdma_dev_net *rnet)
--
drivers/infiniband/core/device.c-972- * The first of init_net() or ib_register_device() to take the
drivers/infiniband/core/device.c:973: * compat_devs_mutex wins and gets to add the device. Others will wait
drivers/infiniband/core/device.c-974- * for completion here.
drivers/infiniband/core/device.c-975- */
drivers/infiniband/core/device.c:976: mutex_lock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c:977: cdev = xa_load(&device->compat_devs, rnet->id);
drivers/infiniband/core/device.c-978- if (cdev) {
--
drivers/infiniband/core/device.c-981- }
drivers/infiniband/core/device.c:982: ret = xa_reserve(&device->compat_devs, rnet->id, GFP_KERNEL);
drivers/infiniband/core/device.c-983- if (ret)
--
drivers/infiniband/core/device.c-1005-
drivers/infiniband/core/device.c:1006: ret = xa_err(xa_store(&device->compat_devs, rnet->id,
drivers/infiniband/core/device.c-1007- cdev, GFP_KERNEL));
--
drivers/infiniband/core/device.c-1010-
drivers/infiniband/core/device.c:1011: mutex_unlock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c-1012- return 0;
--
drivers/infiniband/core/device.c-1020-cdev_err:
drivers/infiniband/core/device.c:1021: xa_release(&device->compat_devs, rnet->id);
drivers/infiniband/core/device.c-1022-done:
drivers/infiniband/core/device.c:1023: mutex_unlock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c-1024- return ret;
--
drivers/infiniband/core/device.c-1026-
drivers/infiniband/core/device.c:1027:static void remove_one_compat_dev(struct ib_device *device, u32 id)
drivers/infiniband/core/device.c-1028-{
--
drivers/infiniband/core/device.c-1030-
drivers/infiniband/core/device.c:1031: mutex_lock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c:1032: cdev = xa_erase(&device->compat_devs, id);
drivers/infiniband/core/device.c:1033: mutex_unlock(&device->compat_devs_mutex);
drivers/infiniband/core/device.c-1034- if (cdev) {
--
drivers/infiniband/core/device.c-1040-
drivers/infiniband/core/device.c:1041:static void remove_compat_devs(struct ib_device *device)
drivers/infiniband/core/device.c-1042-{
--
drivers/infiniband/core/device.c-1045-
drivers/infiniband/core/device.c:1046: xa_for_each (&device->compat_devs, index, cdev)
drivers/infiniband/core/device.c:1047: remove_one_compat_dev(device, index);
drivers/infiniband/core/device.c-1048-}
drivers/infiniband/core/device.c-1049-
drivers/infiniband/core/device.c:1050:static int add_compat_devs(struct ib_device *device)
drivers/infiniband/core/device.c-1051-{
--
drivers/infiniband/core/device.c-1059- xa_for_each (&rdma_nets, index, rnet) {
drivers/infiniband/core/device.c:1060: ret = add_one_compat_dev(device, rnet);
drivers/infiniband/core/device.c-1061- if (ret)
--
drivers/infiniband/core/device.c-1067-
drivers/infiniband/core/device.c:1068:static void remove_all_compat_devs(void)
drivers/infiniband/core/device.c-1069-{
drivers/infiniband/core/device.c:1070: struct ib_compat_device *cdev;
drivers/infiniband/core/device.c-1071- struct ib_device *dev;
--
drivers/infiniband/core/device.c-1081- down_read(&rdma_nets_rwsem);
drivers/infiniband/core/device.c:1082: xa_for_each (&dev->compat_devs, c_index, cdev)
drivers/infiniband/core/device.c:1083: remove_one_compat_dev(dev, c_index);
drivers/infiniband/core/device.c-1084- up_read(&rdma_nets_rwsem);
--
drivers/infiniband/core/device.c-1088-
drivers/infiniband/core/device.c:1089:static int add_all_compat_devs(void)
drivers/infiniband/core/device.c-1090-{
--
drivers/infiniband/core/device.c-1104- xa_for_each (&rdma_nets, net_index, rnet) {
drivers/infiniband/core/device.c:1105: ret = add_one_compat_dev(dev, rnet);
drivers/infiniband/core/device.c-1106- if (ret)
--
drivers/infiniband/core/device.c-1112- if (ret)
drivers/infiniband/core/device.c:1113: remove_all_compat_devs();
drivers/infiniband/core/device.c-1114- return ret;
--
drivers/infiniband/core/device.c=1117=int rdma_compatdev_set(u8 enable)
--
drivers/infiniband/core/device.c-1142- if (enable)
drivers/infiniband/core/device.c:1143: ret = add_all_compat_devs();
drivers/infiniband/core/device.c-1144- else
drivers/infiniband/core/device.c:1145: remove_all_compat_devs();
drivers/infiniband/core/device.c-1146- return ret;
--
drivers/infiniband/core/device.c=1149=static void rdma_dev_exit_net(struct net *net)
--
drivers/infiniband/core/device.c-1172-
drivers/infiniband/core/device.c:1173: remove_one_compat_dev(dev, rnet->id);
drivers/infiniband/core/device.c-1174-
--
drivers/infiniband/core/device.c=1198=static __net_init int rdma_dev_init_net(struct net *net)
--
drivers/infiniband/core/device.c-1226- down_read(&rdma_nets_rwsem);
drivers/infiniband/core/device.c:1227: ret = add_one_compat_dev(dev, rnet);
drivers/infiniband/core/device.c-1228- up_read(&rdma_nets_rwsem);
--
drivers/infiniband/core/device.c=1304=static void disable_device(struct ib_device *device)
--
drivers/infiniband/core/device.c-1338- */
drivers/infiniband/core/device.c:1339: remove_compat_devs(device);
drivers/infiniband/core/device.c-1340-}
--
drivers/infiniband/core/device.c=1347=static int enable_device_and_get(struct ib_device *device)
--
drivers/infiniband/core/device.c-1380- if (!ret)
drivers/infiniband/core/device.c:1381: ret = add_compat_devs(device);
drivers/infiniband/core/device.c-1382-out:
]
|
| 14/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 15333
output: 40
thoughts: 29
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Analyzing `drivers/infiniband/core/device.c`, Lines 950-1015**
Alright, let's dive into this specific section, lines 950 to 1015 of `drivers/infiniband/core/device.c`. My immediate thought is, based on the file name and the context, this is almost certainly related to device registration, initialization, or perhaps resource management within the Infiniband core. I'm mentally parsing the code range, anticipating what I might find. Knowing the Infiniband core intimately, I expect to see function calls related to:
* **`ib_device` struct**: This is the heart of the infiniband device representation, and I'll be looking to see how its members are being initialized, especially anything related to resource allocation like protection domains or memory regions.
* **Error Handling**: With a crucial section like this, the code should contain robust error handling. I'm expecting `goto` statements for error paths, likely involving deallocation of resources if any initialization step fails.
* **Context Creation**: Based on the function names and other things, I'm expecting context creation for the ib device, and context initialization for the associated driver.
* **Driver Association**: The code probably links the Infiniband core's device representation with the specific driver instance associated with the physical HCA. I am going to search for function calls that use the `ib_device` data member.
My primary goal here is to quickly understand the flow. I want to see if this region of code handles any new device additions or removals. I also want to check for race conditions that might exist due to the number of threads or processes that could be trying to access this section of code.
I'm ready to get my hands dirty and start dissecting.
|
| 15/2 |
2026/09/14 00:47 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/core/device.c FirstLine:950 LineCount:65]
Results: map[Contents: 950: kfree(cdev);
951: }
952:
953: static int add_one_compat_dev(struct ib_device *device,
954: struct rdma_dev_net *rnet)
955: {
956: struct ib_core_device *cdev;
957: int ret;
958:
959: lockdep_assert_held(&rdma_nets_rwsem);
960: if (!ib_devices_shared_netns)
961: return 0;
962:
963: /*
964: * Create and add compat device in all namespaces other than where it
965: * is currently bound to.
966: */
967: if (net_eq(read_pnet(&rnet->net),
968: read_pnet(&device->coredev.rdma_net)))
969: return 0;
970:
971: /*
972: * The first of init_net() or ib_register_device() to take the
973: * compat_devs_mutex wins and gets to add the device. Others will wait
974: * for completion here.
975: */
976: mutex_lock(&device->compat_devs_mutex);
977: cdev = xa_load(&device->compat_devs, rnet->id);
978: if (cdev) {
979: ret = 0;
980: goto done;
981: }
982: ret = xa_reserve(&device->compat_devs, rnet->id, GFP_KERNEL);
983: if (ret)
984: goto done;
985:
986: cdev = kzalloc_obj(*cdev);
987: if (!cdev) {
988: ret = -ENOMEM;
989: goto cdev_err;
990: }
991:
992: cdev->dev.parent = device->dev.parent;
993: rdma_init_coredev(cdev, device, read_pnet(&rnet->net));
994: cdev->dev.release = compatdev_release;
995: ret = dev_set_name(&cdev->dev, "%s", dev_name(&device->dev));
996: if (ret)
997: goto add_err;
998:
999: ret = device_add(&cdev->dev);
1000: if (ret)
1001: goto add_err;
1002: ret = ib_setup_port_attrs(cdev);
1003: if (ret)
1004: goto port_err;
1005:
1006: ret = xa_err(xa_store(&device->compat_devs, rnet->id,
1007: cdev, GFP_KERNEL));
1008: if (ret)
1009: goto insert_err;
1010:
1011: mutex_unlock(&device->compat_devs_mutex);
1012: return 0;
1013:
1014: insert_err:
]
|
| 16/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 16749
output: 43
thoughts: 44
Thoughts: Here's my summary, as though I'm thinking through this code snippet:
**Diving into `rdma_init_coredev`**
Okay, so I'm looking at this line: `rdma_init_coredev(cdev, device, read_pnet(&rnet->net));` and my immediate thought is, let's break this down. Specifically, I need to understand what `rdma_init_coredev` is *actually* doing. The arguments are clear enough on the surface - we're passing a `cdev`, a `device`, and something from `rnet->net` (likely the network namespace, or a pointer associated with the network). But the function itself...that's where the magic (or the problems!) lie. I need to trace this function call. I need to understand how it's initializing the core RDMA device. Is it setting up memory regions, registering with the system, allocating resources, or something else entirely? Time to dig into the definition of `rdma_init_coredev` and see what's going on under the hood. I suspect it's the gateway for setting up an RDMA device after probing or initial connection.
|
| 17/2 |
2026/09/14 00:47 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/infiniband/core/device.c Name:rdma_init_coredev]
Results: map[SourceCode: 553: static void rdma_init_coredev(struct ib_core_device *coredev,
554: struct ib_device *dev, struct net *net)
555: {
556: bool is_full_dev = &dev->coredev == coredev;
557:
558: /* This BUILD_BUG_ON is intended to catch layout change
559: * of union of ib_core_device and device.
560: * dev must be the first element as ib_core and providers
561: * driver uses it. Adding anything in ib_core_device before
562: * device will break this assumption.
563: */
564: BUILD_BUG_ON(offsetof(struct ib_device, coredev.dev) !=
565: offsetof(struct ib_device, dev));
566:
567: coredev->dev.class = &ib_class;
568: coredev->dev.groups = dev->groups;
569:
570: /*
571: * Don't expose hw counters outside of the init namespace.
572: */
573: if (!is_full_dev && dev->hw_stats_attr_index)
574: coredev->dev.groups[dev->hw_stats_attr_index] = NULL;
575:
576: device_initialize(&coredev->dev);
577: coredev->owner = dev;
578: INIT_LIST_HEAD(&coredev->port_list);
579: write_pnet(&coredev->rdma_net, net);
580: }
SourceFile:drivers/infiniband/core/device.c]
|
| 18/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 17585
output: 39
thoughts: 24
Thoughts: Here's my take on those thoughts, tailored for an expert audience:
**Diving into the `ib_class` Mystery**
Alright, so `ib_class`... what exactly *is* that thing? Given the context, it's clearly a critical element, but I need to quickly refresh my understanding. My first instinct is to dive directly into the definition. I need to trace this back to its source code, and I need to do so *quickly*. I'm also thinking this feels like a callback issue. Its namespace is obviously something I should examine, given the code, so I'll need to figure out how this is declared. I have to see how it's being used. Is it a base class, an abstract definition, or something more concrete? Understanding the design patterns at play here is key. Time to get my hands dirty.
|
| 19/2 |
2026/09/14 00:47 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/infiniband/core/device.c Name:ib_class]
Results: map[SourceCode: 545: static struct class ib_class = {
546: .name = "infiniband",
547: .dev_release = ib_device_release,
548: .dev_uevent = ib_device_uevent,
549: .ns_type = &net_ns_type_operations,
550: .namespace = net_namespace,
551: };
SourceFile:drivers/infiniband/core/device.c]
|
| 20/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 17976
output: 39
thoughts: 41
Thoughts: Here's my take on those thoughts, tailored for an expert audience:
**Diving into the Network Namespace Initialization**
Okay, so I'm looking at this `ib_class` structure. The first thing that jumps out is the assignment of `.ns_type` to `&net_ns_type_operations`. That's standard practice, assigning the function pointer table for this particular namespace type. Nothing unusual there. Now, the next crucial piece is `.namespace` being set to `net_namespace`. Right, `net_namespace`. That's the one I need to focus on. I need to understand what `net_namespace` actually *does* in this context. It's the central data structure, the core instance, of this network namespace. I need to figure out what functionality and data `net_namespace` holds and how it relates to the overall system. Time to dig in! Let's see how the magic happens!
|
| 21/2 |
2026/09/14 00:47 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/infiniband/core/device.c Name:net_namespace]
Results: map[SourceCode: 536: static const struct ns_common *net_namespace(const struct device *d)
537: {
538: const struct ib_core_device *coredev =
539: container_of(d, struct ib_core_device, dev);
540: struct net *net = read_pnet(&coredev->rdma_net);
541:
542: return net ? to_ns_common(net) : NULL;
543: }
SourceFile:drivers/infiniband/core/device.c]
|
| 22/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 18423
output: 41
thoughts: 1153
Thoughts: **Delving into Net Namespace Lifecycle and Potential RDMA Issues**
Okay, so I'm looking at how net namespaces are handled, specifically focusing on their lifecycle and potential interactions with RDMA devices. `net_namespace` calls `to_ns_common(net)`, which gives me a starting point. Then, I see this code snippet from `lib/kobject_uevent.c`: it checks for `ops->netlink_ns` and `kobj->ktype->namespace`, and if those are set, it grabs the namespace. Otherwise, it broadcasts a UEVENT without tagging. If it *does* find a namespace, it broadcasts a tagged UEVENT via `net->uevent_sock->sk`.
My next question is how this net namespace is freed. Let's look at the Free stack. I can see that `uevent_net_exit` is called, and within that function, `net->uevent_sock` gets freed! This makes me take notice. I also see that this freeing occurs during `cleanup_net`, so the freeing is occurring when the namespace is being destroyed.
But here's where it gets interesting, and I'm starting to get concerned, given the nature of the network namespace. Based on this information, if a `net` object is still referenced elsewhere, and that `net` object has been destroyed, then this could cause a use-after-free situation on `net->uevent_sock->sk`. With this in mind, and given my knowledge of the RDMA subsystem, I wonder if the RDMA device de-registration is happening too late, or if some RDMA structures are hanging onto a dead `net` pointer after `uevent_net_exit` has been called.
So I need to check the RDMA device de-registration process specifically, and I'll start with `rdma_dev_exit_net` in `drivers/infiniband/core/device.c`. I have to trace how this function, or related functions like `ib_unregister_device` interact with the net namespace. This might be where the potential use-after-free lies. I have to make sure that these devices correctly release their references to the net namespace *before* it gets freed. Otherwise, we are going to have problems.
|
| 23/2 |
2026/09/14 00:47 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/core/device.c FirstLine:1145 LineCount:60]
Results: map[Contents:1145: remove_all_compat_devs();
1146: return ret;
1147: }
1148:
1149: static void rdma_dev_exit_net(struct net *net)
1150: {
1151: struct rdma_dev_net *rnet = rdma_net_to_dev_net(net);
1152: struct ib_device *dev;
1153: unsigned long index;
1154: int ret;
1155:
1156: down_write(&rdma_nets_rwsem);
1157: /*
1158: * Prevent the ID from being re-used and hide the id from xa_for_each.
1159: */
1160: ret = xa_err(xa_store(&rdma_nets, rnet->id, NULL, GFP_KERNEL));
1161: WARN_ON(ret);
1162: up_write(&rdma_nets_rwsem);
1163:
1164: down_read(&devices_rwsem);
1165: xa_for_each (&devices, index, dev) {
1166: get_device(&dev->dev);
1167: /*
1168: * Release the devices_rwsem so that pontentially blocking
1169: * device_del, doesn't hold the devices_rwsem for too long.
1170: */
1171: up_read(&devices_rwsem);
1172:
1173: remove_one_compat_dev(dev, rnet->id);
1174:
1175: /*
1176: * If the real device is in the NS then move it back to init.
1177: * Provide a fallback pattern so a name conflict in init_net
1178: * cannot make the teardown move fail.
1179: */
1180: if (net_eq(net, read_pnet(&dev->coredev.rdma_net))) {
1181: ret = rdma_dev_change_netns(dev, net, &init_net,
1182: NULL, "ibdev%d");
1183: if (ret && ret != -ENODEV)
1184: WARN(1,
1185: "Failed to move RDMA device %s to init_net on netns exit: %d\n",
1186: dev_name(&dev->dev), ret);
1187: }
1188:
1189: put_device(&dev->dev);
1190: down_read(&devices_rwsem);
1191: }
1192: up_read(&devices_rwsem);
1193:
1194: rdma_nl_net_exit(rnet);
1195: xa_erase(&rdma_nets, rnet->id);
1196: }
1197:
1198: static __net_init int rdma_dev_init_net(struct net *net)
1199: {
1200: struct rdma_dev_net *rnet = rdma_net_to_dev_net(net);
1201: unsigned long index;
1202: struct ib_device *dev;
1203: int ret;
1204:
]
|
| 24/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 21024
output: 41
thoughts: 375
Thoughts: **RDMA Device Cleanup Process Analysis**
Okay, let's break this down. In `rdma_dev_exit_net`, specifically within that `xa_for_each` loop that iterates through the devices, I see the typical `get_device` and `up_read` calls, followed by `remove_one_compat_dev`. That's standard practice. But the key question here is where the final unregistering happens. I'm immediately concerned about the lifecycle of an `ib_device`, specifically where `ib_unregister_work` is initiated and when the underlying device is *actually* unregistered. We know that `remove_one_compat_dev` is called which then calls `disable_device`. I want to confirm the full path.
So, digging deeper into `ib_unregister_work`, I see that it's queued to the `ib-unreg-wq` workqueue. The call trace shows a critical part of the process: `remove_one_compat_dev` calls `device_del`. From the call stack, I can see the connection to `device_del` in `remove_one_compat_dev`. Excellent. I can see the relationships of these functions. Now, I want to see this more clearly.
I need to confirm all of this, by examining the source code of both `__ib_unregister_device` and `ib_unregister_work`. I need to solidify my understanding of the exact sequence within `drivers/infiniband/core/device.c`. That's where I'll find my answers.
|
| 25/2 |
2026/09/14 00:47 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/core/device.c FirstLine:1560 LineCount:60]
Results: map[Contents:1560: /*
1561: * We have a registration lock so that all the calls to unregister are
1562: * fully fenced, once any unregister returns the device is truly
1563: * unregistered even if multiple callers are unregistering it at the
1564: * same time. This also interacts with the registration flow and
1565: * provides sane semantics if register and unregister are racing.
1566: */
1567: mutex_lock(&ib_dev->unregistration_lock);
1568: if (!refcount_read(&ib_dev->refcount))
1569: goto out;
1570:
1571: disable_device(ib_dev);
1572: rdma_nl_notify_event(ib_dev, 0, RDMA_UNREGISTER_EVENT);
1573:
1574: /* Expedite removing unregistered pointers from the hash table */
1575: free_netdevs(ib_dev);
1576:
1577: ib_free_port_attrs(&ib_dev->coredev);
1578: device_del(&ib_dev->dev);
1579: ib_device_unregister_rdmacg(ib_dev);
1580: ib_cache_cleanup_one(ib_dev);
1581:
1582: /*
1583: * Drivers using the new flow may not call ib_dealloc_device except
1584: * in error unwind prior to registration success.
1585: */
1586: if (ib_dev->ops.dealloc_driver &&
1587: ib_dev->ops.dealloc_driver != prevent_dealloc_device) {
1588: WARN_ON(kref_read(&ib_dev->dev.kobj.kref) <= 1);
1589: ib_dealloc_device(ib_dev);
1590: }
1591: out:
1592: mutex_unlock(&ib_dev->unregistration_lock);
1593: }
1594:
1595: /**
1596: * ib_unregister_device - Unregister an IB device
1597: * @ib_dev: The device to unregister
1598: *
1599: * Unregister an IB device. All clients will receive a remove callback.
1600: *
1601: * Callers should call this routine only once, and protect against races with
1602: * registration. Typically it should only be called as part of a remove
1603: * callback in an implementation of driver core's struct device_driver and
1604: * related.
1605: *
1606: * If ops.dealloc_driver is used then ib_dev will be freed upon return from
1607: * this function.
1608: */
1609: void ib_unregister_device(struct ib_device *ib_dev)
1610: {
1611: get_device(&ib_dev->dev);
1612: __ib_unregister_device(ib_dev);
1613: put_device(&ib_dev->dev);
1614: }
1615: EXPORT_SYMBOL(ib_unregister_device);
1616:
1617: /**
1618: * ib_unregister_device_and_put - Unregister a device while holding a 'get'
1619: * @ib_dev: The device to unregister
]
|
| 26/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 22730
output: 41
thoughts: 31
Thoughts: Okay, here's my interpretation of what's going through my mind, pretending I'm an expert delving into that specific code section:
**Diving into `drivers/infiniband/core/device.c` - Line 1660-1700**
Alright, let's pull up that section of the device driver β lines 1660 to 1700 in `drivers/infiniband/core/device.c`. My initial expectation is we're probably looking at some core device initialization or perhaps a crucial error-handling sequence. Given the location within the core device file, it's highly likely we're dealing with either the device's lifecycle management, resource allocation, or a low-level interaction with the hardware. I need to quickly grasp the surrounding context to understand what we're actually *doing* in that specific block. Is this related to probing a new device, handling a device reset, or perhaps dealing with interrupts? Is there any indication from the surrounding code?
My primary concern is to look for any potential race conditions, memory leaks or locking mechanisms being used; those are the typical gotchas in device driver code. I'll need to pay close attention to the data structures being manipulated, and any external dependencies. I'm going to look for any calls to memory allocation or deallocation β `kmalloc`, `kfree`, etc. β and see how they're handled. A subtle memory leak in that area could be catastrophic, particularly within an IB driver which usually runs at high speed with low overhead. Any calls to spinlocks or mutexes warrant extra attention, particularly with a function call to `ib_` or `mlx_` being called, I need to know why and how we're protecting shared resources. Let me scan the code, and then I'll formulate a more precise hypothesis.
|
| 27/2 |
2026/09/14 00:47 |
tool |
read-file |
0m
Args: map[File:drivers/infiniband/core/device.c FirstLine:1660 LineCount:40]
Results: map[Contents:1660: down_read(&devices_rwsem);
1661: xa_for_each (&devices, index, ib_dev) {
1662: if (ib_dev->ops.driver_id != driver_id)
1663: continue;
1664:
1665: get_device(&ib_dev->dev);
1666: up_read(&devices_rwsem);
1667:
1668: WARN_ON(!ib_dev->ops.dealloc_driver);
1669: __ib_unregister_device(ib_dev);
1670:
1671: put_device(&ib_dev->dev);
1672: down_read(&devices_rwsem);
1673: }
1674: up_read(&devices_rwsem);
1675: }
1676: EXPORT_SYMBOL(ib_unregister_driver);
1677:
1678: static void ib_unregister_work(struct work_struct *work)
1679: {
1680: struct ib_device *ib_dev =
1681: container_of(work, struct ib_device, unregistration_work);
1682:
1683: __ib_unregister_device(ib_dev);
1684: put_device(&ib_dev->dev);
1685: }
1686:
1687: /**
1688: * ib_unregister_device_queued - Unregister a device using a work queue
1689: * @ib_dev: The device to unregister
1690: *
1691: * This schedules an asynchronous unregistration using a WQ for the device. A
1692: * driver should use this to avoid holding locks while doing unregistration,
1693: * such as holding the RTNL lock.
1694: *
1695: * Drivers using this API must use ib_unregister_driver before module unload
1696: * to ensure that all scheduled unregistrations have completed.
1697: */
1698: void ib_unregister_device_queued(struct ib_device *ib_dev)
1699: {
]
|
| 28/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 23795
output: 21
thoughts: 690
Thoughts: **My Analysis of Compat Device Lifecycle and Potential Race Condition**
Okay, let's break this down. My initial thought is that we're dealing with `cdev` (compat devices) linked to a network namespace (`rnet`) via `xa_load`. Each network namespace gets a compat device. The core issue seems to revolve around how these compat devices interact with the network namespace's lifecycle.
I need to understand how these compat devices are initialized. Looking at `add_one_compat_dev`, it becomes clear: the `cdev`'s parent is set, and crucially, `rdma_init_coredev` is called. This is where things get interesting. Specifically, `rdma_init_coredev` does a `write_pnet(&coredev->rdma_net, net)`. So, the `cdev` gets a pointer to the network namespace.
Now, does that write operation take a reference? No! It just assigns the pointer. *That's a potential weak link*.
Next, I need to see when this compat device is cleaned up. We see `rdma_dev_exit_net` removes the compat device for the network namespace. That's good, but timing is everything. It removes the entry from the network namespace specific structure.
Then I noticed something. `remove_one_compat_dev` can get called from `disable_device` during `ib_unregister_device`. Let's clarify: `ib_unregister_work` -> `__ib_unregister_device` -> `disable_device` -> `remove_compat_devs` -> `remove_one_compat_dev`. That means a call to `remove_one_compat_dev` is linked to an unregister event.
Now, if `device->compat_devs` still had a `cdev` whose `net` had already exited, that would be a problem. This is the crux of the race.
So, the question is: why *would* `device->compat_devs` still have a `cdev` whose network namespace has already disappeared? Or perhaps, could cleanup of the network namespace be happening in an order that's causing this? The question is about ordering!
The order of `pernet_operations` is probably key here. We need to analyze how `uevent_net_ops` and `rdma_dev_net_ops` are registered and their interaction during network namespace teardown. It's time to check the git log for relevant changes or similar issues, or really understand those registration sequences. This smells like a race condition between `net` destruction and `ib_unregister_device`.
|
| 29/2 |
2026/09/14 00:47 |
tool |
grepper |
0m
Args: map[Expression:register_pernet.*rdma]
Results: map[Output:drivers/infiniband/core/device.c=3217=static int __init ib_core_init(void)
--
drivers/infiniband/core/device.c-3273-
drivers/infiniband/core/device.c:3274: ret = register_pernet_device(&rdma_dev_net_ops);
drivers/infiniband/core/device.c-3275- if (ret) {
--
drivers/infiniband/core/device.c-3294- nldev_exit();
drivers/infiniband/core/device.c:3295: unregister_pernet_device(&rdma_dev_net_ops);
drivers/infiniband/core/device.c-3296-err_compat:
--
drivers/infiniband/core/device.c=3317=static void __exit ib_core_cleanup(void)
--
drivers/infiniband/core/device.c-3322- nldev_exit();
drivers/infiniband/core/device.c:3323: unregister_pernet_device(&rdma_dev_net_ops);
drivers/infiniband/core/device.c-3324- unregister_blocking_lsm_notifier(&ibdev_lsm_nb);
]
|
| 30/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 25420
output: 37
thoughts: 79
Thoughts: Here's my summary, as though I'm thinking through this myself:
**RDMA Device Registration Dilemma**
Okay, so I'm looking at these two registration functions, `register_pernet_device(&rdma_dev_net_ops)` versus `register_pernet_subsys(&uevent_net_ops)`. My immediate concern is the teardown order during net namespace cleanup. Specifically, I'm trying to remember how `cleanup_net` handles the pernet operations. Does it unload them in the *reverse* order they were registered, as one might logically expect, or is there something more nuanced going on? I really need to confirm this. Time to dig into the source code! I'll head straight to `cleanup_net` in `net/core/net_namespace.c` to refresh my memory and figure out the exact cleanup sequence. This will be critical for ensuring proper RDMA device teardown.
|
| 31/2 |
2026/09/14 00:47 |
tool |
read-file |
0m
Args: map[File:net/core/net_namespace.c FirstLine:690 LineCount:40]
Results: map[Contents: 690: *
691: * Note, that unhash_nsid() does not delete nsid links
692: * between net_kill_list's nets, as they've already
693: * deleted from net_namespace_list. But, this would be
694: * useless anyway, as netns_ids are destroyed there.
695: */
696: last = list_last_entry(&net_namespace_list, struct net, list);
697: up_write(&net_rwsem);
698:
699: unhash_nsid(last);
700:
701: llist_for_each_entry(net, net_kill_list, cleanup_list) {
702: idr_destroy(&net->netns_ids);
703: list_add_tail(&net->exit_list, &net_exit_list);
704: }
705:
706: ops_undo_list(&pernet_list, NULL, &net_exit_list, true);
707:
708: up_read(&pernet_ops_rwsem);
709:
710: /* Ensure there are no outstanding rcu callbacks using this
711: * network namespace.
712: */
713: rcu_barrier();
714:
715: net_complete_free();
716:
717: /* Finally it is safe to free my network namespace structure */
718: list_for_each_entry_safe(net, tmp, &net_exit_list, exit_list) {
719: list_del_init(&net->exit_list);
720: ns_common_free(net);
721: dec_net_namespaces(net->ucounts);
722: #ifdef CONFIG_KEYS
723: key_remove_domain(net->key_domain);
724: #endif
725: put_user_ns(net->user_ns);
726: net_passive_dec(net);
727: }
728: WRITE_ONCE(cleanup_net_task, NULL);
729: }
]
|
| 32/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 26365
output: 21
thoughts: 1093
Thoughts: **Analyzing a Potential Slab-Use-After-Free Vulnerability**
Okay, let's break this down. I'm looking at this free stack, and immediately, I see `kfree` in the `uevent_net_exit` function, which is the key here. It's freeing `net->uevent_sock`. That's important. I'm also seeing an asynchronous RDMA device unregistration happening, specifically through a workqueue called `ib_unregister_work`. This workqueue is calling into `device_del` which triggers a `kobject_uevent` call.
Now, the critical part is inside `kobject_uevent_net_broadcast`. This function figures out the relevant network namespace. Based on the stack, the `kobj->ktype->namespace` for `ib_class` returns `net_namespace`, which, in turn, returns `to_ns_common(net)`. This `net` represents the network namespace where the RDMA device (`cdev`) was created. The problem is, this very network namespace is undergoing cleanup, or has already completed `uevent_net_exit`, meaning `net->uevent_sock` has been freed!
Therefore, the `uevent_net_broadcast_tagged` function will try to access the freed `net->uevent_sock->sk` which is where the vulnerability comes in: slab-use-after-free! The timing is the key here: the device deletion triggers the uevent which references something that's already been freed. This seems like a textbook race condition caused by asynchronous device unregistration interfering with network namespace cleanup. The key is in the concurrent execution. Let's start looking for fixes...
|
| 33/2 |
2026/09/14 00:47 |
tool |
git-log |
0m
Args: map[MessageRegexps:[uevent_sock]]
Results:
|
| 34/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 27854
output: 20
thoughts: 41
Thoughts: Okay, here's my take on those thoughts, framed as an expert's internal monologue:
**Git Log Investigation - Time to Dust Off the Sleuthing Skills**
Right, let's see what the commit history reveals. I need to track down any changes related to `remove_compat_devs`, `compat_devs`, `kobject_uevent_net_broadcast`, or even just `uevent_sock`. It's a bit of a scattershot approach, but these are all potential hotspots for the issue I'm chasing. `remove_compat_devs` screams device compatibility, which is always a fun area, and `kobject_uevent_net_broadcast` and `uevent_sock` immediately suggest kernel eventing and network interaction, so they're on the radar as possible culprits. I'll start with those keywords and see where the trail leads. This could turn into a deep dive, but at least this gives me a solid starting point for the investigation. Let's start the queries and see what turns up.
|
| 35/2 |
2026/09/14 00:47 |
tool |
git-log |
0m
Args: map[MessageRegexps:[compat_dev]]
Results:
|
| 36/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 28152
output: 39
thoughts: 27
Thoughts: Here's a summary of my thought process, as requested:
**Investigating Infiniband Device Compatibility**
Okay, so I need to dive into some Infiniband driver compatibility issues, specifically around the `device.c` file within the `drivers/infiniband/core/` directory. My immediate thought is to use `git log` to trace the history of this file, but I'm going to focus my search with a `PathPrefix` parameter. This will allow me to zero in on relevant commits without getting bogged down in unrelated changes. The key word I'm looking for is "compat," which will act as a filter to help identify commits that specifically address compatibility concerns, potentially between different versions, hardware revisions, or kernel configurations. This approach should quickly narrow down the results to commits that could shed light on the current problem I'm investigating.
|
| 37/2 |
2026/09/14 00:47 |
tool |
git-log |
0m
Args: map[CodeRegexp:compat_devs PathPrefix:drivers/infiniband/core/device.c]
Results: map[Output:5445d6419962 arm64: Don't read GMID_EL1 when MTE is disabled
]
|
| 38/2 |
2026/09/14 00:47 |
llm |
expert |
0m
Model:
Tokens:
input: 28443
output: 33
thoughts: 28
Thoughts: Here's a summary of my thought process:
**Diving into the Infiniband Device Code History**
Okay, I need to get a handle on recent changes in the Infiniband driver, specifically the core device handling code. Let's see... the logical first step is to check the `git log` for the file `drivers/infiniband/core/device.c`. That'll give me a timeline of commits, which is exactly what I need to understand what's been going on in that part of the codebase recently. From there I'll be able to see the commit messages and any associated context.
|
| 39/2 |
2026/09/14 00:48 |
tool |
git-log |
0m
Args: map[Count:10 PathPrefix:drivers/infiniband/core/device.c]
Results: map[Output:5445d6419962 arm64: Don't read GMID_EL1 when MTE is disabled
]
|
| 40/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 28681
output: 29
thoughts: 24
Thoughts: Here's my take on those thoughts:
**Evaluating Potential Limitations**
Alright, I'm thinking here⦠the default settings of this system, or perhaps even the way it's counting things, might be subtly restricting my results. I need to be sure I'm getting a complete picture. So, my instinct is to test that assumption. Let's see if the issue is with the `Since` parameter. I'll test the process, first without any date restriction at all, and then perhaps try a much broader time window. This will tell me if I'm hitting some kind of inherent limit, either on the data retrieved or on the method itself. It's a fundamental step in ensuring the validity of my analysis, and avoiding misleading results due to overlooked data.
|
| 41/2 |
2026/09/14 00:48 |
tool |
git-log |
0m
Args: map[Count:5 PathPrefix:lib/kobject_uevent.c]
Results: map[Output:5445d6419962 arm64: Don't read GMID_EL1 when MTE is disabled
]
|
| 42/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 28940
output: 20
thoughts: 12
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Examining the Current Commit**
Okay, so I'm thinking, let's just quickly check what's going on at the current `HEAD`. I need a quick overview. Rather than pulling up the whole commit log or starting a diff, `git show` on `HEAD` seems like the perfect, fast way to get a snapshot of the commit. This will give me the commit message, the author, the date, and most importantly, the patch itself. Depending on what I'm looking for, this might be all I need, especially if I have a hunch about recent changes. Itβs a good starting point for a quick investigation. If it doesn't give me what I need, then I can always move on to more complicated tools.
|
| 43/2 |
2026/09/14 00:48 |
tool |
git-show |
0m
Args: map[Commit:HEAD Stat:true]
Results: map[Output:commit 5445d64199626974269fcdf347769ad44b0bb53b
Author: Fuad Tabba <fuad.tabba@linux.dev>
Date: Thu Aug 27 19:59:37 2026 +0100
arm64: Don't read GMID_EL1 when MTE is disabled
__cpuinfo_store_cpu() gates the GMID_EL1 read on the raw
ID_AA64PFR1_EL1, so it reads the register even when the kernel has
disabled MTE (CONFIG_ARM64_MTE=n or arm64.nomte). KVM sets HCR_EL2.TID5
in that case, and pKVM injects an UNDEF the host cannot handle:
Internal error: Oops - Undefined instruction: 0000000002000000 [#1] SMP
pc : __cpuinfo_store_cpu+0xf4/0x264
Kernel panic - not syncing: Attempted to kill the idle task!
Only pKVM reaches it, and only after a CPU is offlined and brought back
online: its CPU_ON relay sets the host HCR before the CPU enters EL1,
while plain nVHE sets it at CPUHP_AP_KVM_ONLINE.
Gate the read on the CPU's own ID_AA64PFR1_EL1 with the command-line
override applied, and on CONFIG_ARM64_MTE, which no register reflects.
The boot CPU stores its registers before init_cpu_features() strips an
unsafe override, so clamp against the hardware value here too.
Fixes: f35abcbb8a084 ("KVM: arm64: Trap MTE access and discovery when MTE is disabled")
Cc: stable@vger.kernel.org
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
.clang-format | 808 +
.clippy.toml | 21 +
.cocciconfig | 3 +
.editorconfig | 27 +
.get_maintainer.ignore | 9 +
.gitattributes | 5 +
.gitignore | 196 +
.mailmap | 989 +
.pylintrc | 2 +
.rustfmt.toml | 12 +
COPYING | 20 +
CREDITS | 4643 +
Documentation/.gitignore | 3 +
Documentation/.renames.txt | 1185 +
Documentation/ABI/README | 98 +
.../ABI/obsolete/automount-tracefs-debugfs | 20 +
Documentation/ABI/obsolete/o2cb | 11 +
Documentation/ABI/obsolete/procfs-i8k | 10 +
Documentation/ABI/obsolete/sysfs-bus-iio | 174 +
Documentation/ABI/obsolete/sysfs-bus-usb | 31 +
Documentation/ABI/obsolete/sysfs-class-typec | 48 +
Documentation/ABI/obsolete/sysfs-cpuidle | 9 +
.../ABI/obsolete/sysfs-driver-hid-roccat-arvo | 53 +
.../ABI/obsolete/sysfs-driver-hid-roccat-isku | 153 +
.../ABI/obsolete/sysfs-driver-hid-roccat-koneplus | 145 +
.../ABI/obsolete/sysfs-driver-hid-roccat-konepure | 105 +
.../ABI/obsolete/sysfs-driver-hid-roccat-kovaplus | 116 +
.../ABI/obsolete/sysfs-driver-hid-roccat-lua | 7 +
.../ABI/obsolete/sysfs-driver-hid-roccat-pyra | 126 +
.../ABI/obsolete/sysfs-driver-hid-roccat-ryos | 178 +
.../ABI/obsolete/sysfs-driver-hid-roccat-savu | 77 +
.../ABI/obsolete/sysfs-driver-intel_pmc_bxt | 22 +
Documentation/ABI/obsolete/sysfs-driver-ivpu | 30 +
.../ABI/obsolete/sysfs-driver-samsung-laptop | 10 +
Documentation/ABI/obsolete/sysfs-firmware-acpi | 8 +
Documentation/ABI/obsolete/sysfs-gpio | 40 +
.../ABI/obsolete/sysfs-kernel-fadump_enabled | 9 +
.../ABI/obsolete/sysfs-kernel-fadump_registered | 10 +
.../ABI/obsolete/sysfs-kernel-fadump_release_mem | 10 +
.../ABI/obsolete/sysfs-kernel-kexec-kdump | 71 +
.../ABI/obsolete/sysfs-platform-ideapad-laptop | 8 +
Documentation/ABI/removed/devfs | 13 +
Documentation/ABI/removed/dv1394 | 14 +
Documentation/ABI/removed/ip_queue | 9 +
Documentation/ABI/removed/net_dma | 8 +
Documentation/ABI/removed/o2cb | 10 +
Documentation/ABI/removed/raw1394 | 16 +
Documentation/ABI/removed/sysfs-bus-nfit | 17 +
Documentation/ABI/removed/sysfs-class-cxl | 272 +
Documentation/ABI/removed/sysfs-class-rfkill | 13 +
Documentation/ABI/removed/sysfs-firmware-efi-vars | 12 +
.../removed/sysfs-kernel-fadump_release_opalcore | 9 +
Documentation/ABI/removed/sysfs-kernel-uids | 14 +
Documentation/ABI/removed/sysfs-mce | 37 +
.../ABI/removed/sysfs-selinux-checkreqprot | 26 +
Documentation/ABI/removed/sysfs-selinux-disable | 29 +
Documentation/ABI/removed/sysfs-selinux-user | 12 +
Documentation/ABI/removed/video1394 | 17 +
Documentation/ABI/stable/configfs-nvmet | 352 +
Documentation/ABI/stable/firewire-cdev | 111 +
Documentation/ABI/stable/o2cb | 10 +
Documentation/ABI/stable/procfs-audit_loginuid | 27 +
Documentation/ABI/stable/syscalls | 10 +
Documentation/ABI/stable/sysfs-acpi-pmprofile | 28 +
Documentation/ABI/stable/sysfs-block | 941 +
Documentation/ABI/stable/sysfs-bus-firewire | 136 +
Documentation/ABI/stable/sysfs-bus-fsl-mc | 19 +
Documentation/ABI/stable/sysfs-bus-mhi | 44 +
Documentation/ABI/stable/sysfs-bus-nvmem | 50 +
Documentation/ABI/stable/sysfs-bus-usb | 142 +
Documentation/ABI/stable/sysfs-bus-vmbus | 187 +
Documentation/ABI/stable/sysfs-bus-w1 | 12 +
Documentation/ABI/stable/sysfs-bus-xen-backend | 84 +
Documentation/ABI/stable/sysfs-class-backlight | 63 +
Documentation/ABI/stable/sysfs-class-bluetooth | 9 +
Documentation/ABI/stable/sysfs-class-infiniband | 784 +
Documentation/ABI/stable/sysfs-class-rfkill | 93 +
Documentation/ABI/stable/sysfs-class-tpm | 210 +
Documentation/ABI/stable/sysfs-class-ubi | 221 +
Documentation/ABI/stable/sysfs-class-udc | 93 +
Documentation/ABI/stable/sysfs-devices | 32 +
Documentation/ABI/stable/sysfs-devices-node | 238 +
Documentation/ABI/stable/sysfs-devices-system-cpu | 117 +
.../ABI/stable/sysfs-devices-system-xen_memory | 86 +
Documentation/ABI/stable/sysfs-driver-aspeed-vuart | 24 +
Documentation/ABI/stable/sysfs-driver-dma-idxd | 376 +
Documentation/ABI/stable/sysfs-driver-dma-ioatdma | 30 +
.../ABI/stable/sysfs-driver-firmware-zynqmp | 256 +
Documentation/ABI/stable/sysfs-driver-ib_srp | 192 +
Documentation/ABI/stable/sysfs-driver-misc-cp500 | 25 +
Documentation/ABI/stable/sysfs-driver-mlxreg-io | 815 +
Documentation/ABI/stable/sysfs-driver-qaic | 19 +
Documentation/ABI/stable/sysfs-driver-qla2xxx | 8 +
Documentation/ABI/stable/sysfs-driver-speakup | 394 +
Documentation/ABI/stable/sysfs-driver-usb-usbtmc | 27 +
Documentation/ABI/stable/sysfs-driver-w1_ds2438 | 13 +
Documentation/ABI/stable/sysfs-driver-w1_ds28e04 | 15 +
Documentation/ABI/stable/sysfs-driver-w1_ds28ea00 | 6 +
Documentation/ABI/stable/sysfs-firmware-opal-dump | 46 +
Documentation/ABI/stable/sysfs-firmware-opal-elog | 62 +
Documentation/ABI/stable/sysfs-fs-orangefs | 87 +
Documentation/ABI/stable/sysfs-hypervisor-xen | 135 +
Documentation/ABI/stable/sysfs-kernel-notes | 5 +
.../ABI/stable/sysfs-kernel-time-aux-clocks | 5 +
Documentation/ABI/stable/sysfs-module | 47 +
Documentation/ABI/stable/sysfs-nvme | 453 +
Documentation/ABI/stable/sysfs-platform-wmi-bmof | 7 +
Documentation/ABI/stable/sysfs-transport-srp | 58 +
Documentation/ABI/stable/thermal-notification | 4 +
Documentation/ABI/stable/vdso | 37 +
Documentation/ABI/testing/amdpmf-interface | 73 +
Documentation/ABI/testing/configfs-acpi | 52 +
Documentation/ABI/testing/configfs-iio | 34 +
Documentation/ABI/testing/configfs-most | 241 +
Documentation/ABI/testing/configfs-rdma_cm | 34 +
.../ABI/testing/configfs-spear-pcie-gadget | 33 +
Documentation/ABI/testing/configfs-stp-policy | 48 +
.../ABI/testing/configfs-stp-policy-p_sys-t | 41 +
.../ABI/testing/configfs-thunderbolt_stream | 98 +
Documentation/ABI/testing/configfs-tsm-report | 161 +
Documentation/ABI/testing/configfs-usb-gadget | 158 +
Documentation/ABI/testing/configfs-usb-gadget-acm | 15 +
Documentation/ABI/testing/configfs-usb-gadget-ecm | 20 +
Documentation/ABI/testing/configfs-usb-gadget-eem | 16 +
Documentation/ABI/testing/configfs-usb-gadget-ffs | 17 +
Documentation/ABI/testing/configfs-usb-gadget-hid | 13 +
.../ABI/testing/configfs-usb-gadget-loopback | 10 +
.../ABI/testing/configfs-usb-gadget-mass-storage | 41 +
Documentation/ABI/testing/configfs-usb-gadget-midi | 15 +
.../ABI/testing/configfs-usb-gadget-midi2 | 54 +
Documentation/ABI/testing/configfs-usb-gadget-ncm | 15 +
Documentation/ABI/testing/configfs-usb-gadget-obex | 9 +
.../ABI/testing/configfs-usb-gadget-phonet | 8 +
.../ABI/testing/configfs-usb-gadget-printer | 11 +
.../ABI/testing/configfs-usb-gadget-rndis | 19 +
.../ABI/testing/configfs-usb-gadget-serial | 9 +
.../ABI/testing/configfs-usb-gadget-sourcesink | 16 +
.../ABI/testing/configfs-usb-gadget-subset | 16 +
Documentation/ABI/testing/configfs-usb-gadget-tcm | 6 +
Documentation/ABI/testing/configfs-usb-gadget-uac1 | 41 +
.../ABI/testing/configfs-usb-gadget-uac1_legacy | 9 +
Documentation/ABI/testing/configfs-usb-gadget-uac2 | 51 +
Documentation/ABI/testing/configfs-usb-gadget-uvc | 438 +
Documentation/ABI/testing/debugfs-alienware-wmi | 64 +
Documentation/ABI/testing/debugfs-amd-iommu | 131 +
Documentation/ABI/testing/debugfs-cdns-pcie | 5 +
Documentation/ABI/testing/debugfs-cec-error-inj | 40 +
Documentation/ABI/testing/debugfs-cros-ec | 78 +
Documentation/ABI/testing/debugfs-cxl | 157 +
Documentation/ABI/testing/debugfs-dell-wmi-ddv | 34 +
Documentation/ABI/testing/debugfs-driver-dcc | 127 +
Documentation/ABI/testing/debugfs-driver-genwqe | 91 +
.../ABI/testing/debugfs-driver-habanalabs | 323 +
Documentation/ABI/testing/debugfs-driver-qat | 109 +
.../ABI/testing/debugfs-driver-qat_telemetry | 259 +
Documentation/ABI/testing/debugfs-dwc-pcie | 157 +
Documentation/ABI/testing/debugfs-ec | 21 +
Documentation/ABI/testing/debugfs-hisi-hpre | 200 +
Documentation/ABI/testing/debugfs-hisi-migration | 25 +
Documentation/ABI/testing/debugfs-hisi-sec | 173 +
Documentation/ABI/testing/debugfs-hisi-zip | 174 +
Documentation/ABI/testing/debugfs-hyperv | 23 +
Documentation/ABI/testing/debugfs-ideapad | 19 +
Documentation/ABI/testing/debugfs-iio-ad9467 | 39 +
Documentation/ABI/testing/debugfs-iio-backend | 20 +
Documentation/ABI/testing/debugfs-intel-iommu | 276 +
Documentation/ABI/testing/debugfs-moxtet | 35 +
Documentation/ABI/testing/debugfs-msi-wmi-platform | 14 +
Documentation/ABI/testing/debugfs-olpc | 16 +
Documentation/ABI/testing/debugfs-pcie-ptm | 70 +
Documentation/ABI/testing/debugfs-pfo-nx-crypto | 45 +
Documentation/ABI/testing/debugfs-scmi | 70 +
Documentation/ABI/testing/debugfs-scmi-raw | 208 +
Documentation/ABI/testing/debugfs-tpmi | 40 +
Documentation/ABI/testing/debugfs-vfio | 57 +
Documentation/ABI/testing/debugfs-wilco-ec | 45 +
Documentation/ABI/testing/dell-smbios-wmi | 41 +
Documentation/ABI/testing/dev-kmsg | 127 +
Documentation/ABI/testing/devlink-resource-mlxsw | 33 +
Documentation/ABI/testing/evm | 109 +
Documentation/ABI/testing/gpio-cdev | 28 +
Documentation/ABI/testing/ima_policy | 193 +
Documentation/ABI/testing/ppc-memtrace | 46 +
Documentation/ABI/testing/procfs-attr-current | 20 +
Documentation/ABI/testing/procfs-attr-exec | 20 +
Documentation/ABI/testing/procfs-attr-prev | 19 +
Documentation/ABI/testing/procfs-diskstats | 43 +
.../ABI/testing/procfs-nfsd-reply_cache_stats | 38 +
Documentation/ABI/testing/procfs-smaps_rollup | 42 +
Documentation/ABI/testing/pstore | 47 +
Documentation/ABI/testing/rtc-cdev | 50 +
Documentation/ABI/testing/securityfs-secrets-coco | 51 +
Documentation/ABI/testing/sysfs-amd-pmc | 13 +
Documentation/ABI/testing/sysfs-amd-pmf | 13 +
Documentation/ABI/testing/sysfs-ata | 140 +
.../ABI/testing/sysfs-auxdisplay-linedisp | 90 +
Documentation/ABI/testing/sysfs-block-aoe | 45 +
Documentation/ABI/testing/sysfs-block-bcache | 149 +
Documentation/ABI/testing/sysfs-block-device | 119 +
Documentation/ABI/testing/sysfs-block-dm | 47 +
Documentation/ABI/testing/sysfs-block-loop | 50 +
Documentation/ABI/testing/sysfs-block-rnbd | 64 +
Documentation/ABI/testing/sysfs-block-rssd | 5 +
Documentation/ABI/testing/sysfs-block-zram | 166 +
Documentation/ABI/testing/sysfs-bus-acpi | 98 +
Documentation/ABI/testing/sysfs-bus-amba | 20 +
Documentation/ABI/testing/sysfs-bus-auxiliary | 9 +
Documentation/ABI/testing/sysfs-bus-bcma | 31 +
Documentation/ABI/testing/sysfs-bus-cdx | 121 +
Documentation/ABI/testing/sysfs-bus-coreboot | 45 +
.../ABI/testing/sysfs-bus-coresight-devices-cti | 247 +
.../sysfs-bus-coresight-devices-dummy-source | 21 +
.../ABI/testing/sysfs-bus-coresight-devices-etb10 | 88 +
.../ABI/testing/sysfs-bus-coresight-devices-etm3x | 328 +
.../ABI/testing/sysfs-bus-coresight-devices-etm4x | 532 +
.../ABI/testing/sysfs-bus-coresight-devices-funnel | 18 +
.../ABI/testing/sysfs-bus-coresight-devices-stm | 59 +
.../ABI/testing/sysfs-bus-coresight-devices-tmc | 115 +
.../ABI/testing/sysfs-bus-coresight-devices-tpda | 69 +
.../ABI/testing/sysfs-bus-coresight-devices-tpdm | 290 +
.../ABI/testing/sysfs-bus-coresight-devices-trbe | 20 +
.../testing/sysfs-bus-coresight-devices-ultra_smb | 31 +
Documentation/ABI/testing/sysfs-bus-counter | 477 +
Documentation/ABI/testing/sysfs-bus-css | 56 +
Documentation/ABI/testing/sysfs-bus-cxl | 646 +
Documentation/ABI/testing/sysfs-bus-dax | 177 +
Documentation/ABI/testing/sysfs-bus-dfl | 17 +
.../ABI/testing/sysfs-bus-dfl-devices-emif | 25 +
.../ABI/testing/sysfs-bus-dfl-devices-n3000-nios | 47 +
.../ABI/testing/sysfs-bus-event_source-devices | 24 +
.../testing/sysfs-bus-event_source-devices-caps | 24 +
.../testing/sysfs-bus-event_source-devices-dfl_fme | 104 +
.../ABI/testing/sysfs-bus-event_source-devices-dsa | 30 +
.../testing/sysfs-bus-event_source-devices-events | 102 +
.../testing/sysfs-bus-event_source-devices-format | 21 +
.../sysfs-bus-event_source-devices-hisi_ptt | 113 +
.../testing/sysfs-bus-event_source-devices-hv_24x7 | 98 +
.../testing/sysfs-bus-event_source-devices-hv_gpci | 242 +
.../testing/sysfs-bus-event_source-devices-iommu | 37 +
.../testing/sysfs-bus-event_source-devices-rdpmc | 44 +
.../testing/sysfs-bus-event_source-devices-uncore | 13 +
.../testing/sysfs-bus-event_source-devices-vpa-dtl | 25 +
.../testing/sysfs-bus-event_source-devices-vpa-pmu | 25 +
Documentation/ABI/testing/sysfs-bus-fcoe | 138 +
Documentation/ABI/testing/sysfs-bus-fsi | 46 +
.../ABI/testing/sysfs-bus-fsi-devices-sbefifo | 10 +
Documentation/ABI/testing/sysfs-bus-fsl-mc | 25 +
Documentation/ABI/testing/sysfs-bus-hsi | 19 +
.../ABI/testing/sysfs-bus-i2c-devices-bq32k | 7 +
.../ABI/testing/sysfs-bus-i2c-devices-fsa9480 | 27 +
.../ABI/testing/sysfs-bus-i2c-devices-hm6352 | 21 +
.../ABI/testing/sysfs-bus-i2c-devices-lm3533 | 15 +
.../ABI/testing/sysfs-bus-i2c-devices-m24lr | 100 +
.../ABI/testing/sysfs-bus-i2c-devices-pca954x | 23 +
.../testing/sysfs-bus-i2c-devices-turris-omnia-mcu | 113 +
Documentation/ABI/testing/sysfs-bus-i3c | 194 +
Documentation/ABI/testing/sysfs-bus-iio | 2511 +
.../ABI/testing/sysfs-bus-iio-accel-adxl372 | 7 +
.../ABI/testing/sysfs-bus-iio-accel-bmc150 | 7 +
Documentation/ABI/testing/sysfs-bus-iio-ad9739a | 19 +
.../ABI/testing/sysfs-bus-iio-adc-ad-sigma-delta | 23 +
Documentation/ABI/testing/sysfs-bus-iio-adc-ad4130 | 20 +
Documentation/ABI/testing/sysfs-bus-iio-adc-ad7192 | 27 +
.../ABI/testing/sysfs-bus-iio-adc-ad7280a | 13 +
.../testing/sysfs-bus-iio-adc-envelope-detector | 39 +
Documentation/ABI/testing/sysfs-bus-iio-adc-hi8435 | 48 +
.../ABI/testing/sysfs-bus-iio-adc-max11410 | 13 +
.../ABI/testing/sysfs-bus-iio-adc-mcp3564 | 53 +
Documentation/ABI/testing/sysfs-bus-iio-adc-mt6360 | 78 +
.../ABI/testing/sysfs-bus-iio-adc-pac1934 | 9 +
Documentation/ABI/testing/sysfs-bus-iio-adc-stm32 | 21 +
Documentation/ABI/testing/sysfs-bus-iio-bno055 | 81 +
Documentation/ABI/testing/sysfs-bus-iio-cdc-ad7746 | 11 +
.../ABI/testing/sysfs-bus-iio-chemical-sgp40 | 17 +
.../ABI/testing/sysfs-bus-iio-chemical-sunrise-co2 | 38 +
.../ABI/testing/sysfs-bus-iio-chemical-vz89x | 7 +
Documentation/ABI/testing/sysfs-bus-iio-cros-ec | 21 +
Documentation/ABI/testing/sysfs-bus-iio-dac | 61 +
Documentation/ABI/testing/sysfs-bus-iio-dac-ad5766 | 31 +
.../ABI/testing/sysfs-bus-iio-dac-dpot-dac | 8 +
.../ABI/testing/sysfs-bus-iio-dac-ltc2688 | 55 +
.../ABI/testing/sysfs-bus-iio-dfsdm-adc-stm32 | 22 +
.../ABI/testing/sysfs-bus-iio-distance-srf08 | 17 +
Documentation/ABI/testing/sysfs-bus-iio-dma-buffer | 19 +
.../ABI/testing/sysfs-bus-iio-filter-admv8818 | 18 +
Documentation/ABI/testing/sysfs-bus-iio-flow | 21 +
Documentation/ABI/testing/sysfs-bus-iio-frequency | 11 +
.../ABI/testing/sysfs-bus-iio-frequency-ad9523 | 31 +
.../ABI/testing/sysfs-bus-iio-frequency-adf4350 | 11 +
.../ABI/testing/sysfs-bus-iio-frequency-adf4371 | 11 +
.../ABI/testing/sysfs-bus-iio-frequency-admv1013 | 38 +
.../ABI/testing/sysfs-bus-iio-frequency-admv1014 | 23 +
.../ABI/testing/sysfs-bus-iio-gyro-bmg160 | 7 +
.../ABI/testing/sysfs-bus-iio-health-afe440x | 39 +
Documentation/ABI/testing/sysfs-bus-iio-humidity | 10 +
.../sysfs-bus-iio-impedance-analyzer-ad5933 | 35 +
Documentation/ABI/testing/sysfs-bus-iio-ina2xx-adc | 15 +
.../ABI/testing/sysfs-bus-iio-inv_icm42600 | 18 +
Documentation/ABI/testing/sysfs-bus-iio-isl29501 | 47 +
.../ABI/testing/sysfs-bus-iio-light-isl29018 | 21 +
.../ABI/testing/sysfs-bus-iio-light-lm3533-als | 56 +
.../ABI/testing/sysfs-bus-iio-light-si1133 | 22 +
.../ABI/testing/sysfs-bus-iio-light-tsl2583 | 20 +
.../ABI/testing/sysfs-bus-iio-light-tsl2772 | 13 +
.../ABI/testing/sysfs-bus-iio-magnetometer-hmc5843 | 20 +
Documentation/ABI/testing/sysfs-bus-iio-meas-spec | 7 +
Documentation/ABI/testing/sysfs-bus-iio-mpu6050 | 13 +
.../testing/sysfs-bus-iio-potentiometer-mcp4531 | 8 +
Documentation/ABI/testing/sysfs-bus-iio-proximity | 24 +
.../ABI/testing/sysfs-bus-iio-proximity-as3935 | 15 +
.../ABI/testing/sysfs-bus-iio-resolver-ad2s1210 | 27 +
Documentation/ABI/testing/sysfs-bus-iio-sps30 | 28 +
Documentation/ABI/testing/sysfs-bus-iio-sx9310 | 10 +
Documentation/ABI/testing/sysfs-bus-iio-sx9324 | 29 +
.../ABI/testing/sysfs-bus-iio-thermocouple | 18 +
.../ABI/testing/sysfs-bus-iio-timer-stm32 | 143 +
.../ABI/testing/sysfs-bus-iio-trigger-sysfs | 42 +
Documentation/ABI/testing/sysfs-bus-iio-vf610 | 16 +
.../ABI/testing/sysfs-bus-intel_th-devices-gth | 52 +
.../ABI/testing/sysfs-bus-intel_th-devices-msc | 54 +
.../ABI/testing/sysfs-bus-intel_th-devices-pti | 24 +
.../ABI/testing/sysfs-bus-intel_th-output-devices | 15 +
Documentation/ABI/testing/sysfs-bus-mcb | 29 +
Documentation/ABI/testing/sysfs-bus-mdio | 72 +
Documentation/ABI/testing/sysfs-bus-media | 6 +
Documentation/ABI/testing/sysfs-bus-mei | 56 +
Documentation/ABI/testing/sysfs-bus-mmc | 4 +
Documentation/ABI/testing/sysfs-bus-most | 299 +
Documentation/ABI/testing/sysfs-bus-moxtet-devices | 17 +
Documentation/ABI/testing/sysfs-bus-nfit | 233 +
Documentation/ABI/testing/sysfs-bus-nvdimm | 60 +
Documentation/ABI/testing/sysfs-bus-optee-devices | 17 +
Documentation/ABI/testing/sysfs-bus-papr-pmem | 75 +
Documentation/ABI/testing/sysfs-bus-pci | 704 +
.../ABI/testing/sysfs-bus-pci-devices-aer | 163 +
.../ABI/testing/sysfs-bus-pci-devices-avs | 8 +
.../ABI/testing/sysfs-bus-pci-devices-catpt | 17 +
.../ABI/testing/sysfs-bus-pci-devices-cciss | 80 +
.../ABI/testing/sysfs-bus-pci-devices-pvpanic | 26 +
.../ABI/testing/sysfs-bus-pci-drivers-btintel_pcie | 15 +
.../ABI/testing/sysfs-bus-pci-drivers-ehci_hcd | 46 +
.../ABI/testing/sysfs-bus-pci-drivers-janz-cmodio | 8 +
.../ABI/testing/sysfs-bus-pci-drivers-xhci_hcd | 129 +
Documentation/ABI/testing/sysfs-bus-peci | 16 +
Documentation/ABI/testing/sysfs-bus-platform | 56 +
.../sysfs-bus-platform-devices-ampere-smpro | 325 +
.../testing/sysfs-bus-platform-devices-occ-hwmon | 13 +
.../sysfs-bus-platform-drivers-amd_x3d_vcache | 12 +
.../ABI/testing/sysfs-bus-platform-onboard-usb-dev | 9 +
Documentation/ABI/testing/sysfs-bus-rapidio | 201 +
Documentation/ABI/testing/sysfs-bus-rbd | 173 +
Documentation/ABI/testing/sysfs-bus-rpmsg | 95 +
Documentation/ABI/testing/sysfs-bus-siox | 90 +
.../ABI/testing/sysfs-bus-soundwire-master | 23 +
.../ABI/testing/sysfs-bus-soundwire-slave | 109 +
.../ABI/testing/sysfs-bus-spi-devices-spi-nor | 40 +
.../testing/sysfs-bus-surface_aggregator-tabletsw | 57 +
Documentation/ABI/testing/sysfs-bus-thunderbolt | 370 +
Documentation/ABI/testing/sysfs-bus-typec | 51 +
Documentation/ABI/testing/sysfs-bus-usb | 607 +
.../ABI/testing/sysfs-bus-usb-devices-usbsevseg | 46 +
Documentation/ABI/testing/sysfs-bus-usb-lvstest | 60 +
Documentation/ABI/testing/sysfs-bus-vdpa | 57 +
Documentation/ABI/testing/sysfs-bus-vfio-mdev | 113 +
Documentation/ABI/testing/sysfs-bus-vmbus | 21 +
Documentation/ABI/testing/sysfs-bus-wmi | 81 +
Documentation/ABI/testing/sysfs-c2port | 81 +
Documentation/ABI/testing/sysfs-cfq-target-latency | 8 +
Documentation/ABI/testing/sysfs-class | 16 +
Documentation/ABI/testing/sysfs-class-backlight | 186 +
.../testing/sysfs-class-backlight-driver-lm3533 | 54 +
.../ABI/testing/sysfs-class-backlight-lm3639 | 11 +
Documentation/ABI/testing/sysfs-class-bdi | 134 +
Documentation/ABI/testing/sysfs-class-bsr | 25 +
Documentation/ABI/testing/sysfs-class-chromeos | 53 +
.../sysfs-class-chromeos-driver-cros-ec-lightbar | 74 +
.../sysfs-class-chromeos-driver-cros-ec-vbc | 6 +
Documentation/ABI/testing/sysfs-class-devfreq | 143 +
.../ABI/testing/sysfs-class-devfreq-event | 25 +
Documentation/ABI/testing/sysfs-class-devlink | 130 +
Documentation/ABI/testing/sysfs-class-drm | 8 +
Documentation/ABI/testing/sysfs-class-extcon | 101 +
Documentation/ABI/testing/sysfs-class-fc | 27 +
Documentation/ABI/testing/sysfs-class-fc_host | 23 +
.../ABI/testing/sysfs-class-fc_remote_ports | 23 +
Documentation/ABI/testing/sysfs-class-firmware | 77 +
.../ABI/testing/sysfs-class-firmware-attributes | 494 +
Documentation/ABI/testing/sysfs-class-fpga-bridge | 11 +
Documentation/ABI/testing/sysfs-class-fpga-manager | 60 +
Documentation/ABI/testing/sysfs-class-fpga-region | 9 +
Documentation/ABI/testing/sysfs-class-gnss | 17 +
Documentation/ABI/testing/sysfs-class-hwmon | 1089 +
.../ABI/testing/sysfs-class-ieee80211-rtw89 | 24 +
Documentation/ABI/testing/sysfs-class-intel_pmt | 119 +
.../ABI/testing/sysfs-class-intel_pmt-features | 134 +
Documentation/ABI/testing/sysfs-class-iommu | 17 +
.../ABI/testing/sysfs-class-iommu-amd-iommu | 14 +
.../ABI/testing/sysfs-class-iommu-intel-iommu | 32 +
Documentation/ABI/testing/sysfs-class-issei | 73 +
Documentation/ABI/testing/sysfs-class-lcd | 23 +
Documentation/ABI/testing/sysfs-class-led | 89 +
.../ABI/testing/sysfs-class-led-driver-aw200xx | 5 +
.../ABI/testing/sysfs-class-led-driver-lm3533 | 73 +
.../testing/sysfs-class-led-driver-turris-omnia | 28 +
Documentation/ABI/testing/sysfs-class-led-flash | 89 +
.../ABI/testing/sysfs-class-led-multicolor | 37 +
.../ABI/testing/sysfs-class-led-trigger-netdev | 192 +
.../ABI/testing/sysfs-class-led-trigger-oneshot | 36 +
.../ABI/testing/sysfs-class-led-trigger-pattern | 50 +
.../ABI/testing/sysfs-class-led-trigger-tty | 62 +
.../ABI/testing/sysfs-class-led-trigger-usbport | 13 +
Documentation/ABI/testing/sysfs-class-leds-gt683r | 18 +
Documentation/ABI/testing/sysfs-class-mei | 105 +
Documentation/ABI/testing/sysfs-class-mic | 178 +
Documentation/ABI/testing/sysfs-class-mtd | 242 +
Documentation/ABI/testing/sysfs-class-mux | 16 +
Documentation/ABI/testing/sysfs-class-net | 354 +
Documentation/ABI/testing/sysfs-class-net-cdc_ncm | 168 +
Documentation/ABI/testing/sysfs-class-net-dsa | 14 +
Documentation/ABI/testing/sysfs-class-net-grcan | 35 +
.../ABI/testing/sysfs-class-net-janz-ican3 | 19 +
Documentation/ABI/testing/sysfs-class-net-peak_usb | 19 +
Documentation/ABI/testing/sysfs-class-net-phydev | 75 +
Documentation/ABI/testing/sysfs-class-net-qmi | 76 +
Documentation/ABI/testing/sysfs-class-net-queues | 121 +
.../ABI/testing/sysfs-class-net-statistics | 217 +
Documentation/ABI/testing/sysfs-class-ocxl | 51 +
.../ABI/testing/sysfs-class-platform-profile | 50 +
Documentation/ABI/testing/sysfs-class-power | 906 +
.../ABI/testing/sysfs-class-power-bd71828 | 13 +
Documentation/ABI/testing/sysfs-class-power-gaokun | 27 +
.../ABI/testing/sysfs-class-power-ltc4162l | 82 +
.../ABI/testing/sysfs-class-power-max1720x | 32 +
Documentation/ABI/testing/sysfs-class-power-mp2629 | 9 +
Documentation/ABI/testing/sysfs-class-power-rt9467 | 19 +
Documentation/ABI/testing/sysfs-class-power-rt9471 | 32 +
Documentation/ABI/testing/sysfs-class-power-rt9756 | 30 +
.../ABI/testing/sysfs-class-power-surface | 15 +
.../ABI/testing/sysfs-class-power-twl4030 | 33 +
Documentation/ABI/testing/sysfs-class-power-wilco | 40 +
Documentation/ABI/testing/sysfs-class-powercap | 152 +
Documentation/ABI/testing/sysfs-class-pwm | 88 +
Documentation/ABI/testing/sysfs-class-rapidio | 59 +
Documentation/ABI/testing/sysfs-class-rc | 137 +
Documentation/ABI/testing/sysfs-class-rc-nuvoton | 15 +
.../testing/sysfs-class-reboot-mode-reboot_modes | 39 +
Documentation/ABI/testing/sysfs-class-regulator | 453 +
Documentation/ABI/testing/sysfs-class-remoteproc | 104 +
Documentation/ABI/testing/sysfs-class-rnbd-client | 133 +
Documentation/ABI/testing/sysfs-class-rnbd-server | 58 +
Documentation/ABI/testing/sysfs-class-rtc | 91 +
.../sysfs-class-rtc-rtc0-device-rtc_calibration | 14 +
Documentation/ABI/testing/sysfs-class-rtrs-client | 146 +
Documentation/ABI/testing/sysfs-class-rtrs-server | 53 +
Documentation/ABI/testing/sysfs-class-scsi_host | 119 +
Documentation/ABI/testing/sysfs-class-scsi_tape | 109 +
Documentation/ABI/testing/sysfs-class-spi-eeprom | 30 +
Documentation/ABI/testing/sysfs-class-spi-master | 34 +
Documentation/ABI/testing/sysfs-class-stm | 24 +
Documentation/ABI/testing/sysfs-class-stm_source | 11 +
Documentation/ABI/testing/sysfs-class-switchtec | 96 +
Documentation/ABI/testing/sysfs-class-tee | 25 +
Documentation/ABI/testing/sysfs-class-thermal | 259 +
Documentation/ABI/testing/sysfs-class-tsm | 9 +
Documentation/ABI/testing/sysfs-class-typec | 386 +
.../ABI/testing/sysfs-class-usb_power_delivery | 284 +
Documentation/ABI/testing/sysfs-class-usb_role | 27 +
Documentation/ABI/testing/sysfs-class-vduse | 33 +
Documentation/ABI/testing/sysfs-class-wakeup | 76 +
Documentation/ABI/testing/sysfs-class-watchdog | 129 +
Documentation/ABI/testing/sysfs-class-zram | 24 +
Documentation/ABI/testing/sysfs-dev | 21 +
Documentation/ABI/testing/sysfs-devices | 25 +
Documentation/ABI/testing/sysfs-devices-consumer | 9 +
Documentation/ABI/testing/sysfs-devices-coredump | 10 +
Documentation/ABI/testing/sysfs-devices-edac | 157 +
.../ABI/testing/sysfs-devices-faux-tdx-host | 26 +
.../ABI/testing/sysfs-devices-firmware_node | 17 +
Documentation/ABI/testing/sysfs-devices-lpss_ltr | 44 +
Documentation/ABI/testing/sysfs-devices-mapping | 62 +
Documentation/ABI/testing/sysfs-devices-memory | 120 +
Documentation/ABI/testing/sysfs-devices-mmc | 21 +
Documentation/ABI/testing/sysfs-devices-online | 20 +
.../ABI/testing/sysfs-devices-pci-host-bridge | 45 +
.../ABI/testing/sysfs-devices-physical_location | 42 +
.../ABI/testing/sysfs-devices-platform-ACPI-TAD | 117 +
.../testing/sysfs-devices-platform-_UDC_-gadget | 23 +
.../ABI/testing/sysfs-devices-platform-docg3 | 40 +
.../ABI/testing/sysfs-devices-platform-dock | 39 +
.../ABI/testing/sysfs-devices-platform-ipmi | 242 +
.../testing/sysfs-devices-platform-kunpeng_hccs | 126 +
.../sysfs-devices-platform-sh_mobile_lcdc_fb | 44 +
.../ABI/testing/sysfs-devices-platform-soc-ipa | 114 +
.../testing/sysfs-devices-platform-stratix10-rsu | 232 +
.../ABI/testing/sysfs-devices-platform-trackpoint | 115 +
Documentation/ABI/testing/sysfs-devices-power | 307 +
.../ABI/testing/sysfs-devices-power_resources_D0 | 13 +
.../ABI/testing/sysfs-devices-power_resources_D1 | 14 +
.../ABI/testing/sysfs-devices-power_resources_D2 | 14 +
.../testing/sysfs-devices-power_resources_D3hot | 14 +
.../testing/sysfs-devices-power_resources_wakeup | 13 +
.../ABI/testing/sysfs-devices-power_state | 20 +
.../ABI/testing/sysfs-devices-real_power_state | 23 +
Documentation/ABI/testing/sysfs-devices-removable | 20 +
.../ABI/testing/sysfs-devices-resource_in_use | 12 +
Documentation/ABI/testing/sysfs-devices-soc | 95 +
.../ABI/testing/sysfs-devices-software_node | 10 +
.../ABI/testing/sysfs-devices-state_synced | 29 +
Documentation/ABI/testing/sysfs-devices-sun | 14 +
Documentation/ABI/testing/sysfs-devices-supplier | 9 +
Documentation/ABI/testing/sysfs-devices-system-cpu | 808 +
.../ABI/testing/sysfs-devices-system-ibm-rtl | 24 +
.../ABI/testing/sysfs-devices-system-xen_cpu | 20 +
Documentation/ABI/testing/sysfs-devices-vfio-dev | 8 +
.../testing/sysfs-devices-virtual-misc-tdx_guest | 63 +
.../ABI/testing/sysfs-devices-waiting_for_supplier | 17 +
Documentation/ABI/testing/sysfs-devices-xenbus | 41 +
Documentation/ABI/testing/sysfs-driver-altera-cvp | 8 +
Documentation/ABI/testing/sysfs-driver-amd-sfh | 13 +
.../ABI/testing/sysfs-driver-aspeed-uart-routing | 27 +
.../ABI/testing/sysfs-driver-bd9571mwv-regulator | 31 +
Documentation/ABI/testing/sysfs-driver-ccp | 120 +
.../ABI/testing/sysfs-driver-chromeos-acpi | 152 +
.../ABI/testing/sysfs-driver-dell-dw5826e-reset | 9 +
Documentation/ABI/testing/sysfs-driver-eud | 9 +
.../ABI/testing/sysfs-driver-framer-pef2256 | 8 +
.../ABI/testing/sysfs-driver-fsi-master-gpio | 10 +
Documentation/ABI/testing/sysfs-driver-ge-achc | 15 +
Documentation/ABI/testing/sysfs-driver-genwqe | 78 +
Documentation/ABI/testing/sysfs-driver-habanalabs | 265 +
Documentation/ABI/testing/sysfs-driver-hid | 20 +
.../ABI/testing/sysfs-driver-hid-appletb-kbd | 13 +
Documentation/ABI/testing/sysfs-driver-hid-corsair | 15 +
.../ABI/testing/sysfs-driver-hid-corsair-void | 38 +
Documentation/ABI/testing/sysfs-driver-hid-lenovo | 60 +
.../ABI/testing/sysfs-driver-hid-lenovo-go | 724 +
.../ABI/testing/sysfs-driver-hid-lenovo-go-s | 304 +
.../ABI/testing/sysfs-driver-hid-logitech-hidpp | 19 +
.../ABI/testing/sysfs-driver-hid-logitech-lg4ff | 75 +
.../ABI/testing/sysfs-driver-hid-multitouch | 9 +
Documentation/ABI/testing/sysfs-driver-hid-ntrig | 73 +
Documentation/ABI/testing/sysfs-driver-hid-picolcd | 43 +
.../ABI/testing/sysfs-driver-hid-prodikeys | 29 +
.../ABI/testing/sysfs-driver-hid-roccat-kone | 125 +
Documentation/ABI/testing/sysfs-driver-hid-srws1 | 21 +
Documentation/ABI/testing/sysfs-driver-hid-wiimote | 85 +
.../ABI/testing/sysfs-driver-input-axp-pek | 11 +
.../ABI/testing/sysfs-driver-input-cros-ec-keyb | 6 +
.../ABI/testing/sysfs-driver-input-exc3000 | 26 +
Documentation/ABI/testing/sysfs-driver-intc_sar | 54 +
.../ABI/testing/sysfs-driver-intel-i915-hwmon | 93 +
.../ABI/testing/sysfs-driver-intel-m10-bmc | 36 +
.../testing/sysfs-driver-intel-m10-bmc-sec-update | 61 +
.../ABI/testing/sysfs-driver-intel-rapid-start | 21 +
.../ABI/testing/sysfs-driver-intel-xe-hwmon | 315 +
.../ABI/testing/sysfs-driver-intel-xe-ras | 30 +
.../ABI/testing/sysfs-driver-intel-xe-sriov | 190 +
Documentation/ABI/testing/sysfs-driver-intel_sdsi | 90 +
Documentation/ABI/testing/sysfs-driver-ivpu | 65 +
.../ABI/testing/sysfs-driver-jz4780-efuse | 20 +
.../ABI/testing/sysfs-driver-lenovo-yb9-kbdock | 19 +
.../ABI/testing/sysfs-driver-panfrost-profiling | 10 +
.../ABI/testing/sysfs-driver-panthor-profiling | 10 +
Documentation/ABI/testing/sysfs-driver-pciback | 28 +
Documentation/ABI/testing/sysfs-driver-ppi | 75 +
Documentation/ABI/testing/sysfs-driver-qaic | 18 +
Documentation/ABI/testing/sysfs-driver-qat | 167 +
Documentation/ABI/testing/sysfs-driver-qat_kpt | 97 +
Documentation/ABI/testing/sysfs-driver-qat_ras | 41 +
Documentation/ABI/testing/sysfs-driver-qat_rl | 226 +
Documentation/ABI/testing/sysfs-driver-qat_svn | 114 +
.../ABI/testing/sysfs-driver-samsung-laptop | 37 +
Documentation/ABI/testing/sysfs-driver-spi-intel | 20 +
Documentation/ABI/testing/sysfs-driver-st | 12 +
Documentation/ABI/testing/sysfs-driver-tegra-fuse | 11 +
.../ABI/testing/sysfs-driver-toshiba_acpi | 223 +
.../ABI/testing/sysfs-driver-toshiba_haps | 22 +
.../ABI/testing/sysfs-driver-typec-displayport | 74 +
Documentation/ABI/testing/sysfs-driver-uacce | 57 +
Documentation/ABI/testing/sysfs-driver-ucsi-ccg | 6 +
Documentation/ABI/testing/sysfs-driver-ufs | 1793 +
.../ABI/testing/sysfs-driver-uio_pci_sva-pasid | 29 +
.../ABI/testing/sysfs-driver-uniwill-laptop | 105 +
Documentation/ABI/testing/sysfs-driver-w1_ds28e17 | 24 +
Documentation/ABI/testing/sysfs-driver-w1_therm | 190 +
Documentation/ABI/testing/sysfs-driver-wacom | 105 +
Documentation/ABI/testing/sysfs-driver-xdata | 49 +
Documentation/ABI/testing/sysfs-driver-xen-blkback | 46 +
.../ABI/testing/sysfs-driver-xen-blkfront | 19 +
.../ABI/testing/sysfs-driver-xilinx-tmr-manager | 16 +
Documentation/ABI/testing/sysfs-driver-zynqmp-fpga | 73 +
Documentation/ABI/testing/sysfs-edac-ecs | 74 +
Documentation/ABI/testing/sysfs-edac-memory-repair | 206 +
Documentation/ABI/testing/sysfs-edac-scrub | 85 +
Documentation/ABI/testing/sysfs-firmware-acpi | 277 +
.../ABI/testing/sysfs-firmware-dmi-entries | 114 +
.../ABI/testing/sysfs-firmware-dmi-tables | 22 +
Documentation/ABI/testing/sysfs-firmware-efi | 45 +
Documentation/ABI/testing/sysfs-firmware-efi-esrt | 87 +
.../ABI/testing/sysfs-firmware-efi-runtime-map | 36 +
Documentation/ABI/testing/sysfs-firmware-gsmi | 58 +
Documentation/ABI/testing/sysfs-firmware-initrd | 8 +
.../ABI/testing/sysfs-firmware-lefi-boardinfo | 35 +
Documentation/ABI/testing/sysfs-firmware-log | 7 +
Documentation/ABI/testing/sysfs-firmware-memmap | 75 +
Documentation/ABI/testing/sysfs-firmware-ofw | 52 +
.../ABI/testing/sysfs-firmware-opal-powercap | 31 +
Documentation/ABI/testing/sysfs-firmware-opal-psr | 18 +
.../ABI/testing/sysfs-firmware-opal-sensor-groups | 21 +
.../testing/sysfs-firmware-papr-energy-scale-info | 29 +
Documentation/ABI/testing/sysfs-firmware-plpks | 58 +
.../ABI/testing/sysfs-firmware-qemu_fw_cfg | 103 +
.../ABI/testing/sysfs-firmware-sev-vulnerabilities | 19 +
Documentation/ABI/testing/sysfs-firmware-sgi_uv | 159 +
.../ABI/testing/sysfs-firmware-turris-mox-rwtm | 28 +
Documentation/ABI/testing/sysfs-fs-erofs | 49 +
Documentation/ABI/testing/sysfs-fs-ext4 | 118 +
Documentation/ABI/testing/sysfs-fs-f2fs | 1022 +
Documentation/ABI/testing/sysfs-fs-nilfs2 | 269 +
Documentation/ABI/testing/sysfs-fs-ubifs | 35 +
Documentation/ABI/testing/sysfs-fs-virtiofs | 11 +
Documentation/ABI/testing/sysfs-fs-xfs | 37 +
Documentation/ABI/testing/sysfs-hypervisor-xen | 46 +
Documentation/ABI/testing/sysfs-ibft | 33 +
.../ABI/testing/sysfs-kernel-address_bits | 10 +
Documentation/ABI/testing/sysfs-kernel-boot_params | 39 +
Documentation/ABI/testing/sysfs-kernel-btf | 25 +
.../ABI/testing/sysfs-kernel-cpu_byteorder | 12 +
Documentation/ABI/testing/sysfs-kernel-fadump | 59 +
Documentation/ABI/testing/sysfs-kernel-fscaps | 8 +
.../ABI/testing/sysfs-kernel-hardlockup_count | 7 +
.../ABI/testing/sysfs-kernel-iommu_groups | 64 +
Documentation/ABI/testing/sysfs-kernel-irq | 60 +
Documentation/ABI/testing/sysfs-kernel-kexec-kdump | 61 +
Documentation/ABI/testing/sysfs-kernel-livepatch | 95 +
Documentation/ABI/testing/sysfs-kernel-mm | 6 +
Documentation/ABI/testing/sysfs-kernel-mm-cma | 44 +
Documentation/ABI/testing/sysfs-kernel-mm-damon | 664 +
.../ABI/testing/sysfs-kernel-mm-hugepages | 17 +
Documentation/ABI/testing/sysfs-kernel-mm-ksm | 61 +
.../ABI/testing/sysfs-kernel-mm-memory-tiers | 25 +
.../ABI/testing/sysfs-kernel-mm-mempolicy | 4 +
.../sysfs-kernel-mm-mempolicy-weighted-interleave | 54 +
Documentation/ABI/testing/sysfs-kernel-mm-numa | 28 +
Documentation/ABI/testing/sysfs-kernel-mm-swap | 16 +
.../testing/sysfs-kernel-mm-transparent-hugepage | 18 +
Documentation/ABI/testing/sysfs-kernel-oops_count | 6 +
.../ABI/testing/sysfs-kernel-rcu_stall_count | 6 +
Documentation/ABI/testing/sysfs-kernel-reboot | 40 +
Documentation/ABI/testing/sysfs-kernel-slab | 526 +
.../ABI/testing/sysfs-kernel-softlockup_count | 7 +
Documentation/ABI/testing/sysfs-kernel-vmcoreinfo | 14 +
Documentation/ABI/testing/sysfs-kernel-warn_count | 6 +
Documentation/ABI/testing/sysfs-mce | 97 +
.../ABI/testing/sysfs-memory-page-offline | 44 +
Documentation/ABI/testing/sysfs-module | 84 +
Documentation/ABI/testing/sysfs-nvmem-cells | 21 +
Documentation/ABI/testing/sysfs-ocfs2 | 89 +
.../ABI/testing/sysfs-platform-alienware-wmi | 14 +
.../ABI/testing/sysfs-platform-asus-laptop | 71 +
Documentation/ABI/testing/sysfs-platform-asus-wmi | 240 +
Documentation/ABI/testing/sysfs-platform-at91 | 27 +
Documentation/ABI/testing/sysfs-platform-ayaneo-ec | 19 +
.../ABI/testing/sysfs-platform-brcmstb-gisb-arb | 8 +
.../ABI/testing/sysfs-platform-brcmstb-memc | 15 +
.../ABI/testing/sysfs-platform-chipidea-usb-otg | 56 +
.../ABI/testing/sysfs-platform-chipidea-usb2 | 9 +
.../ABI/testing/sysfs-platform-dell-laptop | 73 +
.../ABI/testing/sysfs-platform-dell-privacy-wmi | 71 +
.../ABI/testing/sysfs-platform-dell-smbios | 21 +
.../ABI/testing/sysfs-platform-dell-wmi-ddv | 9 +
Documentation/ABI/testing/sysfs-platform-dfl-fme | 246 +
Documentation/ABI/testing/sysfs-platform-dfl-port | 101 +
Documentation/ABI/testing/sysfs-platform-dptf | 157 +
.../ABI/testing/sysfs-platform-eeepc-laptop | 56 +
Documentation/ABI/testing/sysfs-platform-hidma | 9 +
.../ABI/testing/sysfs-platform-hidma-mgmt | 97 +
.../ABI/testing/sysfs-platform-i2c-demux-pinctrl | 18 +
.../ABI/testing/sysfs-platform-ideapad-laptop | 52 +
Documentation/ABI/testing/sysfs-platform-intel-ifs | 52 +
Documentation/ABI/testing/sysfs-platform-intel-pmc | 22 +
.../testing/sysfs-platform-intel-wmi-sbl-fw-update | 13 +
.../testing/sysfs-platform-intel-wmi-thunderbolt | 12 +
Documentation/ABI/testing/sysfs-platform-kim | 49 +
Documentation/ABI/testing/sysfs-platform-lg-laptop | 36 +
.../ABI/testing/sysfs-platform-mellanox-bootctl | 162 +
.../ABI/testing/sysfs-platform-mellanox-pmc | 64 +
.../ABI/testing/sysfs-platform-msi-laptop | 83 +
Documentation/ABI/testing/sysfs-platform-oxp | 25 +
.../ABI/testing/sysfs-platform-phy-rcar-gen3-usb2 | 17 +
.../ABI/testing/sysfs-platform-power-on-reason | 12 +
.../ABI/testing/sysfs-platform-renesas_usb3 | 17 +
Documentation/ABI/testing/sysfs-platform-silicom | 30 +
Documentation/ABI/testing/sysfs-platform-sst-atom | 26 +
Documentation/ABI/testing/sysfs-platform-tahvo-usb | 16 +
Documentation/ABI/testing/sysfs-platform-ts5500 | 54 +
.../ABI/testing/sysfs-platform-twl4030-usb | 8 +
.../ABI/testing/sysfs-platform-usbip-vudc | 38 +
Documentation/ABI/testing/sysfs-platform-wilco-ec | 58 +
Documentation/ABI/testing/sysfs-platform_profile | 40 +
Documentation/ABI/testing/sysfs-power | 472 +
Documentation/ABI/testing/sysfs-pps | 73 +
Documentation/ABI/testing/sysfs-pps-gen | 43 +
Documentation/ABI/testing/sysfs-pps-gen-tio | 6 +
Documentation/ABI/testing/sysfs-profiling | 13 +
Documentation/ABI/testing/sysfs-ptp | 142 +
Documentation/ABI/testing/sysfs-secvar | 65 +
Documentation/ABI/testing/sysfs-timecard | 293 +
Documentation/ABI/testing/sysfs-tty | 166 +
Documentation/ABI/testing/sysfs-uevent | 51 +
Documentation/ABI/testing/usb-charger-uevent | 54 +
Documentation/ABI/testing/usb-uevent | 27 +
Documentation/Changes | 1 +
Documentation/CodingStyle | 1 +
Documentation/Kconfig | 28 +
Documentation/Makefile | 115 +
Documentation/PCI/acpi-info.rst | 192 +
Documentation/PCI/boot-interrupts.rst | 159 +
Documentation/PCI/controller/index.rst | 11 +
.../PCI/controller/pci-controller-drivers.rst | 402 +
.../PCI/controller/rcar-pcie-firmware.rst | 32 +
.../PCI/endpoint/function/binding/pci-ntb.rst | 38 +
.../PCI/endpoint/function/binding/pci-test.rst | 26 +
Documentation/PCI/endpoint/index.rst | 21 +
Documentation/PCI/endpoint/pci-endpoint-cfs.rst | 138 +
Documentation/PCI/endpoint/pci-endpoint.rst | 283 +
Documentation/PCI/endpoint/pci-ntb-function.rst | 348 +
Documentation/PCI/endpoint/pci-ntb-howto.rst | 158 +
Documentation/PCI/endpoint/pci-nvme-function.rst | 13 +
Documentation/PCI/endpoint/pci-test-function.rst | 103 +
Documentation/PCI/endpoint/pci-test-howto.rst | 239 +
Documentation/PCI/endpoint/pci-vntb-function.rst | 129 +
Documentation/PCI/endpoint/pci-vntb-howto.rst | 169 +
Documentation/PCI/index.rst | 22 +
Documentation/PCI/msi-howto.rst | 300 +
Documentation/PCI/pci-error-recovery.rst | 471 +
Documentation/PCI/pci-iov-howto.rst | 171 +
Documentation/PCI/pci.rst | 578 +
Documentation/PCI/pcieaer-howto.rst | 267 +
Documentation/PCI/pciebus-howto.rst | 228 +
Documentation/PCI/sysfs-pci.rst | 138 +
Documentation/PCI/tph.rst | 132 +
.../Design/Data-Structures/BigTreeClassicRCU.svg | 474 +
.../BigTreePreemptRCUBHdyntickCB.svg | 662 +
.../RCU/Design/Data-Structures/Data-Structures.rst | 1196 +
.../Design/Data-Structures/HugeTreeClassicRCU.svg | 939 +
.../RCU/Design/Data-Structures/TreeLevel.svg | 828 +
.../RCU/Design/Data-Structures/TreeMapping.svg | 305 +
.../Design/Data-Structures/TreeMappingLevel.svg | 380 +
.../RCU/Design/Data-Structures/blkd_task.svg | 631 +
.../RCU/Design/Data-Structures/nxtlist.svg | 386 +
.../Design/Expedited-Grace-Periods/ExpRCUFlow.svg | 830 +
.../Expedited-Grace-Periods/ExpSchedFlow.svg | 830 +
.../Expedited-Grace-Periods.rst | 521 +
.../RCU/Design/Expedited-Grace-Periods/Funnel0.svg | 275 +
.../RCU/Design/Expedited-Grace-Periods/Funnel1.svg | 275 +
.../RCU/Design/Expedited-Grace-Periods/Funnel2.svg | 287 +
.../RCU/Design/Expedited-Grace-Periods/Funnel3.svg | 323 +
.../RCU/Design/Expedited-Grace-Periods/Funnel4.svg | 323 +
.../RCU/Design/Expedited-Grace-Periods/Funnel5.svg | 335 +
.../RCU/Design/Expedited-Grace-Periods/Funnel6.svg | 335 +
.../RCU/Design/Expedited-Grace-Periods/Funnel7.svg | 347 +
.../RCU/Design/Expedited-Grace-Periods/Funnel8.svg | 311 +
.../Memory-Ordering/Tree-RCU-Memory-Ordering.rst | 648 +
.../TreeRCU-callback-invocation.svg | 486 +
.../Memory-Ordering/TreeRCU-callback-registry.svg | 646 +
.../RCU/Design/Memory-Ordering/TreeRCU-dyntick.svg | 700 +
.../Design/Memory-Ordering/TreeRCU-gp-cleanup.svg | 1133 +
.../RCU/Design/Memory-Ordering/TreeRCU-gp-fqs.svg | 1309 +
.../Design/Memory-Ordering/TreeRCU-gp-init-1.svg | 658 +
.../Design/Memory-Ordering/TreeRCU-gp-init-2.svg | 656 +
.../Design/Memory-Ordering/TreeRCU-gp-init-3.svg | 636 +
.../RCU/Design/Memory-Ordering/TreeRCU-gp.svg | 5135 +
.../RCU/Design/Memory-Ordering/TreeRCU-hotplug.svg | 775 +
.../RCU/Design/Memory-Ordering/TreeRCU-qs.svg | 1095 +
.../RCU/Design/Memory-Ordering/rcu_node-lock.svg | 229 +
.../Design/Requirements/GPpartitionReaders1.svg | 374 +
.../Design/Requirements/ReadersPartitionGP1.svg | 639 +
.../RCU/Design/Requirements/Requirements.rst | 2873 +
Documentation/RCU/NMI-RCU.rst | 123 +
Documentation/RCU/RTFP.txt | 2812 +
Documentation/RCU/UP.rst | 152 +
Documentation/RCU/checklist.rst | 556 +
Documentation/RCU/index.rst | 30 +
Documentation/RCU/listRCU.rst | 511 +
Documentation/RCU/lockdep-splat.rst | 115 +
Documentation/RCU/lockdep.rst | 119 +
Documentation/RCU/rcu.rst | 93 +
Documentation/RCU/rcu_dereference.rst | 502 +
Documentation/RCU/rcubarrier.rst | 377 +
Documentation/RCU/rculist_nulls.rst | 215 +
Documentation/RCU/rcuref.rst | 158 +
Documentation/RCU/stallwarn.rst | 491 +
Documentation/RCU/torture.rst | 374 +
Documentation/RCU/whatisRCU.rst | 1415 +
Documentation/SubmittingPatches | 1 +
Documentation/accel/amdxdna/amdnpu.rst | 306 +
Documentation/accel/amdxdna/index.rst | 11 +
Documentation/accel/index.rst | 13 +
Documentation/accel/introduction.rst | 110 +
Documentation/accel/qaic/aic080.rst | 14 +
Documentation/accel/qaic/aic100.rst | 538 +
Documentation/accel/qaic/index.rst | 14 +
Documentation/accel/qaic/qaic.rst | 209 +
Documentation/accel/rocket/index.rst | 19 +
Documentation/accounting/cgroupstats.rst | 31 +
Documentation/accounting/delay-accounting.rst | 214 +
Documentation/accounting/index.rst | 14 +
Documentation/accounting/psi.rst | 188 +
Documentation/accounting/taskstats-struct.rst | 199 +
Documentation/accounting/taskstats.rst | 182 +
Documentation/admin-guide/LSM/LoadPin.rst | 31 +
Documentation/admin-guide/LSM/SELinux.rst | 44 +
Documentation/admin-guide/LSM/SafeSetID.rst | 118 +
Documentation/admin-guide/LSM/Smack.rst | 871 +
Documentation/admin-guide/LSM/Yama.rst | 75 +
Documentation/admin-guide/LSM/apparmor.rst | 54 +
Documentation/admin-guide/LSM/index.rst | 51 +
Documentation/admin-guide/LSM/ipe.rst | 835 +
Documentation/admin-guide/LSM/landlock.rst | 298 +
Documentation/admin-guide/LSM/tomoyo.rst | 52 +
.../admin-guide/RAS/address-translation.rst | 24 +
Documentation/admin-guide/RAS/error-decoding.rst | 21 +
Documentation/admin-guide/RAS/index.rst | 7 +
Documentation/admin-guide/RAS/main.rst | 1087 +
Documentation/admin-guide/README.rst | 360 +
Documentation/admin-guide/abi-obsolete-files.rst | 7 +
Documentation/admin-guide/abi-obsolete.rst | 13 +
Documentation/admin-guide/abi-removed-files.rst | 7 +
Documentation/admin-guide/abi-removed.rst | 7 +
Documentation/admin-guide/abi-stable-files.rst | 7 +
Documentation/admin-guide/abi-stable.rst | 16 +
Documentation/admin-guide/abi-testing-files.rst | 7 +
Documentation/admin-guide/abi-testing.rst | 22 +
Documentation/admin-guide/abi.rst | 29 +
Documentation/admin-guide/acpi/cppc_sysfs.rst | 78 +
.../admin-guide/acpi/fan_performance_states.rst | 90 +
Documentation/admin-guide/acpi/index.rst | 14 +
.../admin-guide/acpi/initrd_table_override.rst | 115 +
Documentation/admin-guide/acpi/ssdt-overlays.rst | 181 +
Documentation/admin-guide/aoe/aoe.rst | 150 +
Documentation/admin-guide/aoe/autoload.sh | 17 +
Documentation/admin-guide/aoe/examples.rst | 23 +
Documentation/admin-guide/aoe/index.rst | 10 +
Documentation/admin-guide/aoe/status.sh | 30 +
Documentation/admin-guide/aoe/todo.rst | 17 +
Documentation/admin-guide/aoe/udev-install.sh | 33 +
Documentation/admin-guide/aoe/udev.txt | 26 +
.../admin-guide/auxdisplay/cfag12864b.rst | 98 +
Documentation/admin-guide/auxdisplay/index.rst | 9 +
Documentation/admin-guide/auxdisplay/ks0108.rst | 50 +
Documentation/admin-guide/bcache.rst | 644 +
Documentation/admin-guide/binderfs.rst | 87 +
Documentation/admin-guide/binfmt-misc.rst | 391 +
.../blockdev/drbd/DRBD-8.3-data-packets.svg | 588 +
.../blockdev/drbd/DRBD-data-packets.svg | 459 +
.../admin-guide/blockdev/drbd/conn-states-8.dot | 18 +
.../blockdev/drbd/data-structure-v9.rst | 42 +
.../admin-guide/blockdev/drbd/disk-states-8.dot | 16 +
.../drbd/drbd-connection-state-overview.dot | 85 +
.../admin-guide/blockdev/drbd/figures.rst | 30 +
Documentation/admin-guide/blockdev/drbd/index.rst | 19 +
.../admin-guide/blockdev/drbd/peer-states-8.dot | 8 +
Documentation/admin-guide/blockdev/floppy.rst | 255 +
Documentation/admin-guide/blockdev/index.rst | 17 +
Documentation/admin-guide/blockdev/nbd.rst | 31 +
Documentation/admin-guide/blockdev/paride.rst | 207 +
Documentation/admin-guide/blockdev/ramdisk.rst | 153 +
Documentation/admin-guide/blockdev/zoned_loop.rst | 191 +
Documentation/admin-guide/blockdev/zram.rst | 610 +
Documentation/admin-guide/bootconfig.rst | 416 +
Documentation/admin-guide/braille-console.rst | 38 +
Documentation/admin-guide/btmrvl.rst | 124 +
Documentation/admin-guide/bug-bisect.rst | 165 +
Documentation/admin-guide/bug-hunting.rst | 370 +
.../admin-guide/cgroup-v1/blkio-controller.rst | 301 +
Documentation/admin-guide/cgroup-v1/cgroups.rst | 697 +
Documentation/admin-guide/cgroup-v1/cpuacct.rst | 50 +
Documentation/admin-guide/cgroup-v1/cpusets.rst | 874 +
Documentation/admin-guide/cgroup-v1/devices.rst | 132 +
.../admin-guide/cgroup-v1/freezer-subsystem.rst | 131 +
Documentation/admin-guide/cgroup-v1/hugetlb.rst | 139 +
Documentation/admin-guide/cgroup-v1/index.rst | 24 +
Documentation/admin-guide/cgroup-v1/memcg_test.rst | 342 +
Documentation/admin-guide/cgroup-v1/memory.rst | 963 +
Documentation/admin-guide/cgroup-v1/misc.rst | 4 +
Documentation/admin-guide/cgroup-v1/net_cls.rst | 44 +
Documentation/admin-guide/cgroup-v1/net_prio.rst | 57 +
Documentation/admin-guide/cgroup-v1/pids.rst | 93 +
Documentation/admin-guide/cgroup-v1/rdma.rst | 191 +
Documentation/admin-guide/cgroup-v2.rst | 3575 +
Documentation/admin-guide/cifs/authors.rst | 69 +
Documentation/admin-guide/cifs/changes.rst | 9 +
Documentation/admin-guide/cifs/index.rst | 14 +
Documentation/admin-guide/cifs/introduction.rst | 53 +
Documentation/admin-guide/cifs/todo.rst | 133 +
Documentation/admin-guide/cifs/usage.rst | 864 +
Documentation/admin-guide/cifs/winucase_convert.pl | 62 +
Documentation/admin-guide/clearing-warn-once.rst | 9 +
Documentation/admin-guide/cpu-isolation.rst | 357 +
Documentation/admin-guide/cpu-load.rst | 117 +
Documentation/admin-guide/cputopology.rst | 101 +
Documentation/admin-guide/dell_rbu.rst | 128 +
.../admin-guide/device-mapper/cache-policies.rst | 131 +
Documentation/admin-guide/device-mapper/cache.rst | 337 +
Documentation/admin-guide/device-mapper/delay.rst | 54 +
.../admin-guide/device-mapper/dm-clone.rst | 333 +
.../admin-guide/device-mapper/dm-crypt.rst | 212 +
.../admin-guide/device-mapper/dm-dust.rst | 305 +
Documentation/admin-guide/device-mapper/dm-ebs.rst | 51 +
.../admin-guide/device-mapper/dm-flakey.rst | 88 +
Documentation/admin-guide/device-mapper/dm-ima.rst | 718 +
.../admin-guide/device-mapper/dm-init.rst | 133 +
.../admin-guide/device-mapper/dm-inlinecrypt.rst | 129 +
.../admin-guide/device-mapper/dm-integrity.rst | 321 +
Documentation/admin-guide/device-mapper/dm-io.rst | 75 +
Documentation/admin-guide/device-mapper/dm-log.rst | 57 +
.../admin-guide/device-mapper/dm-pcache.rst | 202 +
.../admin-guide/device-mapper/dm-queue-length.rst | 48 +
.../admin-guide/device-mapper/dm-raid.rst | 489 +
.../admin-guide/device-mapper/dm-service-time.rst | 101 +
.../admin-guide/device-mapper/dm-uevent.rst | 110 +
.../admin-guide/device-mapper/dm-zoned.rst | 194 +
Documentation/admin-guide/device-mapper/era.rst | 116 +
Documentation/admin-guide/device-mapper/index.rst | 43 +
Documentation/admin-guide/device-mapper/kcopyd.rst | 47 +
Documentation/admin-guide/device-mapper/linear.rst | 63 +
.../admin-guide/device-mapper/log-writes.rst | 145 +
.../admin-guide/device-mapper/persistent-data.rst | 88 +
.../admin-guide/device-mapper/snapshot.rst | 196 +
.../admin-guide/device-mapper/statistics.rst | 225 +
.../admin-guide/device-mapper/striped.rst | 61 +
Documentation/admin-guide/device-mapper/switch.rst | 141 +
.../device-mapper/thin-provisioning.rst | 427 +
.../admin-guide/device-mapper/unstriped.rst | 135 +
.../admin-guide/device-mapper/vdo-design.rst | 633 +
Documentation/admin-guide/device-mapper/vdo.rst | 413 +
Documentation/admin-guide/device-mapper/verity.rst | 349 +
.../admin-guide/device-mapper/writecache.rst | 114 +
Documentation/admin-guide/device-mapper/zero.rst | 37 +
Documentation/admin-guide/devices.rst | 270 +
Documentation/admin-guide/devices.txt | 3081 +
Documentation/admin-guide/dynamic-debug-howto.rst | 392 +
Documentation/admin-guide/edid.rst | 27 +
Documentation/admin-guide/efi-stub.rst | 103 +
Documentation/admin-guide/ext4.rst | 611 +
Documentation/admin-guide/features.rst | 3 +
.../admin-guide/filesystem-monitoring.rst | 78 +
Documentation/admin-guide/gpio/gpio-aggregator.rst | 218 +
Documentation/admin-guide/gpio/gpio-mockup.rst | 59 +
Documentation/admin-guide/gpio/gpio-sim.rst | 137 +
Documentation/admin-guide/gpio/gpio-virtuser.rst | 177 +
Documentation/admin-guide/gpio/index.rst | 14 +
Documentation/admin-guide/gpio/obsolete.rst | 13 +
.../admin-guide/hw-vuln/attack_vector_controls.rst | 236 +
.../admin-guide/hw-vuln/core-scheduling.rst | 226 +
.../admin-guide/hw-vuln/cross-thread-rsb.rst | 91 +
.../admin-guide/hw-vuln/gather_data_sampling.rst | 109 +
Documentation/admin-guide/hw-vuln/index.rst | 29 +
.../hw-vuln/indirect-target-selection.rst | 168 +
Documentation/admin-guide/hw-vuln/l1d_flush.rst | 69 +
Documentation/admin-guide/hw-vuln/l1tf.rst | 615 +
Documentation/admin-guide/hw-vuln/mds.rst | 303 +
Documentation/admin-guide/hw-vuln/multihit.rst | 167 +
.../admin-guide/hw-vuln/old_microcode.rst | 21 +
.../hw-vuln/processor_mmio_stale_data.rst | 269 +
.../admin-guide/hw-vuln/reg-file-data-sampling.rst | 96 +
Documentation/admin-guide/hw-vuln/rsb.rst | 268 +
.../special-register-buffer-data-sampling.rst | 150 +
Documentation/admin-guide/hw-vuln/spectre.rst | 725 +
[Output truncated: showing 1000 of 96053 lines]]
|
| 44/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 50920
output: 38
thoughts: 2792
Thoughts: **Analyzing a KASAN Slab-Use-After-Free Bug**
Okay, so the Git history is shallow, just one commit, but that's fine. We can use code search and grepping to get the context we need. Let's dig into this KASAN report. It looks like we have a slab-use-after-free in `kobject_uevent_net_broadcast`. This is serious.
First, I need to confirm the three stack traces are present: yes, we have the call trace (the bad memory access), an allocation stack, and a free stack. Perfect. Now, let's verify if all three stacks relate to the same object type. Allocation shows us `uevent_net_init` allocating a `struct uevent_sock` using `kzalloc_obj`, and assigning to `net->uevent_sock`. The free stack confirms this is freed in `uevent_net_exit` with `kfree(ue_sk)`. Then, the access in `kobject_uevent_net_broadcast` accesses the `sk` member within the same `struct uevent_sock` via `net->uevent_sock->sk` *after* it's been freed. And the offsets confirm: this is a 64-bit read at the correct offset within the `struct uevent_sock`. So, indeed, it's the *same* `uevent_sock` object.
Also, all three traces are in `lib/kobject_uevent.c`, and the access is called via `device_del` within an RDMA compat device.
Now the question is, why is this happening? How does the RDMA compat device keep referencing a network namespace with a freed `uevent_sock`? Or why does `remove_one_compat_dev` get called after the cleanup? Time to dive into the code! I need to understand the relationship between `rdma_dev_net_ops` and `uevent_net_ops`, and how these interact with the network namespace operations. I'll focus on `net/core/net_namespace.c`, specifically around `ops_undo_list` and `pernet_list`.
|
| 45/2 |
2026/09/14 00:48 |
tool |
read-file |
0m
Args: map[File:net/core/net_namespace.c FirstLine:1150 LineCount:50]
Results: map[Contents:1150: static int rtnl_net_dumpid(struct sk_buff *skb, struct netlink_callback *cb)
1151: {
1152: struct rtnl_net_dump_cb net_cb = {
1153: .tgt_net = sock_net(skb->sk),
1154: .skb = skb,
1155: .fillargs = {
1156: .portid = NETLINK_CB(cb->skb).portid,
1157: .seq = cb->nlh->nlmsg_seq,
1158: .flags = NLM_F_MULTI,
1159: .cmd = RTM_NEWNSID,
1160: },
1161: .idx = 0,
1162: .s_idx = cb->args[0],
1163: };
1164: int err = 0;
1165:
1166: if (cb->strict_check) {
1167: err = rtnl_valid_dump_net_req(cb->nlh, skb->sk, &net_cb, cb);
1168: if (err < 0)
1169: goto end;
1170: }
1171:
1172: rcu_read_lock();
1173: idr_for_each(&net_cb.tgt_net->netns_ids, rtnl_net_dumpid_one, &net_cb);
1174: rcu_read_unlock();
1175:
1176: cb->args[0] = net_cb.idx;
1177: end:
1178: if (net_cb.fillargs.add_ref)
1179: put_net(net_cb.tgt_net);
1180: return err;
1181: }
1182:
1183: static void rtnl_net_notifyid(struct net *net, int cmd, int id, u32 portid,
1184: struct nlmsghdr *nlh, gfp_t gfp)
1185: {
1186: struct net_fill_args fillargs = {
1187: .portid = portid,
1188: .seq = nlh ? nlh->nlmsg_seq : 0,
1189: .cmd = cmd,
1190: .nsid = id,
1191: };
1192: struct sk_buff *msg;
1193: int err = -ENOMEM;
1194:
1195: msg = nlmsg_new(rtnl_net_get_size(), gfp);
1196: if (!msg)
1197: goto out;
1198:
1199: err = rtnl_net_fill(msg, &fillargs);
]
|
| 46/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 55016
output: 38
thoughts: 128
Thoughts: **My Analysis of Network Namespace Initialization**
Okay, let's break this down. From what I'm seeing, `uevent_net_ops` is being registered using `register_pernet_subsys(&uevent_net_ops)`. And, separately, `rdma_dev_net_ops` is getting registered with `register_pernet_device(&rdma_dev_net_ops)`. Now, the key here is the *order* of registration. I recall from examining `net/core/net_namespace.c`, that these `subsys` and `device` operations, likely pertaining to networking, are added to `pernet_list`. The key thing to remember here is that they're being added in a specific order, with `subsys` operations preceding `device` operations. The difference between these two calls - `register_pernet_subsys` and `register_pernet_device` are also of critical importance. I should probably re-examine those function definitions to fully understand the impact of registering each of these structures to a network namespace.
|
| 47/2 |
2026/09/14 00:48 |
tool |
read-file |
0m
Args: map[File:net/core/net_namespace.c FirstLine:1250 LineCount:60]
Results: map[Contents:1250: CACHELINE_ASSERT_GROUP_MEMBER(struct netns_ipv4, netns_ipv4_read_rx,
1251: sysctl_tcp_rmem);
1252: }
1253: #endif
1254:
1255: static const struct rtnl_msg_handler net_ns_rtnl_msg_handlers[] __initconst = {
1256: {.msgtype = RTM_NEWNSID, .doit = rtnl_net_newid,
1257: .flags = RTNL_FLAG_DOIT_UNLOCKED},
1258: {.msgtype = RTM_GETNSID, .doit = rtnl_net_getid,
1259: .dumpit = rtnl_net_dumpid,
1260: .flags = RTNL_FLAG_DOIT_UNLOCKED | RTNL_FLAG_DUMP_UNLOCKED},
1261: };
1262:
1263: void __init net_ns_init(void)
1264: {
1265: struct net_generic *ng;
1266:
1267: #ifdef CONFIG_NET_NS
1268: netns_ipv4_struct_check();
1269: net_cachep = kmem_cache_create("net_namespace", sizeof(struct net),
1270: SMP_CACHE_BYTES,
1271: SLAB_PANIC|SLAB_ACCOUNT, NULL);
1272:
1273: /* Create workqueue for cleanup */
1274: netns_wq = create_singlethread_workqueue("netns");
1275: if (!netns_wq)
1276: panic("Could not create netns workq");
1277: #endif
1278:
1279: ng = net_alloc_generic();
1280: if (!ng)
1281: panic("Could not allocate generic netns");
1282:
1283: rcu_assign_pointer(init_net.gen, ng);
1284:
1285: #ifdef CONFIG_KEYS
1286: init_net.key_domain = &init_net_key_domain;
1287: #endif
1288: /*
1289: * This currently cannot fail as the initial network namespace
1290: * has a static inode number.
1291: */
1292: preinit_net(&init_net, &init_user_ns);
1293: if (ns_common_init(&init_net))
1294: panic("Could not preinitialize the initial network namespace");
1295:
1296: down_write(&pernet_ops_rwsem);
1297: if (setup_net(&init_net))
1298: panic("Could not setup the initial network namespace");
1299:
1300: init_net_initialized = true;
1301: up_write(&pernet_ops_rwsem);
1302:
1303: if (register_pernet_subsys(&net_ns_ops))
1304: panic("Could not register network namespace subsystems");
1305:
1306: rtnl_register_many(net_ns_rtnl_msg_handlers);
1307: }
1308:
1309: #ifdef CONFIG_NET_NS
]
|
| 48/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 56351
output: 40
thoughts: 13
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Hunting Down `register_pernet_subsys`**
Okay, so I need to track down the implementation of `register_pernet_subsys`. I'm guessing this is something related to registering per-net namespaces, which likely indicates networking subsystem initialization or module loading. My first instinct is to dive into the kernel source directly; relying on man pages or documentation in this instance feels too high-level. I'll probably start with a `grep` or `git grep` on a known good kernel source tree. Given the naming convention, Iβd initially search for instances in drivers or networking-related directories. I'll keep an eye out for how it's used β cross-referencing calls with definitions will be key. Is it being called within a module initialization function, or during core network device setup? Understanding the call stack will be crucial to figuring out its overall role. I'll be looking for clues in the surrounding code regarding the data structures that get registered alongside the subsystem, or the callbacks involved. Any related structures named in the definition or usage are something to note. I want to build a comprehensive view of its function and interactions to fully understand its implications on network management. Let's get to work.
|
| 49/2 |
2026/09/14 00:48 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/core/net_namespace.c Name:register_pernet_subsys]
Results: map[SourceCode:1418: /**
1419: * register_pernet_subsys - register a network namespace subsystem
1420: * @ops: pernet operations structure for the subsystem
1421: *
1422: * Register a subsystem which has init and exit functions
1423: * that are called when network namespaces are created and
1424: * destroyed respectively.
1425: *
1426: * When registered all network namespace init functions are
1427: * called for every existing network namespace. Allowing kernel
1428: * modules to have a race free view of the set of network namespaces.
1429: *
1430: * When a new network namespace is created all of the init
1431: * methods are called in the order in which they were registered.
1432: *
1433: * When a network namespace is destroyed all of the exit methods
1434: * are called in the reverse of the order with which they were
1435: * registered.
1436: */
1437: int register_pernet_subsys(struct pernet_operations *ops)
1438: {
1439: int error;
1440: down_write(&pernet_ops_rwsem);
1441: error = register_pernet_operations(first_device, ops);
1442: up_write(&pernet_ops_rwsem);
1443: return error;
1444: }
SourceFile:net/core/net_namespace.c]
|
| 50/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 57121
output: 31
thoughts: 580
Thoughts: **My Analysis of Network Namespace Cleanup and RDMA Device Unregistration**
Okay, let's break this down. I'm looking at how the network namespace cleanup interacts with RDMA device unregistration, and I'm seeing some potential race conditions. I see that `register_pernet_subsys` is called before `register_pernet_device`, which is what I'd expect for subsystem initialization order. When a network namespace is destroyed, exit methods registered with `register_pernet_device` are called *before* those registered by `register_pernet_subsys` β that makes sense for clean shutdown.
But here's the kicker: `rdma_dev_net_ops` is registered using `register_pernet_device`! So, the `rdma_dev_exit_net` function gets called before the subsystem-specific exit functions. I need to be sure the RDMA devices are not destroyed before the network namespace calls for destruction. This means the namespace is going to exit and then call for destruction of these devices.
Now, what is `rdma_dev_exit_net` doing? Let's refresh my memory of `rdma_dev_exit_net`: Okay, I see that the function removes entries from the `rdma_nets` XArray and iterates through the `devices` XArray. This looks safe. But, what if an `ib_device` is being unregistered concurrently? Or, what if an `ib_device` was in the process of being unregistered when `cleanup_net` ran, OR what if an `ib_device` was removed from the `devices`? This is the problem.
Specifically, how is `dev` being removed from `devices`? I need to track down where `xa_erase(&devices, ...)` is called to see if that happens concurrently with the cleanup or if the `rdma_dev_exit_net` process can handle that. I need to understand if the RDMA devices are already removed or if they need to be removed during this process. This whole ordering is key. I need to make sure that the network namespace exits don't happen mid-device unregistration. This could be where the race is and where I need to focus my attention.
|
| 51/2 |
2026/09/14 00:48 |
tool |
grepper |
0m
Args: map[Expression:xa_erase.*devices PathPrefix:drivers/infiniband]
Results: map[Output:drivers/infiniband/core/device.c=688=void ib_dealloc_device(struct ib_device *device)
--
drivers/infiniband/core/device.c-700- if (xa_load(&devices, device->index) == device)
drivers/infiniband/core/device.c:701: xa_erase(&devices, device->index);
drivers/infiniband/core/device.c-702- up_write(&devices_rwsem);
]
|
| 52/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 58346
output: 31
thoughts: 32
Thoughts: Here's my analysis of the provided thought process, tailored for an expert audience:
**Analyzing Device Registration in the Infiniband Subsystem**
Alright, let's dive into this. My focus is immediately drawn to where the `xa_store` operation specifically targets either the `devices` array or, even more critically, the `device->index` member within the IB device structure. This is the crux of the matter in device registration β ensuring atomic and correct indexing for efficient access. Now, the natural next step is to scrutinize the `ib_register_device` function. Itβs the obvious entry point where a device first gets integrated into the system, which gives me a place to start when examining where device index errors can occur. I'm going to look at the surrounding code for potential race conditions or atomicity issues around that indexing and storage. Let's see how that registration is handled and ensure that this initial insertion is completely bulletproof.
|
| 53/2 |
2026/09/14 00:48 |
tool |
grepper |
0m
Error:
Args: map[Expression:xa_store.*devices PathPrefix:drivers/infiniband]
Results:
|
| 54/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 58622
output: 36
thoughts: 22
Thoughts: Here's my take on the thought process, as if it were my own:
**Diving into the Infiniband Core**
Okay, time to get to the heart of the matter. Let's start digging into the `drivers/infiniband/core/device.c` file. Specifically, I'm going to focus on the `devices` part. This is where the core infrastructure for handling Infiniband devices should be. I'll bet this is where the device registration, discovery, and overall management live. I need to understand how the system keeps track of all the IB devices it knows about. Hopefully the code is well-structured and easy to follow. Iβm hoping to find the data structures used to represent devices, and the functions that manipulate those structures. Let's see what we can find.
|
| 55/2 |
2026/09/14 00:48 |
tool |
grepper |
0m
Args: map[Expression:&devices\b PathPrefix:drivers/infiniband/core/device.c]
Results: map[Output:drivers/infiniband/core/device.c=321=struct ib_device *ib_device_get_by_index(const struct net *net, u32 index)
--
drivers/infiniband/core/device.c-325- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:326: device = xa_load(&devices, index);
drivers/infiniband/core/device.c-327- if (device) {
--
drivers/infiniband/core/device.c=355=static struct ib_device *__ib_device_get_by_name(const char *name,
--
drivers/infiniband/core/device.c-360-
drivers/infiniband/core/device.c:361: xa_for_each (&devices, index, device)
drivers/infiniband/core/device.c-362- if (rdma_dev_access_netns(device, net) &&
--
drivers/infiniband/core/device.c=446=static int __alloc_name_id(struct net *net, const char *name,
--
drivers/infiniband/core/device.c-456- ida_init(&inuse);
drivers/infiniband/core/device.c:457: xa_for_each (&devices, index, device) {
drivers/infiniband/core/device.c-458- char buf[IB_DEVICE_NAME_MAX];
--
drivers/infiniband/core/device.c=688=void ib_dealloc_device(struct ib_device *device)
--
drivers/infiniband/core/device.c-699- down_write(&devices_rwsem);
drivers/infiniband/core/device.c:700: if (xa_load(&devices, device->index) == device)
drivers/infiniband/core/device.c:701: xa_erase(&devices, device->index);
drivers/infiniband/core/device.c-702- up_write(&devices_rwsem);
--
drivers/infiniband/core/device.c=915=static void ib_policy_change_task(struct work_struct *work)
--
drivers/infiniband/core/device.c-920- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:921: xa_for_each_marked (&devices, index, dev, DEVICE_REGISTERED) {
drivers/infiniband/core/device.c-922- unsigned int i;
--
drivers/infiniband/core/device.c=1068=static void remove_all_compat_devs(void)
--
drivers/infiniband/core/device.c-1074- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:1075: xa_for_each (&devices, index, dev) {
drivers/infiniband/core/device.c-1076- unsigned long c_index = 0;
--
drivers/infiniband/core/device.c=1089=static int add_all_compat_devs(void)
--
drivers/infiniband/core/device.c-1096- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:1097: xa_for_each_marked (&devices, index, dev, DEVICE_REGISTERED) {
drivers/infiniband/core/device.c-1098- unsigned long net_index = 0;
--
drivers/infiniband/core/device.c=1149=static void rdma_dev_exit_net(struct net *net)
--
drivers/infiniband/core/device.c-1164- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:1165: xa_for_each (&devices, index, dev) {
drivers/infiniband/core/device.c-1166- get_device(&dev->dev);
--
drivers/infiniband/core/device.c=1198=static __net_init int rdma_dev_init_net(struct net *net)
--
drivers/infiniband/core/device.c-1221- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:1222: xa_for_each_marked (&devices, index, dev, DEVICE_REGISTERED) {
drivers/infiniband/core/device.c-1223- /* Hold nets_rwsem so that netlink command cannot change
--
drivers/infiniband/core/device.c=1245=static int assign_name(struct ib_device *device, const char *name)
--
drivers/infiniband/core/device.c-1265-
drivers/infiniband/core/device.c:1266: ret = xa_alloc_cyclic(&devices, &device->index, device, xa_limit_31b,
drivers/infiniband/core/device.c-1267- &last_id, GFP_KERNEL);
--
drivers/infiniband/core/device.c=1304=static void disable_device(struct ib_device *device)
--
drivers/infiniband/core/device.c-1310- down_write(&devices_rwsem);
drivers/infiniband/core/device.c:1311: xa_clear_mark(&devices, device->index, DEVICE_REGISTERED);
drivers/infiniband/core/device.c-1312- up_write(&devices_rwsem);
--
drivers/infiniband/core/device.c=1347=static int enable_device_and_get(struct ib_device *device)
--
drivers/infiniband/core/device.c-1358- down_write(&devices_rwsem);
drivers/infiniband/core/device.c:1359: xa_set_mark(&devices, device->index, DEVICE_REGISTERED);
drivers/infiniband/core/device.c-1360-
--
drivers/infiniband/core/device.c=1655=void ib_unregister_driver(enum rdma_driver_id driver_id)
--
drivers/infiniband/core/device.c-1660- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:1661: xa_for_each (&devices, index, ib_dev) {
drivers/infiniband/core/device.c-1662- if (ib_dev->ops.driver_id != driver_id)
--
drivers/infiniband/core/device.c=1708=static bool rdma_dev_name_in_netns(struct ib_device *skip, struct net *net,
--
drivers/infiniband/core/device.c-1715-
drivers/infiniband/core/device.c:1716: xa_for_each(&devices, index, device)
drivers/infiniband/core/device.c-1717- if (device != skip &&
--
drivers/infiniband/core/device.c=2009=int ib_register_client(struct ib_client *client)
--
drivers/infiniband/core/device.c-2029- need_unreg = true;
drivers/infiniband/core/device.c:2030: xa_for_each_marked (&devices, index, device, DEVICE_REGISTERED) {
drivers/infiniband/core/device.c-2031- ret = add_client_context(device, client);
--
drivers/infiniband/core/device.c=2056=void ib_unregister_client(struct ib_client *client)
--
drivers/infiniband/core/device.c-2067- rcu_read_lock();
drivers/infiniband/core/device.c:2068: xa_for_each (&devices, index, device) {
drivers/infiniband/core/device.c-2069- if (!ib_device_try_get(device))
--
drivers/infiniband/core/device.c=2378=int ib_device_set_netdev(struct ib_device *ib_dev, struct net_device *ndev,
--
drivers/infiniband/core/device.c-2414- /* Make sure that the device is registered before we send events */
drivers/infiniband/core/device.c:2415: if (xa_load(&devices, ib_dev->index) != ib_dev)
drivers/infiniband/core/device.c-2416- return 0;
--
drivers/infiniband/core/device.c=2591=void ib_enum_all_roce_netdevs(roce_netdev_filter filter,
--
drivers/infiniband/core/device.c-2599- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:2600: xa_for_each_marked(&devices, index, dev, DEVICE_GID_UPDATES)
drivers/infiniband/core/device.c-2601- ib_enum_roce_netdev(dev, filter, filter_cookie, cb, cookie);
--
drivers/infiniband/core/device.c=2615=void ib_device_enable_gid_updates(struct ib_device *device)
--
drivers/infiniband/core/device.c-2617- down_write(&devices_rwsem);
drivers/infiniband/core/device.c:2618: xa_set_mark(&devices, device->index, DEVICE_GID_UPDATES);
drivers/infiniband/core/device.c-2619- up_write(&devices_rwsem);
--
drivers/infiniband/core/device.c=2629=void ib_device_disable_gid_updates(struct ib_device *device)
--
drivers/infiniband/core/device.c-2631- down_write(&devices_rwsem);
drivers/infiniband/core/device.c:2632: xa_clear_mark(&devices, device->index, DEVICE_GID_UPDATES);
drivers/infiniband/core/device.c-2633- up_write(&devices_rwsem);
--
drivers/infiniband/core/device.c=2642=int ib_enum_all_devs(nldev_callback nldev_cb, struct sk_buff *skb,
--
drivers/infiniband/core/device.c-2650- down_read(&devices_rwsem);
drivers/infiniband/core/device.c:2651: xa_for_each_marked (&devices, index, dev, DEVICE_REGISTERED) {
drivers/infiniband/core/device.c-2652- if (!rdma_dev_access_netns(dev, sock_net(skb->sk)))
--
drivers/infiniband/core/device.c=3317=static void __exit ib_core_cleanup(void)
--
drivers/infiniband/core/device.c-3336- WARN_ON(!xa_empty(&clients));
drivers/infiniband/core/device.c:3337: WARN_ON(!xa_empty(&devices));
drivers/infiniband/core/device.c-3338-}
]
|
| 56/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 61851
output: 37
thoughts: 2885
Thoughts: **RDMA Device Teardown and Namespace Synchronization**
Okay, so I'm digging into this `rdma_dev_exit_net` function, trying to understand the nuances of how RDMA devices are handled during network namespace teardown. My initial focus is on how compatibility devices (those created for legacy support) are removed and the interaction with the global device list. I see the function iterates through devices in the `devices` XArray and calls `remove_one_compat_dev`.
My immediate thought is: when and why would the device already be gone or be unregistered, and how would that interact with this process? The function calls `remove_one_compat_dev` which looks like it does all the cleanup, but it needs to find the correct compat device to remove. I remember that the compat device's `net` is written with `write_pnet` and _not_ `get_net`, so there's no reference held from the compat device to the network namespace. That's a red flag.
Deeper, I'm now looking at the sequence of operations in `add_one_compat_dev`. The critical steps appear to be: a mutex lock, a check for an existing compat device with the correct ID, allocation, initialization, device addition, and then the critical storage in `device->compat_devs` (another XArray) under mutex protection. The main concern here is that `device_add` seems like a potentially time-consuming operation, while the mutex is held, or perhaps a competing operation already modified the device. But what about the *order* of operations, which I'll be revisiting.
Then I get distracted by `disable_device`. In that function, a key step is the call to `remove_compat_devs`. And the logic here is that the device removal uses the same process, `xa_for_each`, and ultimately calls `device_del` on the compat device.
The `device_del` function is *crucial* because it triggers a `kobject_uevent` call, leading to a netlink broadcast via `kobject_uevent_net_broadcast`. This function's critical part calls `uevent_net_broadcast_tagged`, passing the `net->uevent_sock`. If the network namespace that "owns" the compat device has already been torn down (i.e. if `net` is freed), the reference to the uevent socket is invalid and the system crashes. I need to be *sure* that the network namespace associated with the compat device is valid when this `device_del` operation happens.
A crucial point here is that `rdma_init_coredev` does a `write_pnet` and does NOT hold a `get_net(net)`. Therefore, the lifetime of the `net` and `cdev` are not linked!
Next I'm reviewing the `cleanup_net` process, which runs several `ops` on pernet lists. There's `uevent_net_ops`, which handles uevents and then `rdma_dev_net_ops` is called. The order of execution is crucial here!
My suspicion is that a race condition exists where the network namespace is cleaned up *before* `device_del` for the compat device is called, leading to an invalid pointer dereference within the uevent broadcast. The key question is whether or not `uevent_net_ops` are called *before* `rdma_dev_net_ops`. I know `uevent_net_ops` is registered with `postcore_initcall`, and I need to investigate the registration of `rdma_dev_net_ops` to determine the order! I should be able to look at how `ops_undo_list` and `ops_exit_list` are used in `net/core/net_namespace.c` to see the actual order the pernet operations are run.
|
| 57/2 |
2026/09/14 00:48 |
tool |
read-file |
0m
Args: map[File:net/core/net_namespace.c FirstLine:190 LineCount:70]
Results: map[Contents: 190: rtnl_unlock();
191: }
192:
193: static void ops_exit_list(const struct pernet_operations *ops,
194: struct list_head *net_exit_list)
195: {
196: if (ops->exit) {
197: struct net *net;
198:
199: list_for_each_entry(net, net_exit_list, exit_list) {
200: ops->exit(net);
201: cond_resched();
202: }
203: }
204:
205: if (ops->exit_batch)
206: ops->exit_batch(net_exit_list);
207: }
208:
209: static void ops_free_list(const struct pernet_operations *ops,
210: struct list_head *net_exit_list)
211: {
212: struct net *net;
213:
214: if (ops->id) {
215: list_for_each_entry(net, net_exit_list, exit_list)
216: kfree(net_generic(net, *ops->id));
217: }
218: }
219:
220: static void ops_undo_list(const struct list_head *ops_list,
221: const struct pernet_operations *ops,
222: struct list_head *net_exit_list,
223: bool expedite_rcu)
224: {
225: const struct pernet_operations *saved_ops;
226: bool hold_rtnl = false;
227:
228: if (!ops)
229: ops = list_entry(ops_list, typeof(*ops), list);
230:
231: saved_ops = ops;
232:
233: list_for_each_entry_continue_reverse(ops, ops_list, list) {
234: hold_rtnl |= !!ops->exit_rtnl;
235: ops_pre_exit_list(ops, net_exit_list);
236: }
237:
238: /* Another CPU might be rcu-iterating the list, wait for it.
239: * This needs to be before calling the exit() notifiers, so the
240: * rcu_barrier() after ops_undo_list() isn't sufficient alone.
241: * Also the pre_exit() and exit() methods need this barrier.
242: */
243: if (expedite_rcu)
244: synchronize_rcu_expedited();
245: else
246: synchronize_rcu();
247:
248: if (hold_rtnl)
249: ops_exit_rtnl_list(ops_list, saved_ops, net_exit_list);
250:
251: ops = saved_ops;
252: list_for_each_entry_continue_reverse(ops, ops_list, list)
253: ops_exit_list(ops, net_exit_list);
254:
255: ops = saved_ops;
256: list_for_each_entry_continue_reverse(ops, ops_list, list)
257: ops_free_list(ops, net_exit_list);
258: }
259:
]
|
| 58/2 |
2026/09/14 00:48 |
llm |
expert |
0m
Model:
Tokens:
input: 66640
output: 49
thoughts: 1164
Thoughts: **RDMA Device Teardown: A Concurrency Nightmare?**
Okay, let's break this down. I'm looking at the network namespace teardown and how it interacts with RDMA device unregistration. First, I'm tracing the execution order. It seems `ops_undo_list` dictates the sequence of subsystem and device exit routines. Subsystems are registered *before* devices, so they should be cleaned up *last* during namespace teardown. This means `uevent_net_exit` runs *after* `rdma_dev_exit_net`. Since `uevent_net_exit` frees `net->uevent_sock` during namespace cleanup, the namespace is essentially gone when `rdma_dev_exit_net` completes.
The puzzle is how `remove_compat_devs` is involved within `ib_unregister_work`. `ib_unregister_work` seems to be the critical function, and within its call chain lies the culprit: `remove_compat_devs`. I'm starting to think `rdma_dev_exit_net` is the source of the trouble. Specifically, `rdma_dev_exit_net` calls `remove_one_compat_dev` within an XArray iteration: `xa_for_each (&devices, index, dev)`.
A key observation here: Within the `xa_for_each` loop, `rdma_dev_exit_net` releases `devices_rwsem` and reacquires it. Hold on, that's incredibly dangerous! If `devices` is modified between the `up_read` and the `down_read` calls, we have a classic race condition. Imagine `ib_register_device` or `add_compat_devs` runs concurrently, modifying the `devices` XArray while we are iterating over it in `rdma_dev_exit_net`! Or, even worse, `ib_unregister_device_queued` could be called! That would also modify `devices`.
So, the issue is likely a data race in `rdma_dev_exit_net`. The unregister operation likely modifies the `devices` XArray in an inconsistent way.
|
| 59/2 |
2026/09/14 00:49 |
tool |
codesearch-find-references |
0m
Args: map[ContextFile:drivers/infiniband/core/device.c IncludeSnippetLines:5 Name:ib_unregister_device_queued]
Results: map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:rxe_notify SourceFile:drivers/infiniband/sw/rxe/rxe_net.c SourceLine:725 SourceSnippet: 720: if (!rxe)
721: return NOTIFY_OK;
722:
723: switch (event) {
724: case NETDEV_UNREGISTER:
725: ib_unregister_device_queued(&rxe->ib_dev);
726: rxe_net_del(&rxe->ib_dev);
727: break;
728: case NETDEV_CHANGEMTU:
729: rxe_dbg_dev(rxe, "%s changed mtu to %d\n", ndev->name, ndev->mtu);
730: rxe_set_mtu(rxe, ndev->mtu);
] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:siw_netdev_event SourceFile:drivers/infiniband/sw/siw/siw_main.c SourceLine:391 SourceSnippet: 386: */
387: siw_dbg(base_dev, "unexpected NETDEV_REGISTER event\n");
388: break;
389:
390: case NETDEV_UNREGISTER:
391: ib_unregister_device_queued(&sdev->base_dev);
392: break;
393:
394: case NETDEV_CHANGEADDR:
395: siw_port_event(sdev, 1, IB_EVENT_LID_CHANGE);
396: break;
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_ib_unregister_device_queued_1040 SourceFile:drivers/infiniband/core/device.c SourceLine:1706 SourceSnippet:1706: EXPORT_SYMBOL(ib_unregister_device_queued);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_ib_unregister_device_queued SourceFile:drivers/infiniband/core/device.c SourceLine:1706 SourceSnippet:1706: EXPORT_SYMBOL(ib_unregister_device_queued);
] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_ib_unregister_device_queued SourceFile:drivers/infiniband/core/device.c SourceLine:1706 SourceSnippet:1706: EXPORT_SYMBOL(ib_unregister_device_queued);
]] TruncatedOutput:false]
|
| 60/2 |
2026/09/14 00:49 |
llm |
expert |
0m
Model:
Tokens:
input: 69109
output: 43
thoughts: 488
Thoughts: **The Unregistering Nightmare: A Deep Dive into the UAF Bug**
Okay, here's what's happening. I'm looking at this unregister process and I see a potential SLAB-USE-AFTER-FREE bug. It's a classic race condition and it's making my spidey senses tingle. Let's break this down:
First, when a network namespace is destroyed, we start tearing down the network devices. This triggers a `NETDEV_UNREGISTER` event. *Excellent*, I see where it's happening, `rxe_notify` and `siw_netdev_event` are the culprits. They immediately call `ib_unregister_device_queued(...)` for their respective devices.
Then, `ib_unregister_device_queued` sensibly queues work to `ib_unregister_work` using `ib_unreg_wq`. *Good*, we're deferring the actual unregistration. Meanwhile, `cleanup_net` is proceeding with the network namespace teardown concurrently. *This is where things could go wrong*.
`cleanup_net` then calls `uevent_net_exit` which frees the `uevent_sock` using `kfree(ue_sk)`. Now, this socket is how uevents get triggered. At the same time on a separate thread, `ib_unregister_work` is running. This calls `__ib_unregister_device` and goes down a chain: `disable_device`, `remove_compat_devs`, `remove_one_compat_dev`, and eventually... `device_del`.
This, in turn, calls `kobject_uevent(&cdev->dev.kobj, KOBJ_REMOVE)`. This triggers `kobject_uevent_net_broadcast` which attempts to send the uevent for this device. Inside it, it figures out the namespace by calling `kobj->ktype->namespace(kobj)` which returns `net->ns`. Thatβs right, it calls `uevent_net_broadcast_tagged(net->uevent_sock->sk, ...)` to send the uevent... But, here's the catch! We are accessing `net->uevent_sock->sk` *after* it's been freed by `uevent_net_exit`! The `net->uevent_sock` has been cleaned up. *That's it*. SLAB-USE-AFTER-FREE!
|
| 61/2 |
2026/09/14 00:49 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/infiniband/core/device.c Name:ib_unregister_device_queued]
Results: map[SourceCode:1687: /**
1688: * ib_unregister_device_queued - Unregister a device using a work queue
1689: * @ib_dev: The device to unregister
1690: *
1691: * This schedules an asynchronous unregistration using a WQ for the device. A
1692: * driver should use this to avoid holding locks while doing unregistration,
1693: * such as holding the RTNL lock.
1694: *
1695: * Drivers using this API must use ib_unregister_driver before module unload
1696: * to ensure that all scheduled unregistrations have completed.
1697: */
1698: void ib_unregister_device_queued(struct ib_device *ib_dev)
1699: {
1700: WARN_ON(!refcount_read(&ib_dev->refcount));
1701: WARN_ON(!ib_dev->ops.dealloc_driver);
1702: get_device(&ib_dev->dev);
1703: if (!queue_work(ib_unreg_wq, &ib_dev->unregistration_work))
1704: put_device(&ib_dev->dev);
1705: }
SourceFile:drivers/infiniband/core/device.c]
|
| 62/2 |
2026/09/14 00:49 |
llm |
expert-compressor |
0m
Model:
Reply: ### 1. Approaches Tried and Results
* **Crash Report Analysis**:
- Investigated KASAN slab-use-after-free report on ARM64 (`ffff0000f621ced0`).
- Read access of size 8 at offset +16 within a 32-byte object allocated from `kmalloc-32` (`[ffff0000f621cec0, ffff0000f621cee0)`).
- Confirmed all 3 KASAN stack traces are present:
1. **Bad access stack**:
- Task: `kworker/u8:17/6617` running workqueue `ib-unreg-wq ib_unregister_work`.
- Path: `ib_unregister_work` -> `__ib_unregister_device` -> `disable_device` -> `remove_compat_devs` -> `remove_one_compat_dev` -> `device_del` -> `kobject_uevent` -> `kobject_uevent_env` -> `kobject_uevent_net_broadcast` (`lib/kobject_uevent.c:415`).
2. **Allocation stack**:
- Task: 7081 creating net namespace during process fork / clone (`kernel_clone` -> `copy_process` -> `copy_namespaces` -> `create_new_namespaces` -> `copy_net_ns` -> `setup_net` -> `ops_init` -> `uevent_net_init` (`lib/kobject_uevent.c:782`)).
- Allocates `struct uevent_sock` via `kzalloc_obj(*ue_sk)`.
3. **Free stack**:
- Task: 13 running network namespace teardown workqueue (`cleanup_net` -> `ops_undo_list` -> `ops_exit_list` -> `uevent_net_exit` (`lib/kobject_uevent.c:816`)).
- Frees `ue_sk` via `kfree(ue_sk)`.
* **Code Verification of Relevant Structs and Call Paths**:
- Checked `struct uevent_sock` layout in `lib/kobject_uevent.c`:
- Offset 0: `struct list_head list` (16 bytes).
- Offset 16: `struct sock *sk` (8 bytes).
- Object size: 24 bytes (fits in `kmalloc-32`).
- Checked line 415 in `lib/kobject_uevent.c` inside `kobject_uevent_net_broadcast`:
```c
const struct net *net = container_of(ns, struct net, ns);
ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env, action_string, devpath);
```
Dereference of `net->uevent_sock->sk` reads offset +16 (`0x10`) of `net->uevent_sock`, perfectly matching `Read of size 8 at addr ffff0000f621ced0` where object starts at `ffff0000f621cec0`.
- Investigated how `ns` is obtained:
```c
if (ops && ops->netlink_ns && kobj->ktype->namespace)
if (ops->type == KOBJ_NS_TYPE_NET)
ns = kobj->ktype->namespace(kobj);
```
- Traced `drivers/infiniband/core/device.c`:
- `cdev` is `struct ib_core_device` initialized via `rdma_init_coredev(cdev, device, read_pnet(&rnet->net))`:
- `cdev->dev.class = &ib_class;`
- `write_pnet(&coredev->rdma_net, net);`
- `ib_class` defines `.ns_type = &net_ns_type_operations`, `.namespace = net_namespace`.
- `net_namespace(dev)` returns `to_ns_common(read_pnet(&coredev->rdma_net))`.
- `write_pnet(&coredev->rdma_net, net)` does NOT take a reference to `struct net` (`get_net()`), holding only an uncounted/passive pointer.
- Investigated device unregistration and net teardown ordering:
- Compat devices (`cdev`) are added for network namespaces other than the device's primary netns.
- When a net namespace is destroyed, `cleanup_net` calls `ops_undo_list(&pernet_list, ...)`.
- `uevent_net_ops` is registered with `register_pernet_subsys` (`lib/kobject_uevent.c:826`).
- `rdma_dev_net_ops` is registered with `register_pernet_device` (`drivers/infiniband/core/device.c:3274`).
- Subsystem ops run before/after device ops during exit/cleanup. Furthermore, `rdma_dev_exit_net` removes compat devs from active devices, but asynchronous IB unregistration (`ib_unregister_work` running on `ib-unreg-wq`) can race with netns teardown:
- `uevent_net_exit()` frees `net->uevent_sock` during `cleanup_net`.
- Concurrently or subsequently, `ib_unregister_work` runs `__ib_unregister_device() -> disable_device() -> remove_compat_devs() -> remove_one_compat_dev() -> device_del(&cdev->dev)`.
- `device_del` generates a uevent (`KOBJ_REMOVE`), calling `kobject_uevent()`.
- `kobject_uevent_net_broadcast` gets `net` via `net_namespace(&cdev->dev)` and accesses `net->uevent_sock->sk`, triggering UAF on already-freed `net->uevent_sock`.
* **Git Log Queries (Dead-ends / Workspace specifics)**:
- `git-log` queries for commits matching `uevent_sock` and `compat_dev` yielded empty output or commit `5445d6419962` due to git history in the workspace being shallow or a single commit root snapshot. Avoid further broad git history searches in this workspace.
### 2. Current Hypotheses and Root Cause Analysis
* **Assessment: The bug report is fully actionable and self-consistent.**
* **Consistency Check**:
- 3 stacks are present: Bad access, Allocation, Free.
- Object type: `struct uevent_sock` allocated in `lib/kobject_uevent.c` (`uevent_net_init`) and freed in `lib/kobject_uevent.c` (`uevent_net_exit`).
- Access is in `lib/kobject_uevent.c` (`kobject_uevent_net_broadcast`) dereferencing `net->uevent_sock->sk` at offset 16 (matches `struct uevent_sock` offset of `sk`).
- Subsystems match: Network / sysfs / kobject uevent subsystem and InfiniBand core device interactions with net namespaces.
- Root cause: Race condition / lifetime mismatch between network namespace destruction (`cleanup_net` freeing `uevent_sock`) and asynchronous RDMA device unregistration (`ib_unregister_work` executing `device_del()` on a compat device pointing to the exiting/exited `net`, emitting a uevent to a destroyed netns's uevent socket).
### 3. Critical Files and Code Snippets
* `lib/kobject_uevent.c`:
- Lines 412β417:
```c
const struct net *net = container_of(ns, struct net, ns);
ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env,
action_string, devpath);
```
- Lines 773β803 (`uevent_net_init`):
```c
ue_sk = kzalloc_obj(*ue_sk);
...
net->uevent_sock = ue_sk;
```
- Lines 805β817 (`uevent_net_exit`):
```c
struct uevent_sock *ue_sk = net->uevent_sock;
...
netlink_kernel_release(ue_sk->sk);
kfree(ue_sk);
```
* `drivers/infiniband/core/device.c`:
- `rdma_init_coredev`:
```c
coredev->dev.class = &ib_class;
...
write_pnet(&coredev->rdma_net, net);
```
- `net_namespace`:
```c
static const struct ns_common *net_namespace(const struct device *d)
{
const struct ib_core_device *coredev = container_of(d, struct ib_core_device, dev);
struct net *net = read_pnet(&coredev->rdma_net);
return net ? to_ns_common(net) : NULL;
}
```
- `disable_device` / `remove_compat_devs`:
```c
remove_compat_devs(device);
```
which invokes `device_del(&cdev->dev)`.
### 4. Watchouts for Next Steps
* Git history is limited to the current HEAD commit in this repository clone; avoid repeating git-log queries across history.
* The investigation is complete. Per system instructions:
- Must call `set-results` tool exactly once before the final reply.
- Explain in final reply why report is actionable and self-consistent.
Tokens:
input: 45069
output: 2280
thoughts: 0
|
| 63/2 |
2026/09/14 00:49 |
llm |
expert |
0m
Model:
Tokens:
input: 20629
output: 15
thoughts: 0
|
| 64/2 |
2026/09/14 00:49 |
tool |
set-results |
0m
Args:
Results:
|
| 65/2 |
2026/09/14 00:49 |
llm |
expert |
0m
Model:
Tokens:
input: 20657
output: 963
thoughts: 0
|
| 66/1 |
2026/09/14 00:49 |
action |
format-explanation |
0m
Results: map[Explanation:An analysis of the bug report and kernel source code confirms that this bug
report is **actionable** and **self-consistent**.
### Analysis and Findings
1. **Stack Traces**:
The report contains all 3 required KASAN stack traces (allocation, free, and
bad access), which are clean and directly correlate with one another:
- **Allocation Stack**: Task 7081 creating a new network namespace (`clone` /
`copy_net_ns` -> `setup_net` -> `ops_init` -> `uevent_net_init` at
`lib/kobject_uevent.c:782`), allocating `struct uevent_sock` via
`kzalloc_obj(*ue_sk)`.
- **Free Stack**: Task 13 tearing down the network namespace via workqueue
(`cleanup_net` -> `ops_undo_list` -> `ops_exit_list` -> `uevent_net_exit` at
`lib/kobject_uevent.c:816`), releasing `ue_sk->sk` and freeing `ue_sk` via
`kfree(ue_sk)`.
- **Bad Access Stack**: Worker `ib-unreg-wq` running `ib_unregister_work` ->
`__ib_unregister_device` -> `disable_device` -> `remove_compat_devs` ->
`remove_one_compat_dev` -> `device_del` -> `kobject_uevent` ->
`kobject_uevent_net_broadcast` at `lib/kobject_uevent.c:415`.
2. **Object Type and Memory Offset Consistency**:
- `struct uevent_sock` contains:
- `struct list_head list` (16 bytes, offset 0β15)
- `struct sock *sk` (8 bytes, offset 16β23)
- Total size: 24 bytes, which is allocated from the `kmalloc-32` slab
cache.
- The crash report indicates a slab-use-after-free read of size 8 at
`ffff0000f621ced0`, exactly 16 bytes (+0x10) into the 32-byte object
(`[ffff0000f621cec0, ffff0000f621cee0)`).
- In `lib/kobject_uevent.c:415`:
```c
const struct net *net = container_of(ns, struct net, ns);
ret = uevent_net_broadcast_tagged(net->uevent_sock->sk, env, action_string,
devpath);
```
Dereferencing `net->uevent_sock->sk` performs an 8-byte load at offset 16
of `net->uevent_sock`, matching the crash report exactly.
3. **Subsystem and Mechanism Consistency (Root Cause)**:
- InfiniBand compat devices (`struct ib_core_device cdev`) created for
secondary network namespaces store a pointer to `struct net`
(`write_pnet(&coredev->rdma_net, net)`), without taking a reference count to
`struct net`.
- Its class (`ib_class`) defines namespace operations pointing to
`net_namespace()`, returning `coredev->rdma_net`.
- When a network namespace is destroyed, `cleanup_net()` executes
`uevent_net_exit()` (registered as a pernet subsys), freeing
`net->uevent_sock`.
- Asynchronous IB device unregistration (`ib_unregister_device_queued` via
`ib-unreg-wq`) concurrently or subsequently unregisters devices and calls
`device_del(&cdev->dev)` on the compat devices.
- `device_del()` emits a uevent (`KOBJ_REMOVE`), where
`kobject_uevent_net_broadcast()` looks up the namespace associated with the
device (`cdev->dev`) and accesses `net->uevent_sock->sk`, triggering
use-after-free on the already freed `uevent_sock`.
Since all three stack traces align to the same object type (`struct
uevent_sock`), the memory access offset and size match the struct layout
precisely, and the race between netns exit and async IB unregistration is fully
clear, the bug is self-consistent and actionable.]
|