| 0/0 |
2026/09/17 01:36 |
flow |
assessment-security |
52m
Results: map[DenialOfService:false Explanation:**Bug Analysis:**
The bug report describes a `WARNING` triggered in `native_smp_send_reschedule()`
at `arch/x86/kernel/apic/ipi.c:71`. The warning message is `"sched: Unexpected
reschedule of offline CPU#%d!\n"`.
This occurs due to a known race condition between CPU hotplug (offlining a CPU)
and the Completely Fair Scheduler (CFS) load balancing mechanism:
1. When a CPU is being taken offline, it first clears its bit in the
`cpu_online_mask` (via `set_cpu_online(cpu, false)`). After this, it proceeds to
park its `cpu_stopper` thread.
2. Concurrently, another CPU might be performing idle load balancing
(`sched_balance_newidle()` -> `sched_balance_rq()`). It can select the dying CPU
as the `busiest` and attempt to initiate active load balancing by calling
`stop_one_cpu_nowait()`.
3. Because the dying CPU's stopper thread hasn't been fully parked yet
(`stopper->enabled` is still true), the active balance work is queued, and the
scheduler attempts to wake up the stopper thread on the dying CPU
(`wake_up_process()`).
4. Waking up a thread pinned to another CPU requires sending a reschedule
Inter-Processor Interrupt (IPI). The scheduler calls `smp_send_reschedule()`,
which on x86 maps to `native_smp_send_reschedule()`.
5. Inside `native_smp_send_reschedule()`, the kernel checks if the target CPU is
offline (`cpu_is_offline(cpu)`). Since the dying CPU already cleared its online
bit in step 1, this check evaluates to true, triggering the `WARN` and safely
returning without sending the IPI.
**Security Assessment:**
* **Exploitable:** **No.**
The warning is purely diagnostic. The code explicitly handles this race
condition gracefully by checking `if (unlikely(cpu_is_offline(cpu)))`, logging
the warning, and immediately returning (`return;`). There is no memory
corruption, use-after-free, out-of-bounds access, or information leak. The
scheduler state and stopper threads are safely cleaned up by the remainder of
the CPU hotplug teardown process.
* **Denial of Service (DoS):** **No.**
In production builds (where `panic_on_warn` is not enabled), this is a
non-fatal warning. The system continues to operate normally, and the missed
reschedule IPI is harmless since the target CPU is going offline anyway.
* **Accessible From Unprivileged Processes:** **No.**
Triggering this race condition requires the ability to offline a CPU (e.g., by
writing `0` to `/sys/devices/system/cpu/cpuX/online`). This action strictly
requires root privileges (`CAP_SYS_ADMIN`). An unprivileged user cannot
initiate CPU hotplug operations.
* **Accessible From User Namespaces:** **No.**
The `sysfs` interface for CPU hotplug is not delegated to unprivileged user
namespaces. It requires global `CAP_SYS_ADMIN` in the initial namespace.
* **Other Triggers (Network, Peripheral, Filesystem, VM):** **No.**
This is a core kernel scheduler and CPU hotplug race condition. It cannot be
triggered remotely via network packets, malicious filesystems, or untrusted
peripherals, nor is it a hypervisor escape from a VM guest. Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
|
| 1/1 |
2026/09/17 01:36 |
action |
syz-repro-to-c-repro |
0m
Results:
|
| 2/1 |
2026/09/17 01:36 |
action |
kernel-checkouter |
1m
Results: map[KernelSrc:/app/workdir/cache/src/2cdaf153cabd78973521a8be1c8d096fdeea4498]
|
| 3/1 |
2026/09/17 01:38 |
action |
kernel-builder |
25m
Results: map[KernelObj:/app/workdir/cache/build/150e6ef4efba1f9b8215b3783e87c1f6ff824509]
|
| 4/1 |
2026/09/17 02:03 |
action |
codesearch-prepare |
17m
Results: map[Index:codesearch-index]
|
| 5/1 |
2026/09/17 02:20 |
agent |
expert |
8m
Model:
Results: map[DenialOfService:false Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
Instruction: You are an experienced Linux kernel security engineer. Your task is to analyze given kernel bug report
and determine its security impact based on the following dimensions.
Use the provided tools to examine the source code, check for capability checks (e.g., capable(), ns_capable()),
and understand the nature of the bug. Analyze the given kernel build and configuration.
You can check the kernel config by grepping ".config" file; you can check kernel cmdline by grepping
".config" file for "CONFIG_CMDLINE=". Assume sysctl parameters have default values.
But analyze for the corresponding production build w/o debugging tools enabled (like KASAN, KMSAN, UBSAN).
Try different strategies when analyzing the bug:
- think of ways in which the vulnerable code is unreachable
- or the other way around: try to come up with different ideas of how an unprivileged user can reach the bug
If still unsure err on the side of the bug being non-exploitable/not-accessible.
In the final reply, provide a reasoning for your assessment.
Analysis dimensions:
* Exploitable:
Determine if the bug can result in memory corruption, elevated privileges, or an information leak.
Memory safety issues are almost always exploitable (KASAN or UBSAN reports for use-after-free, out-of-bounds;
refcounting issues, corrupted lists, etc). When kernel is crashing on a completely wild pointer access
(e.g. user-space address, or non-canonical address, but not on NULL or address corresponding to KASAN shadow
for NULL address), including both data accesses and control transfers, that also usually implies possibility
of exploitation. Such reports usually say "unable to handle kernel paging request".
Uses of uninitialized values detected by KMSAN may be exploitable b/c attacker frequently can affect uninit
values with spraying techniques. However, for these exploitability depends on how exactly the uninit value
is used in the code, and what it affects.
Information leaks are exploitable on their own and should be classified as such. A bug that copies kernel
memory contents to userspace (e.g. an out-of-bounds read whose result is returned to the caller, or
uninitialized stack/heap bytes written to a user buffer) is exploitable: it can reveal kernel pointer
values and defeat KASLR, expose sensitive data such as cryptographic keys or other processes' memory, and
serves as a necessary building block in most modern kernel privilege-escalation exploit chains. Do not classify
an information leak as non-exploitable solely because it does not directly cause a memory write or control-flow
hijack; the leak itself is the exploit primitive.
Think of what happens after the bug is triggered. Some bugs cause kernel panic and halt execution,
they are harder to exploit. For example, BUG reports halts the kernel. However, WARNING reports don't halt
execution in production builds. Debug bug detection tools (like KASAN, KMSAN, KCSAN, UBSAN) are also not enabled
in production builds, so attacker can freely exploit these bugs w/o being detected by these tools.
If you see an integer overflow, think how the overflowed value used later (if it's used as allocation size,
or an array index). If you see an out-of-bounds read, think if it's followed by an out-of-bounds write as well.
Some KCSAN data-races may be exploitable by skilled attackers as well. Think what data structures got corrupted
as the result of data races and how. However, note that kernel has lots of "benign" data races that don't lead
to any runtime misbehavior at all.
* Denial Of Service:
Determine if the bug can result in denial-of-service. Most bugs can, since they cause system crash,
hangs, deadlocks, or resource leaks. This is mostly applicable to WARNING bugs that won't cause system crash
in production. For these think what will be consequences of the violation of the kernel assumptions flagged
by the WARNING. In some cases the unexpected condition is also properly handled by the normal control flow
(e.g. with "if (WARN_ON(...))"), these won't cause denial-of-service. If the condition is not handled,
then it may or may not cause denial-of-service.
* Accessible From Unprivileged Processes:
Determine if the bug can be reached from a typical (non-root) user process that does NOT have any special capabilities
(like CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON) or access to device nodes restricted to root.
Assume that unprivileged_bpf_disabled=1, that is eBPF loading is not accessible. However, cBPF (classical BPF)
is still accessible to non-root processes.
Assume that user namespaces are not accessible, that is, the process cannot get the mentioned capabilities even
within a new user namespace (checked by ns_capable() function in the kernel sources).
* Accessible From User Namespaces:
Determine if the bug can be reached within a user-namespace where the process has all capabilities
(including CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON). Such capabilities are checked with ns_capable()
function in the kernel sources.
* VM Guest Trigger:
Determine if the bug can be triggered from the context of a typical KVM guest (e.g., set up by a QEMU VMM).
Consider accesses to standard Linux host paravirtualized features (virtio-blk, virtio-net, etc.),
and handling of VM exits in the KVM code.
* VM Host Trigger in The Confidential Computing Context:
Determine if the bug can be triggered in a confidential computing guest kernel from the context of a KVM host.
Consider access to standard Linux guest paravirtualized features (virtio-blk, virtio-net, etc.).
* Ethernet Network Trigger:
Determine if the bug can be triggered by processing ingress network Ethernet traffic, either directly (network stack)
or via drivers exposed to network data.
* Other Remote Trigger:
Determine if the bug can be triggered by processing remote traffic other than Ethernet (Wifi, Bluetooth, NFC, etc).
* Peripheral Trigger:
Determine if the bug can be triggered via an untrusted peripheral device that can be physically plugged
into a system, such as a USB device or a niche hardware driver handling external hardware inputs.
This is particularly important for mobile and desktop environments where users can plug in unknown devices.
* Malicious Filesystem Trigger:
Determine if the bug can be triggered by the kernel mounting and parsing a malicious filesystem image.
This is highly critical for Desktop and Mobile environments where external media or downloaded images
might be auto-mounted.
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 kernel bug report is:
------------[ cut here ]------------
sched: Unexpected reschedule of offline CPU#3!
WARNING: arch/x86/kernel/apic/ipi.c:71 at native_smp_send_reschedule+0x4d/0x60 arch/x86/kernel/apic/ipi.c:71, CPU#2: kworker/u32:4/5842
Modules linked in:
CPU: 2 UID: 0 PID: 5842 Comm: kworker/u32:4 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: netns cleanup_net
RIP: 0010:native_smp_send_reschedule+0x4f/0x60 arch/x86/kernel/apic/ipi.c:71
Code: b0 c6 00 48 0f a3 2d a8 86 8e 0f 73 14 89 df be fd 00 00 00 5b 5d e9 a0 2a 01 00 90 0f 0b 90 eb c7 48 8d 3d 63 3f 91 0f 89 de <67> 48 0f b9 3a 5b 5d e9 05 b6 19 0a 0f 1f 44 00 00 90 90 90 90 90
RSP: 0018:ffffc9000617ee40 EFLAGS: 00010046
RAX: 0000000000000001 RBX: 0000000000000003 RCX: ffffffff81b69fa8
RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffffffff9147df30
RBP: 0000000000000003 R08: 0000000000000000 R09: fffffbfff228a4cb
R10: ffffffff9145265f R11: 0000000000000003 R12: 0000000000000004
R13: 1ffff92000c2fdcc R14: ffffc9000617ee80 R15: 0000000000000010
FS: 0000000000000000(0000) GS:ffff888096b67000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a33142b090 CR3: 000000000eb96000 CR4: 0000000000350ef0
DR0: ffffffffffffffff DR1: 00000000000001f8 DR2: 0000000000000083
DR3: ffffffffefffff15 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
arch_smp_send_reschedule arch/x86/include/asm/smp.h:90 [inline]
__resched_curr+0x2db/0x500 kernel/sched/core.c:1225
wakeup_preempt+0xd0/0x400 kernel/sched/core.c:2301
ttwu_do_activate+0x1ad/0x800 kernel/sched/core.c:3835
ttwu_queue kernel/sched/core.c:4087 [inline]
try_to_wake_up+0xcf0/0x1c90 kernel/sched/core.c:4425
cpu_stop_queue_work+0x271/0x340 kernel/stop_machine.c:108
stop_one_cpu_nowait+0xe8/0x160 kernel/stop_machine.c:387
sched_balance_rq+0x317c/0x48b0 kernel/sched/fair.c:13661
sched_balance_newidle kernel/sched/fair.c:14627 [inline]
pick_task_fair+0xb6b/0x1e00 kernel/sched/fair.c:10073
__pick_next_task+0x105/0x710 kernel/sched/core.c:6159
pick_next_task kernel/sched/core.c:6257 [inline]
__schedule+0x57f/0x6920 kernel/sched/core.c:7185
__schedule_loop kernel/sched/core.c:7347 [inline]
schedule+0xdd/0x2c0 kernel/sched/core.c:7362
schedule_timeout+0x1b2/0x280 kernel/time/sleep_timeout.c:75
do_wait_for_common kernel/sched/completion.c:100 [inline]
__wait_for_common+0x2e7/0x4c0 kernel/sched/completion.c:121
kthread_stop+0x18e/0x630 kernel/kthread.c:760
rxrpc_unuse_local+0x107/0x140 net/rxrpc/local_object.c:409
rxrpc_release_sock net/rxrpc/af_rxrpc.c:967 [inline]
rxrpc_release+0x384/0x6a0 net/rxrpc/af_rxrpc.c:994
__sock_release net/socket.c:735 [inline]
sock_release+0x91/0x1c0 net/socket.c:763
afs_close_socket+0x24b/0x410 fs/afs/rxrpc.c:154
afs_net_exit+0x93/0x150 fs/afs/main.c:149
ops_exit_list net/core/net_namespace.c:200 [inline]
ops_undo_list+0x2ee/0xab0 net/core/net_namespace.c:253
cleanup_net+0x499/0x920 net/core/net_namespace.c:706
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3387
process_scheduled_works kernel/workqueue.c:3470 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3551
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
----------------
Code disassembly (best guess):
0: b0 c6 mov $0xc6,%al
2: 00 48 0f add %cl,0xf(%rax)
5: a3 2d a8 86 8e 0f 73 movabs %eax,0x8914730f8e86a82d
c: 14 89
e: df be fd 00 00 00 fistpll 0xfd(%rsi)
14: 5b pop %rbx
15: 5d pop %rbp
16: e9 a0 2a 01 00 jmp 0x12abb
1b: 90 nop
1c: 0f 0b ud2
1e: 90 nop
1f: eb c7 jmp 0xffffffe8
21: 48 8d 3d 63 3f 91 0f lea 0xf913f63(%rip),%rdi # 0xf913f8b
28: 89 de mov %ebx,%esi
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: 5b pop %rbx
30: 5d pop %rbp
31: e9 05 b6 19 0a jmp 0xa19b63b
36: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 90 nop
3f: 90 nop
Reply: **Bug Analysis:**
The bug report describes a `WARNING` triggered in `native_smp_send_reschedule()` at `arch/x86/kernel/apic/ipi.c:71`. The warning message is `"sched: Unexpected reschedule of offline CPU#%d!\n"`.
This occurs due to a known race condition between CPU hotplug (offlining a CPU) and the Completely Fair Scheduler (CFS) load balancing mechanism:
1. When a CPU is being taken offline, it first clears its bit in the `cpu_online_mask` (via `set_cpu_online(cpu, false)`). After this, it proceeds to park its `cpu_stopper` thread.
2. Concurrently, another CPU might be performing idle load balancing (`sched_balance_newidle()` -> `sched_balance_rq()`). It can select the dying CPU as the `busiest` and attempt to initiate active load balancing by calling `stop_one_cpu_nowait()`.
3. Because the dying CPU's stopper thread hasn't been fully parked yet (`stopper->enabled` is still true), the active balance work is queued, and the scheduler attempts to wake up the stopper thread on the dying CPU (`wake_up_process()`).
4. Waking up a thread pinned to another CPU requires sending a reschedule Inter-Processor Interrupt (IPI). The scheduler calls `smp_send_reschedule()`, which on x86 maps to `native_smp_send_reschedule()`.
5. Inside `native_smp_send_reschedule()`, the kernel checks if the target CPU is offline (`cpu_is_offline(cpu)`). Since the dying CPU already cleared its online bit in step 1, this check evaluates to true, triggering the `WARN` and safely returning without sending the IPI.
**Security Assessment:**
* **Exploitable:** **No.**
The warning is purely diagnostic. The code explicitly handles this race condition gracefully by checking `if (unlikely(cpu_is_offline(cpu)))`, logging the warning, and immediately returning (`return;`). There is no memory corruption, use-after-free, out-of-bounds access, or information leak. The scheduler state and stopper threads are safely cleaned up by the remainder of the CPU hotplug teardown process.
* **Denial of Service (DoS):** **No.**
In production builds (where `panic_on_warn` is not enabled), this is a non-fatal warning. The system continues to operate normally, and the missed reschedule IPI is harmless since the target CPU is going offline anyway.
* **Accessible From Unprivileged Processes:** **No.**
Triggering this race condition requires the ability to offline a CPU (e.g., by writing `0` to `/sys/devices/system/cpu/cpuX/online`). This action strictly requires root privileges (`CAP_SYS_ADMIN`). An unprivileged user cannot initiate CPU hotplug operations.
* **Accessible From User Namespaces:** **No.**
The `sysfs` interface for CPU hotplug is not delegated to unprivileged user namespaces. It requires global `CAP_SYS_ADMIN` in the initial namespace.
* **Other Triggers (Network, Peripheral, Filesystem, VM):** **No.**
This is a core kernel scheduler and CPU hotplug race condition. It cannot be triggered remotely via network packets, malicious filesystems, or untrusted peripherals, nor is it a hypervisor escape from a VM guest.
|
| 6/2 |
2026/09/17 02:20 |
llm |
expert |
0m
Model:
Tokens:
input: 8479
output: 19
thoughts: 994
Thoughts: **Analyzing a Kernel Reschedule Bug**
Okay, so I'm looking at this kernel bug report: "sched: Unexpected reschedule of offline CPU#3!". The kernel's throwing a warning, specifically in `native_smp_send_reschedule` (arch/x86/kernel/apic/ipi.c:71). It seems like there's an attempt to send an Inter-Processor Interrupt (IPI) to reschedule an offline CPU. CPU#2 is the one that triggered the warning, with kworker/u32:4/5842.
The stack trace gives us the call path: `native_smp_send_reschedule` is being called somehow. Looking at the call trace, I see that the kernel is trying to reschedule an offline CPU, and I need to figure out *why* a CPU is being scheduled when it shouldn't be. The trace dives through `__resched_curr`, `wakeup_preempt`, `try_to_wake_up`, and eventually ends up with `cpu_stop_queue_work` which leads into `sched_balance_rq` where the problem may be.
This is definitely a red flag. The system should not be sending reschedule requests to CPUs that are offline because that's just going to cause issues. I'll need to dig into `native_smp_send_reschedule` and see why this is happening. The trace seems to go through the scheduler, especially fair scheduler related code, so maybe there's a problem with how the scheduler is handling CPU offline events, or maybe there's a race condition where the CPU is going offline while the scheduler is still thinking it's online. It appears to go through some AFs and rxrpc functions, so these may be related to the problem. The question is: what's the lifecycle of the CPU and the worker.
|
| 7/2 |
2026/09/17 02:21 |
tool |
grepper |
0m
Args: map[Expression:Unexpected reschedule of offline CPU]
Results: map[Output:arch/x86/kernel/apic/ipi.c=68=void native_smp_send_reschedule(int cpu)
--
arch/x86/kernel/apic/ipi.c-70- if (unlikely(cpu_is_offline(cpu))) {
arch/x86/kernel/apic/ipi.c:71: WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
arch/x86/kernel/apic/ipi.c-72- return;
]
|
| 8/2 |
2026/09/17 02:21 |
llm |
expert |
0m
Model:
Tokens:
input: 10035
output: 35
thoughts: 202
Thoughts: **Analyzing the kthread Stop Sequence**
Okay, so I'm tracing this `rxrpc_unuse_local` call and it's leading me down the rabbit hole of `kthread_stop`. Right, `kthread_stop` waits for the kthread to exit, makes sense. But while it's waiting, it's scheduling – which I expected. Now I'm seeing this sequence: `__schedule` -> `pick_next_task` -> `pick_task_fair` -> `sched_balance_newidle` -> `sched_balance_rq` -> `stop_one_cpu_nowait` -> `cpu_stop_queue_work` -> `try_to_wake_up` -> `ttwu_queue` -> `ttwu_do_activate` -> `wakeup_preempt` -> `__resched_curr` -> `arch_smp_send_reschedule` -> `native_smp_send_reschedule`.
Hang on a second. `sched_balance_rq` is calling `stop_one_cpu_nowait`? That seems... unexpected in the context of a kthread stopping. `sched_balance_rq` is about load balancing, not necessarily forcibly stopping a CPU. I'm going to want to take a closer look at the source code for that. Better check `kernel/sched/fair.c` to see what's actually happening there.
|
| 9/2 |
2026/09/17 02:21 |
tool |
grepper |
0m
Args: map[Expression:stop_one_cpu_nowait PathPrefix:kernel/sched/fair.c]
Results: map[Output:kernel/sched/fair.c=13427=static int sched_balance_rq(int this_cpu, struct rq *this_rq,
--
kernel/sched/fair.c-13660- if (active_balance) {
kernel/sched/fair.c:13661: stop_one_cpu_nowait(cpu_of(busiest),
kernel/sched/fair.c-13662- active_load_balance_cpu_stop, busiest,
]
|
| 10/2 |
2026/09/17 02:21 |
llm |
expert |
0m
Model:
Tokens:
input: 10713
output: 32
thoughts: 79
Thoughts: Okay, here's my take on those thoughts, framed as if they're my own:
**Investigating a Potential Scheduling Anomaly**
Right, so I'm digging into this `sched_balance_rq` function. I see that within it, `active_balance` is calling `stop_one_cpu_nowait` on the `cpu_of(busiest)` CPU. My initial thought is... hmm, what happens if `busiest` happens to be an offline CPU? That seems like it could lead to some unexpected behavior or even a hang. It's a bit of a head-scratcher.
The core question that jumps out at me is: how *could* `busiest` end up being an offline CPU in the first place? I need to understand the logic flow better. It feels like a potential race condition or an edge case I need to address. Time to meticulously trace through the rest of the `sched_balance_rq` function. I'll need to carefully examine all the conditions that could lead to the selection of `busiest` and when that selection occurs relative to CPU hotplug events. This bears further investigation.
|
| 11/2 |
2026/09/17 02:21 |
tool |
grepper |
0m
Args: map[Expression:sched_balance_rq PathPrefix:kernel/sched/fair.c]
Results: map[Output:kernel/sched/fair.c=8204=static inline unsigned int cfs_h_nr_delayed(struct rq *rq)
--
kernel/sched/fair.c-8208-
kernel/sched/fair.c:8209:/* Working cpumask for: sched_balance_rq(), sched_balance_newidle(). */
kernel/sched/fair.c-8210-static DEFINE_PER_CPU(cpumask_var_t, load_balance_mask);
--
kernel/sched/fair.c=13421=static atomic_t sched_balance_running = ATOMIC_INIT(0);
--
kernel/sched/fair.c-13426- */
kernel/sched/fair.c:13427:static int sched_balance_rq(int this_cpu, struct rq *this_rq,
kernel/sched/fair.c-13428- struct sched_domain *sd, enum cpu_idle_type idle,
--
kernel/sched/fair.c=13767=static int active_load_balance_cpu_stop(void *data)
--
kernel/sched/fair.c-13845-/*
kernel/sched/fair.c:13846: * Scale the max sched_balance_rq interval with the number of CPUs in the system.
kernel/sched/fair.c-13847- * This trades load-balance latency on larger machines for less cross talk.
--
kernel/sched/fair.c=13926=static void sched_balance_domains(struct rq *rq, enum cpu_idle_type idle)
--
kernel/sched/fair.c-13960- if (time_after_eq(jiffies, sd->last_balance + interval)) {
kernel/sched/fair.c:13961: if (sched_balance_rq(cpu, rq, sd, idle, &continue_balancing)) {
kernel/sched/fair.c-13962- /*
--
kernel/sched/fair.c=14539=static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)
--
kernel/sched/fair.c-14558- /*
kernel/sched/fair.c:14559: * We must set idle_stamp _before_ calling sched_balance_rq()
kernel/sched/fair.c-14560- * for CPU_NEWLY_IDLE, such that we measure the this duration
--
kernel/sched/fair.c-14626-
kernel/sched/fair.c:14627: pulled_task = sched_balance_rq(this_cpu, this_rq,
kernel/sched/fair.c-14628- sd, CPU_NEWLY_IDLE,
]
|
| 12/2 |
2026/09/17 02:21 |
llm |
expert |
0m
Model:
Tokens:
input: 11772
output: 37
thoughts: 21
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience and written in the first person:
**Diving into `sched_balance_rq`**
Okay, time to dissect `sched_balance_rq` in `kernel/sched/fair.c`. I need to get a clear picture of how the scheduler actually balances runqueues within a domain, specifically in the context of the Completely Fair Scheduler (CFS). My primary focus here is to understand the nuances of how it's determining where to migrate tasks, and what conditions trigger this balancing.
I'll be looking closely at the inputs to this function – particularly the `sd` (sched_domain) that's passed in. I'm expecting this `sd` to hold crucial information about the CPU hierarchy, the load on various runqueues within the domain, and the constraints imposed by NUMA or CPU affinity. I'll need to follow the logic within the function to see how it uses the information.
I'm also paying close attention to the return values and any side effects. Is this function just providing recommendations, or is it actually moving tasks directly? Are there any heuristics or thresholds in place that influence the balancing decision? I'm anticipating that it's going to iterate through sibling runqueues and, based on some load-balancing criteria, try to move tasks from the most loaded queues to the least loaded ones. I'll probably be diving into the specifics of *how* these loads are calculated. This might involve diving into how the CFS accounts for task weights, scheduling latencies, and other factors. I'll need to trace down the functions calculating these variables.
Finally, I'm going to watch out for the potential race conditions and locking mechanisms. When you're moving tasks between runqueues, you're always dealing with shared data structures, so I'm keen to understand how this is handled, and make sure that this won't impact performance.
|
| 13/2 |
2026/09/17 02:22 |
tool |
read-file |
0m
Args: map[File:kernel/sched/fair.c FirstLine:13640 LineCount:50]
Results: map[Contents:13640: * ->active_balance synchronizes accesses to
13641: * ->active_balance_work. Once set, it's cleared
13642: * only after active load balance is finished.
13643: */
13644: if (busiest->active_balance)
13645: goto out_unbalanced;
13646:
13647: /*
13648: * @busiest dropped its rq_lock in the middle of
13649: * scheduling out its ->curr task (->on_rq := 0), no
13650: * need to forcefully punt it away with active balance.
13651: */
13652: if (!busiest->curr->on_rq)
13653: goto out_unbalanced;
13654:
13655: busiest->active_balance = 1;
13656: busiest->push_cpu = this_cpu;
13657: active_balance = 1;
13658: preempt_disable();
13659: }
13660: if (active_balance) {
13661: stop_one_cpu_nowait(cpu_of(busiest),
13662: active_load_balance_cpu_stop, busiest,
13663: &busiest->active_balance_work);
13664: }
13665: preempt_enable();
13666:
13667: out_unbalanced:
13668: /* We were unbalanced, so reset the balancing interval */
13669: sd->balance_interval = sd->min_interval;
13670: goto out;
13671:
13672: out_balanced:
13673: /*
13674: * We reach balance although we may have faced some affinity
13675: * constraints. Clear the imbalance flag only if other tasks got
13676: * a chance to move and fix the imbalance.
13677: */
13678: if (sd_parent && !(env.flags & LBF_ALL_PINNED)) {
13679: int *group_imbalance = &sd_parent->groups->sgc->imbalance;
13680:
13681: if (*group_imbalance)
13682: *group_imbalance = 0;
13683: }
13684:
13685: out_all_pinned:
13686: /*
13687: * We reach balance because all tasks are pinned at this level so
13688: * we can't migrate them. Let the imbalance flag set so parent level
13689: * can try to migrate them.
]
|
| 14/2 |
2026/09/17 02:22 |
llm |
expert |
0m
Model:
Tokens:
input: 13027
output: 34
thoughts: 158
Thoughts: **Investigating an Unexpected CPU Reschedule**
Okay, so I've got this warning: "sched: Unexpected reschedule of offline CPU#3!". That immediately raises a red flag. Something's gone wrong with the scheduler on an offline CPU – definitely something I need to understand.
I've got the stack trace now, and it's pointing me through `stop_one_cpu_nowait` all the way down to `native_smp_send_reschedule`. Alright, tracing through those function calls gives a picture of how the kernel is attempting to stop and restart the CPU, ultimately sending a reschedule signal. That much makes sense.
But wait a minute... looking closer at the call stack, I see `cpu_stop_queue_work` calls `wake_up_process` on the stopper thread of the target CPU. That seems unusual; why would it be waking up a process on a CPU that is supposed to be offline? This warrants closer scrutiny.
I need to dive into the `kernel/stop_machine.c` file and understand exactly what `cpu_stop_queue_work` is doing. I need to figure out why this wake up call is occurring in that context. Let's see if that will clear it up.
|
| 15/2 |
2026/09/17 02:22 |
tool |
read-file |
0m
Args: map[File:kernel/stop_machine.c FirstLine:90 LineCount:50]
Results: map[Contents: 90:
91: /* queue @work to @stopper. if offline, @work is completed immediately */
92: static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
93: {
94: struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
95: unsigned long flags;
96: bool enabled;
97:
98: preempt_disable();
99: raw_spin_lock_irqsave(&stopper->lock, flags);
100: enabled = stopper->enabled;
101: if (enabled)
102: __cpu_stop_queue_work(stopper, work);
103: else if (work->done)
104: cpu_stop_signal_done(work->done);
105: raw_spin_unlock_irqrestore(&stopper->lock, flags);
106:
107: if (enabled)
108: wake_up_process(stopper->thread);
109: preempt_enable();
110:
111: return enabled;
112: }
113:
114: /**
115: * stop_one_cpu - stop a cpu
116: * @cpu: cpu to stop
117: * @fn: function to execute
118: * @arg: argument to @fn
119: *
120: * Execute @fn(@arg) on @cpu. @fn is run in a process context with
121: * the highest priority preempting any task on the cpu and
122: * monopolizing it. This function returns after the execution is
123: * complete.
124: *
125: * This function doesn't guarantee @cpu stays online till @fn
126: * completes. If @cpu goes down in the middle, execution may happen
127: * partially or fully on different cpus. @fn should either be ready
128: * for that or the caller should ensure that @cpu stays online until
129: * this function completes.
130: *
131: * CONTEXT:
132: * Might sleep.
133: *
134: * RETURNS:
135: * -ENOENT if @fn(@arg) was not executed because @cpu was offline;
136: * otherwise, the return value of @fn.
137: */
138: int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg)
139: {
]
|
| 16/2 |
2026/09/17 02:22 |
llm |
expert |
0m
Model:
Tokens:
input: 14222
output: 31
thoughts: 64
Thoughts: Okay, here's my take on those thoughts, framed as my own internal analysis.
**Analyzing the CPU Stop Queue Mechanism**
Alright, let's break this down. My initial observation is that `cpu_stop_queue_work` is checking the `stopper->enabled` flag. That's the gatekeeper. If the `stopper` is *enabled*, then it queues the work item and then signals the `stopper->thread` to wake up. Seems straightforward so far.
But, and this is where I start digging deeper, a question pops into my head. Specifically, if the CPU is *offline*, what's the state of `stopper->enabled`? Does it *remain* true? That's the critical question here. Because if it does, then we could have a scenario where we're trying to queue work for a CPU that's essentially...gone. That would be, to put it mildly, problematic.
So, I need to investigate further. My next step, and frankly, a critical one, is to trace back the code and figure out the exact points where `stopper->enabled` is set to `false`. I need to understand the conditions that *disable* the stopper mechanism. Understanding the disable path will highlight where it's safe and unsafe to enqueue work on a "stopped" CPU. This is the crux of the matter. Determining the precise context and timing of that `stopper->enabled = false` assignment is crucial to avoid any potential race conditions or errors.
|
| 17/2 |
2026/09/17 02:22 |
tool |
grepper |
0m
Args: map[Expression:stopper->enabled = PathPrefix:kernel/stop_machine.c]
Results: map[Output:kernel/stop_machine.c=525=void stop_machine_park(int cpu)
--
kernel/stop_machine.c-532- */
kernel/stop_machine.c:533: stopper->enabled = false;
kernel/stop_machine.c-534- kthread_park(stopper->thread);
--
kernel/stop_machine.c=549=void stop_machine_unpark(int cpu)
--
kernel/stop_machine.c-552-
kernel/stop_machine.c:553: stopper->enabled = true;
kernel/stop_machine.c-554- kthread_unpark(stopper->thread);
]
|
| 18/2 |
2026/09/17 02:22 |
llm |
expert |
0m
Model:
Tokens:
input: 14810
output: 19
thoughts: 27
Thoughts: Here's my analysis of the provided snippet, as if it were my thought process:
**Dissecting the Machine Parking Logic**
Okay, so I'm looking at this `stop_machine_park` function, and it seems pretty straightforward. The core operation it performs is setting `stopper->enabled = false`. So, it's disabling something related to a "stopper," which is presumably responsible for preventing the machine from parking or continuing to park. That's good; it's concise.
But the real question burning in my mind is: *When* is `stop_machine_park` actually called? Understanding the call context is absolutely crucial. Is it triggered by an external signal, a timer, or some other state change within the system? Is it part of a graceful shutdown procedure, or a more abrupt stop due to a fault condition? Without knowing when and why this function is invoked, the implications of disabling the stopper are a complete black box. I need to trace the call paths to have any confidence in how this function works! I need to see if it is used in a specific context or in a variety of places.
|
| 19/2 |
2026/09/17 02:22 |
tool |
grepper |
0m
Args: map[Expression:stop_machine_park]
Results: map[Output:include/linux/stop_machine.h=35=void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
include/linux/stop_machine.h-36- struct cpu_stop_work *work_buf);
include/linux/stop_machine.h:37:void stop_machine_park(int cpu);
include/linux/stop_machine.h-38-void stop_machine_unpark(int cpu);
--
kernel/cpu.c=1275=static int take_cpu_down(void *_param)
--
kernel/cpu.c-1297- /* Park the stopper thread */
kernel/cpu.c:1298: stop_machine_park(cpu);
kernel/cpu.c-1299- return 0;
--
kernel/stop_machine.c=485=static void cpu_stopper_thread(unsigned int cpu)
--
kernel/stop_machine.c-524-
kernel/stop_machine.c:525:void stop_machine_park(int cpu)
kernel/stop_machine.c-526-{
]
|
| 20/2 |
2026/09/17 02:22 |
llm |
expert |
0m
Model:
Tokens:
input: 15384
output: 34
thoughts: 57
Thoughts: Okay, let me think this through.
**Investigating CPU Shutdown Procedures**
Right, so `take_cpu_down` is the function that's being called, and it looks like it's the one responsible for bringing a CPU offline. And I see that `take_cpu_down` calls `stop_machine_park(cpu)`. That makes sense; we need to park the CPU before taking it down. But wait a minute... where *is* `take_cpu_down` being called from? The naming feels familiar... Ah, yes! `stop_machine`. That seems to be the logical entry point for this whole process. Makes sense to call it that.
Okay, let's drill down. I'll need to go to `kernel/cpu.c` to look at the source for `take_cpu_down`. Let's see what's really happening. I'll need to understand the exact steps.
|
| 21/2 |
2026/09/17 02:22 |
tool |
read-file |
0m
Args: map[File:kernel/cpu.c FirstLine:1270 LineCount:50]
Results: map[Contents:1270: }
1271: rcu_read_unlock();
1272: }
1273:
1274: /* Take this CPU down. */
1275: static int take_cpu_down(void *_param)
1276: {
1277: struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
1278: enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
1279: int err, cpu = smp_processor_id();
1280:
1281: /* Ensure this CPU doesn't handle any more interrupts. */
1282: err = __cpu_disable();
1283: if (err < 0)
1284: return err;
1285:
1286: /*
1287: * Must be called from CPUHP_TEARDOWN_CPU, which means, as we are going
1288: * down, that the current state is CPUHP_TEARDOWN_CPU - 1.
1289: */
1290: WARN_ON(st->state != (CPUHP_TEARDOWN_CPU - 1));
1291:
1292: /*
1293: * Invoke the former CPU_DYING callbacks. DYING must not fail!
1294: */
1295: cpuhp_invoke_callback_range_nofail(false, cpu, st, target);
1296:
1297: /* Park the stopper thread */
1298: stop_machine_park(cpu);
1299: return 0;
1300: }
1301:
1302: static int takedown_cpu(unsigned int cpu)
1303: {
1304: struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
1305: int err;
1306:
1307: /* Park the smpboot threads */
1308: kthread_park(st->thread);
1309:
1310: /*
1311: * Prevent irq alloc/free while the dying cpu reorganizes the
1312: * interrupt affinities.
1313: */
1314: irq_lock_sparse();
1315:
1316: err = stop_machine_cpuslocked(take_cpu_down, NULL, cpumask_of(cpu));
1317: if (err) {
1318: /* CPU refused to die */
1319: irq_unlock_sparse();
]
|
| 22/2 |
2026/09/17 02:22 |
llm |
expert |
0m
Model:
Tokens:
input: 16406
output: 37
thoughts: 147
Thoughts: **My Analysis of CPU Shutdown Procedure**
Okay, so I'm tracing the CPU shutdown process here. It looks like `take_cpu_down` is the primary function executed on the CPU we're bringing down, and it's invoked through `stop_machine_cpuslocked`. That makes sense; we need to run something *on* the dying CPU to manage the graceful shutdown.
Now, `take_cpu_down` calls `__cpu_disable()`. Aha, this is where the CPU gets marked as "offline." Following that, it calls some callbacks, and then, importantly, calls `stop_machine_park(cpu)`, which sets `stopper->enabled = false`. So, if I understand this correctly, there's a specific window of time in the process where `cpu_is_offline(cpu)` is going to be `true`, but `stopper->enabled` will *still* be `true`! That could be a source of problems if we're not careful. This means we must consider a race condition, when the offline marker is set before the stopper is disabled.
Wait a second...I'm a little confused. Let's make sure I'm following the code. So, `__cpu_disable()` is the important step here, and *that* is the key function that makes it offline. Let me verify this in the x86 architecture implementation... right, so let me pull up `arch/x86/kernel/smpboot.c` to look at the implementation of `__cpu_disable` and make sure my assumptions are correct. I need to dive into the specifics of this function to see if there is something amiss.
|
| 23/2 |
2026/09/17 02:23 |
tool |
grepper |
0m
Error:
Args: map[Expression:__cpu_disable PathPrefix:arch/x86/kernel/smpboot.c]
Results:
|
| 24/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 16962
output: 30
thoughts: 19
Thoughts: Here's my take on those thoughts:
**Dissecting `__cpu_disable` in the x86 Architecture**
Okay, so I need to dive into the heart of the x86 architecture. Time to check out the `__cpu_disable` function. I'll need to navigate to the `arch/x86/` directory first, as that's where I know the core x86-specific code resides. This function is critical for understanding CPU management, especially around things like power management, hot-plugging, or maybe even in more specialized areas of virtualization. It could deal with masking interrupts, setting CPU flags, or maybe even interacting with the APIC. I'm hoping to get a handle on what this function is doing at the bare metal level.
|
| 25/2 |
2026/09/17 02:23 |
tool |
grepper |
0m
Args: map[Expression:__cpu_disable PathPrefix:arch/x86/]
Results: map[Output:arch/x86/include/asm/smp.h=66=static inline void smp_cpus_done(unsigned int max_cpus)
--
arch/x86/include/asm/smp.h-70-
arch/x86/include/asm/smp.h:71:static inline int __cpu_disable(void)
arch/x86/include/asm/smp.h-72-{
]
|
| 26/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 17295
output: 41
thoughts: 33
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Diving into the `__cpu_disable` Implementation**
Okay, so the hint pointed me to `arch/x86/include/asm/smp.h` for `__cpu_disable`. That's a reasonable place to start, given the likely architecture-specific nature of disabling a CPU core. Time to crack open that header file. I need to understand exactly what level of disabling this represents. Is it just masking the CPU, gracefully shutting it down, or something more drastic, potentially involving IPIs or a full reset sequence? I'm particularly interested in any potential side effects or ordering guarantees it provides in relation to memory barriers or other concurrency primitives. Knowing the exact implementation will dictate how I can safely interact with other threads and tasks that might be running on other cores. I need to see if it's a simple macro wrapper or if it's more involved than that. And, of course, any comments or documentation in the header itself are golden.
|
| 27/2 |
2026/09/17 02:23 |
tool |
read-file |
0m
Args: map[File:arch/x86/include/asm/smp.h FirstLine:60 LineCount:20]
Results: map[Contents: 60:
61: static inline void smp_prepare_cpus(unsigned int max_cpus)
62: {
63: smp_ops.smp_prepare_cpus(max_cpus);
64: }
65:
66: static inline void smp_cpus_done(unsigned int max_cpus)
67: {
68: smp_ops.smp_cpus_done(max_cpus);
69: }
70:
71: static inline int __cpu_disable(void)
72: {
73: return smp_ops.cpu_disable();
74: }
75:
76: static inline void __cpu_die(unsigned int cpu)
77: {
78: if (smp_ops.cpu_die)
79: smp_ops.cpu_die(cpu);
]
|
| 28/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 17856
output: 33
thoughts: 28
Thoughts: Here's my take on the thought process, as if it were my own:
**Investigating CPU Disablement on x86**
Okay, `smp_ops.cpu_disable()` is being called. That's the trigger. My mental radar instantly locks onto that function call. I need to understand what's happening and where this is targeted within the x86 architecture. Therefore, my immediate focus shifts to locating the x86-specific implementation of `cpu_disable`. Let's dig into the relevant code base and trace the function calls. This could be about disabling a core, preparing for a hotplug event, or possibly other operations in relation to the kernel. Let's start the search.
|
| 29/2 |
2026/09/17 02:23 |
tool |
grepper |
0m
Args: map[Expression:\.cpu_disable\s*= PathPrefix:arch/x86/]
Results: map[Output:arch/x86/kernel/smp.c=284=struct smp_ops smp_ops = {
--
arch/x86/kernel/smp.c-295- .kick_ap_alive = native_kick_ap,
arch/x86/kernel/smp.c:296: .cpu_disable = native_cpu_disable,
arch/x86/kernel/smp.c-297- .play_dead = native_play_dead,
--
arch/x86/xen/smp_pv.c=422=static const struct smp_ops xen_smp_ops __initconst = {
--
arch/x86/xen/smp_pv.c-430- .poll_sync_state = xen_pv_poll_sync_state,
arch/x86/xen/smp_pv.c:431: .cpu_disable = xen_pv_cpu_disable,
arch/x86/xen/smp_pv.c-432- .play_dead = xen_pv_play_dead,
]
|
| 30/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 18354
output: 31
thoughts: 27
Thoughts: Here's my summary, as though I'm thinking through this process:
**Diving into the `smpboot.c` Abyss**
Okay, time to get my hands dirty. I need to understand this CPU disable process. Specifically, I should zero in on how the architecture-specific disable functionality is implemented. My first port of call will be `native_cpu_disable` within `arch/x86/kernel/smpboot.c`. That file is the most likely location for the platform-specific glue code that interacts directly with the x86 architecture. I'll need to see how it interacts with the more general SMP boot process and what hooks it utilizes. This seems like a reasonable starting point. Let's see what secrets it holds.
|
| 31/2 |
2026/09/17 02:23 |
tool |
grepper |
0m
Args: map[Expression:native_cpu_disable PathPrefix:arch/x86/]
Results: map[Output:arch/x86/include/asm/smp.h=109=int native_kick_ap(unsigned int cpu, struct task_struct *tidle);
arch/x86/include/asm/smp.h:110:int native_cpu_disable(void);
arch/x86/include/asm/smp.h-111-void __noreturn hlt_play_dead(void);
--
arch/x86/kernel/smp.c=284=struct smp_ops smp_ops = {
--
arch/x86/kernel/smp.c-295- .kick_ap_alive = native_kick_ap,
arch/x86/kernel/smp.c:296: .cpu_disable = native_cpu_disable,
arch/x86/kernel/smp.c-297- .play_dead = native_play_dead,
--
arch/x86/kernel/smpboot.c=1355=void cpu_disable_common(void)
--
arch/x86/kernel/smpboot.c-1374-
arch/x86/kernel/smpboot.c:1375:int native_cpu_disable(void)
arch/x86/kernel/smpboot.c-1376-{
--
arch/x86/kernel/smpboot.c=1504=void __noreturn native_play_dead(void)
--
arch/x86/kernel/smpboot.c-1517-#else /* ... !CONFIG_HOTPLUG_CPU */
arch/x86/kernel/smpboot.c:1518:int native_cpu_disable(void)
arch/x86/kernel/smpboot.c-1519-{
]
|
| 32/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 19033
output: 42
thoughts: 27
Thoughts: Here's a summary of my thought process, as if I were the one thinking it:
**Diving into the CPU Disabling Logic**
Okay, time to get into the nitty-gritty of how we disable CPUs on x86. I'm going to jump right into the `native_cpu_disable` function, and the obvious place to find it is in `arch/x86/kernel/smpboot.c`. That should give me the core implementation details. I need to understand this disablement process thoroughly. What mechanisms are being used to stop a CPU, and how does this function integrate with the broader SMP boot and shutdown sequence? Are there any x86-specific intricacies I need to watch out for? Let's get reading and see what's in there.
|
| 33/2 |
2026/09/17 02:23 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/smpboot.c FirstLine:1375 LineCount:50]
Results: map[Contents:1375: int native_cpu_disable(void)
1376: {
1377: int ret;
1378:
1379: ret = lapic_can_unplug_cpu();
1380: if (ret)
1381: return ret;
1382:
1383: cpu_disable_common();
1384:
1385: /*
1386: * Disable the local APIC. Otherwise IPI broadcasts will reach
1387: * it. It still responds normally to INIT, NMI, SMI, and SIPI
1388: * messages.
1389: *
1390: * Disabling the APIC must happen after cpu_disable_common()
1391: * which invokes fixup_irqs().
1392: *
1393: * Disabling the APIC preserves already set bits in IRR, but
1394: * an interrupt arriving after disabling the local APIC does not
1395: * set the corresponding IRR bit.
1396: *
1397: * fixup_irqs() scans IRR for set bits so it can raise a not
1398: * yet handled interrupt on the new destination CPU via an IPI
1399: * but obviously it can't do so for IRR bits which are not set.
1400: * IOW, interrupts arriving after disabling the local APIC will
1401: * be lost.
1402: */
1403: apic_soft_disable();
1404:
1405: return 0;
1406: }
1407:
1408: void play_dead_common(void)
1409: {
1410: idle_task_exit();
1411:
1412: cpuhp_ap_report_dead();
1413:
1414: local_irq_disable();
1415: }
1416:
1417: /*
1418: * We need to flush the caches before going to sleep, lest we have
1419: * dirty data in our caches when we come back up.
1420: */
1421: void __noreturn mwait_play_dead(unsigned int eax_hint)
1422: {
1423: struct mwait_cpu_dead *md = this_cpu_ptr(&mwait_cpu_dead);
1424:
]
|
| 34/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 19967
output: 42
thoughts: 11
Thoughts: Okay, here's my attempt at summarizing the thought process, as though I were an expert:
**Diving into `cpu_disable_common`**
Alright, let's take a look at `cpu_disable_common`. Given the naming convention, I'm expecting this function to house the shared logic used to disable a CPU core across different architectures or under various circumstances. I'm immediately interested in the implementation details. I want to see if this common code handles things like:
* **Interrupt masking:** Is there a critical section guarded by disabling interrupts before the actual disable procedures? That's a fundamental aspect. I need to know how it's handled to prevent race conditions.
* **MMU flushes and TLB invalidation:** When disabling a CPU, you're essentially taking it offline. That means any cached mappings in the Translation Lookaside Buffer need to be invalidated. I'm keen to see if this is handled correctly and efficiently here. Any performance impact here is critical.
* **Cache coherency considerations:** When a core is going down, it's possible that data is cached by that CPU. Ensuring coherency between the caches and main memory is key. I'm interested in how that's handled, or if it's deferred to higher levels.
* **Hardware-specific operations:** What sort of architecture-specific calls are made? Are there platform hooks involved? This code is likely a wrapper around the architecture dependent code. I'll need to look at any included files or external function calls to understand the interaction.
* **Power management interface:** Does this function interact with any power management mechanisms to completely turn off the CPU or put it into a low-power state?
* **Error handling and recovery:** What happens if the disable operation fails? Are there retry mechanisms? Are errors logged, and what's the general error handling strategy? This can give me information on the overall design and robustness of the system.
* **Synchronization:** How does it coordinate with other parts of the kernel or system that might be accessing the same CPU cores? I'm anticipating some form of locking or atomic operations to protect against concurrent modification.
* **Context:** What is the calling context of this function? Interruptible? Atomic? Knowing that will dictate what I expect to see in terms of what calls it can make.
I will read the code looking for those points, expecting to find the standard operations to disable a CPU core, and paying attention to see if anything is unusual.
|
| 35/2 |
2026/09/17 02:23 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/smpboot.c FirstLine:1355 LineCount:20]
Results: map[Contents:1355: void cpu_disable_common(void)
1356: {
1357: int cpu = smp_processor_id();
1358:
1359: remove_siblinginfo(cpu);
1360:
1361: /*
1362: * Stop allowing kernel-mode FPU. This is needed so that if the CPU is
1363: * brought online again, the initial state is not allowed:
1364: */
1365: this_cpu_write(kernel_fpu_allowed, false);
1366:
1367: /* It's now safe to remove this processor from the online map */
1368: lock_vector_lock();
1369: remove_cpu_from_maps(cpu);
1370: unlock_vector_lock();
1371: fixup_irqs();
1372: lapic_offline();
1373: }
1374:
]
|
| 36/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 20823
output: 42
thoughts: 30
Thoughts: Here's my summary, as though I'm thinking through this process:
**CPU Removal and Verification**
Okay, so `remove_cpu_from_maps(cpu)` is clearly designed to take a CPU offline. That's the core function. Before I proceed any further, and especially since I'm dealing with core infrastructure here, I need to thoroughly verify how this function is implemented. I'm going to dig into the `remove_cpu_from_maps` function itself to understand the mechanisms involved. What resources are being touched? Are there any potential race conditions? What's the error handling like? I'm anticipating that I'll need to confirm that this function behaves as documented and that it leaves the system in a consistent state. My primary concern will be to verify the integrity of any associated data structures and to determine how this action interacts with the rest of the system's runtime state. I need to be absolutely certain of the implications before I go further. Let's see what's under the hood.
|
| 37/2 |
2026/09/17 02:23 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/smpboot.c FirstLine:1340 LineCount:15]
Results: map[Contents:1340: cpumask_clear(topology_sibling_cpumask(cpu));
1341: cpumask_clear(topology_core_cpumask(cpu));
1342: cpumask_clear(topology_die_cpumask(cpu));
1343: c->topo.core_id = 0;
1344: c->booted_cores = 0;
1345: cpumask_clear_cpu(cpu, cpu_sibling_setup_mask);
1346: recompute_smt_state();
1347: }
1348:
1349: static void remove_cpu_from_maps(int cpu)
1350: {
1351: set_cpu_online(cpu, false);
1352: numa_remove_cpu(cpu);
1353: }
1354:
]
|
| 38/2 |
2026/09/17 02:23 |
llm |
expert |
0m
Model:
Tokens:
input: 21357
output: 22
thoughts: 554
Thoughts: **My Analysis of a Potential CPU Offline Race Condition**
Okay, so I'm tracing through this CPU offline sequence and I've hit a snag. It starts with `set_cpu_online(cpu, false)`. That makes `cpu_is_offline(cpu)` true, which is the key. But here's the kicker: `stopper->enabled` stays true until `stop_machine_park(cpu)` is called within `take_cpu_down`. This creates a window of vulnerability.
If `cpu_is_offline(cpu)` is true, can another CPU *still* try to send a reschedule IPI to it? That's what's triggering the warning, `native_smp_send_reschedule(cpu)` when it's offline. The stack trace points to `sched_balance_rq` calling `stop_one_cpu_nowait` on `cpu_of(busiest)`. `busiest` is a runqueue, which could be an offline CPU. That seems wrong—`sched_balance_rq` shouldn't be balancing *from* an offline CPU, right?
Then I remember that `sched_balance_rq` is called from `sched_balance_newidle`. `sched_balance_newidle` iterates through sched domains. The problem lies with stale scheduling domains. If a CPU is offline, it *should* be removed from the sched domains. But are they updated immediately? No. Sched domains are updated later in `cpuset_update_active_cpus` or a similar function, which happens *after* the CPU is offline.
Therefore, during the crucial CPU offline process, other CPUs *can still see the offline CPU in their sched domains*! If another CPU sees the offline CPU, it might try to pull tasks from it, and if it decides to actively balance it'll call `stop_one_cpu_nowait` on the offline CPU.
`stop_one_cpu_nowait` then queues up work and calls `wake_up_process(stopper->thread)`. `wake_up_process` then calls `try_to_wake_up`, which calls `ttwu_queue`, which calls `ttwu_do_activate`, which calls `wakeup_preempt`, which calls `resched_curr`, which calls `smp_send_reschedule`.
Aha! `try_to_wake_up` wakes up the stopper thread. *That* thread is pinned to the offline CPU! So, `try_to_wake_up` is *trying* to wake up that thread on a CPU that is now offline, which triggers the `smp_send_reschedule` warning.
This is a nasty race condition. This sounds like it could be a previously unknown bug or at least a nuance that I haven't seen before. I should search the git logs for this warning message to see if someone else has encountered and addressed this issue before I dive in too deep on this.
|
| 39/2 |
2026/09/17 02:24 |
tool |
git-log |
0m
Args: map[MessageRegexps:[Unexpected reschedule of offline CPU]]
Results:
|
| 40/2 |
2026/09/17 02:24 |
llm |
expert |
0m
Model:
Tokens:
input: 22583
output: 22
thoughts: 19
Thoughts: Here's my summary, as though I'm thinking through this:
**Investigating a Missing Commit Message**
Okay, so I'm looking at the commit history and I'm not seeing anything that explicitly addresses the current situation. The usual message isn't present, which means I've got to dig deeper. Right, let's try a keyword search. The issue seems to be an unexpected reschedule of an offline CPU. I'll search for that specific phrase: "Unexpected reschedule of offline CPU". Hopefully, this will lead me to the relevant commits, related bug reports, or at least a starting point for understanding why this is happening. Let's see what the logs turn up.
|
| 41/2 |
2026/09/17 02:24 |
tool |
git-log |
0m
Args: map[CodeRegexp:Unexpected reschedule of offline CPU]
Results: map[Output:08dbfad3f504 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
]
|
| 42/2 |
2026/09/17 02:24 |
llm |
expert |
0m
Model:
Tokens:
input: 22825
output: 28
thoughts: 24
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Analyzing a Merge Commit**
Okay, hold on a second. That hash, `08dbfad3f504` – that's screaming "merge commit" at me. I need to confirm that suspicion immediately. A merge commit introduces complexities I need to understand, especially in the context of whatever I'm currently working on. Is it a fast-forward merge? A squash merge? Resolving conflicts? The lineage becomes critical here. I need to trace its parents, and what specific branches were combined to determine how it impacts the current history and any implications for the task at hand. Let's delve in.
|
| 43/2 |
2026/09/17 02:24 |
tool |
git-show |
0m
Args: map[Commit:08dbfad3f504 Stat:true]
Results: map[Output:commit 08dbfad3f5040f5bdb6c529da20d6d4e81fefd72
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sat Aug 29 11:55:36 2026 -0700
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
Pull more SCSI updates from Martin Petersen:
"Remaining updates for the 7.3 merge window. The only core change is
enabling context analysis for the SCSI layer and UFS.
The remaining changes are either bug fixes or hardening"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi: (26 commits)
scsi: snic: Fix SCSI host leak on workqueue allocation failure
scsi: MAINTAINERS: Update my email address
scsi: MAINTAINERS: Leave the cumana_1 and oak drivers to the RISCPC maintainers
scsi: leapraid: Standardize NCQ priority sysfs attributes
scsi: leapraid: Serialize firmware log mmap with teardown
scsi: leapraid: Balance host references for firmware log VMAs
scsi: lpfc: Remove unnnecessary NULL check
scsi: qla2xxx: Fix an loop timeout test
scsi: qla2xxx: Fix an error code in qla_get_tmf()
scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
scsi: core: Enable context analysis for hosts.o
scsi: lpfc: Replace strlcat() with sysfs_emit_at() in the sysfs show functions
scsi: lpfc: Replace strlcat() with seq_buf in the debugfs dump helpers
scsi: lpfc: Replace strlcat() with seq_buf in lpfc_rx_monitor_report()
scsi: lpfc: Replace strlcat() with scnprintf() in lpfc_vport_symbolic_node_name()
scsi: lpfc: Replace strlcat() with seq_buf in lpfc_info()
scsi: core: Enable context analysis
scsi: core: Protect host state changes with the host lock
scsi: core: Add lock context annotations
scsi: core: Pass the SCSI host pointer directly to scanning functions
...
.clang-format | 808 +
.clippy.toml | 21 +
.cocciconfig | 3 +
.editorconfig | 27 +
.get_maintainer.ignore | 9 +
.gitattributes | 5 +
.gitignore | 196 +
.mailmap | 985 +
.pylintrc | 2 +
.rustfmt.toml | 12 +
COPYING | 20 +
CREDITS | 4636 +
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 +
[Output truncated: showing 1000 of 96058 lines]]
|
| 44/2 |
2026/09/17 02:24 |
llm |
expert |
0m
Model:
Tokens:
input: 44741
output: 40
thoughts: 129
Thoughts: **Investigating a Potentially Anomalous Commit**
Okay, hold on a second... commit `08dbfad3f5040f5bdb6c529da20d6d4e81fefd72` showing up as from 2026? That's… odd. Oh, right, it's probably just a merge commit. No worries there. Time to dive into the code. I'm going to search for instances of "Unexpected reschedule of offline CPU."
Hmm, wait, wasn't I already looking at that? Oh, yeah, I did find it in `arch/x86/kernel/apic/ipi.c`. Right, that's what I was doing. Okay, let's take a look at the history of `arch/x86/kernel/apic/ipi.c`, particularly around line 71. See what changes have been made in that area. That'll be the best way to determine the root cause.
|
| 45/2 |
2026/09/17 02:24 |
tool |
git-blame |
0m
Args: map[End:75 File:arch/x86/kernel/apic/ipi.c Start:65]
Results: map[Output:^08dbfad3f504 65) * wastes no time serializing anything. Worst case is that we lose a
^08dbfad3f504 66) * reschedule ...
^08dbfad3f504 67) */
^08dbfad3f504 68) void native_smp_send_reschedule(int cpu)
^08dbfad3f504 69) {
^08dbfad3f504 70) if (unlikely(cpu_is_offline(cpu))) {
^08dbfad3f504 71) WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
^08dbfad3f504 72) return;
^08dbfad3f504 73) }
^08dbfad3f504 74) __apic_send_IPI(cpu, RESCHEDULE_VECTOR);
^08dbfad3f504 75) }
]
|
| 46/2 |
2026/09/17 02:24 |
llm |
expert |
0m
Model:
Tokens:
input: 45409
output: 22
thoughts: 48
Thoughts: Okay, here's my take on those thoughts, framed as my own mental process, given my expertise:
**Diving into the Root Cause**
Alright, hang on a second. I need to clarify something about this commit hash: `^08dbfad3f504`. Is this the absolute origin, the root commit of this branch, or is it a merge point? Knowing that's crucial to understanding the timeline.
Now, my initial hunch is to figure out when this whole "Unexpected reschedule of offline CPU" issue actually surfaced. To track that down, I'm going to leverage `git log` with a smart search. I'll use `-S "Unexpected reschedule of offline CPU"` as my search. That should pinpoint the exact commit where this specific error message, or string, was first introduced into the codebase. This method is usually far quicker than just sifting through potentially unrelated commits. From there I can explore that commit.
|
| 47/2 |
2026/09/17 02:24 |
tool |
git-log |
0m
Args: map[CodeRegexp:Unexpected reschedule of offline CPU]
Results: map[Output:08dbfad3f504 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
]
|
| 48/2 |
2026/09/17 02:25 |
llm |
expert |
0m
Model:
Tokens:
input: 45732
output: 34
thoughts: 66
Thoughts: **Initial Investigation of a Potentially Early Commit**
Okay, so I'm looking at this hash, `08dbfad3f504`, and it seems to be the only commit mentioned here. That's a bit odd. My initial thought is, could this have been the very first commit to the repository? Or perhaps an extremely early one? It's not necessarily a problem, but it warrants a closer look.
To understand its context and when this change was introduced, I need to check the history surrounding it. Let's see... I'll pull up the log for the `arch/x86/kernel/apic/ipi.c` file using `git log -- arch/x86/kernel/apic/ipi.c`. That should give me the commit history specifically for that file, which should help me pinpoint when this change was made and, hopefully, the reasoning behind it.
|
| 49/2 |
2026/09/17 02:25 |
tool |
git-log |
0m
Args: map[Count:5 PathPrefix:arch/x86/kernel/apic/ipi.c]
Results: map[Output:08dbfad3f504 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
]
|
| 50/2 |
2026/09/17 02:25 |
llm |
expert |
0m
Model:
Tokens:
input: 46081
output: 20
thoughts: 31
Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person:
**Initial Assessment: A Lean History**
Alright, a single commit, huh? That's a bit… sparse. My initial impression is that this repository either has very limited history, is freshly initialized, or perhaps something went wrong with the initial migration. Given that, I'm going to quickly confirm this with a check of the log. Best to take a look and get an idea of the landscape. I'm going to run `git log -1` to confirm and verify the commit is indeed as expected. It's the fastest way to get a snapshot of the repo's HEAD.
|
| 51/2 |
2026/09/17 02:25 |
tool |
git-show |
0m
Args: map[Commit:HEAD Stat:true]
Results: map[Output:commit 08dbfad3f5040f5bdb6c529da20d6d4e81fefd72
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sat Aug 29 11:55:36 2026 -0700
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
Pull more SCSI updates from Martin Petersen:
"Remaining updates for the 7.3 merge window. The only core change is
enabling context analysis for the SCSI layer and UFS.
The remaining changes are either bug fixes or hardening"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi: (26 commits)
scsi: snic: Fix SCSI host leak on workqueue allocation failure
scsi: MAINTAINERS: Update my email address
scsi: MAINTAINERS: Leave the cumana_1 and oak drivers to the RISCPC maintainers
scsi: leapraid: Standardize NCQ priority sysfs attributes
scsi: leapraid: Serialize firmware log mmap with teardown
scsi: leapraid: Balance host references for firmware log VMAs
scsi: lpfc: Remove unnnecessary NULL check
scsi: qla2xxx: Fix an loop timeout test
scsi: qla2xxx: Fix an error code in qla_get_tmf()
scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
scsi: core: Enable context analysis for hosts.o
scsi: lpfc: Replace strlcat() with sysfs_emit_at() in the sysfs show functions
scsi: lpfc: Replace strlcat() with seq_buf in the debugfs dump helpers
scsi: lpfc: Replace strlcat() with seq_buf in lpfc_rx_monitor_report()
scsi: lpfc: Replace strlcat() with scnprintf() in lpfc_vport_symbolic_node_name()
scsi: lpfc: Replace strlcat() with seq_buf in lpfc_info()
scsi: core: Enable context analysis
scsi: core: Protect host state changes with the host lock
scsi: core: Add lock context annotations
scsi: core: Pass the SCSI host pointer directly to scanning functions
...
.clang-format | 808 +
.clippy.toml | 21 +
.cocciconfig | 3 +
.editorconfig | 27 +
.get_maintainer.ignore | 9 +
.gitattributes | 5 +
.gitignore | 196 +
.mailmap | 985 +
.pylintrc | 2 +
.rustfmt.toml | 12 +
COPYING | 20 +
CREDITS | 4636 +
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 +
[Output truncated: showing 1000 of 96058 lines]]
|
| 52/2 |
2026/09/17 02:25 |
llm |
expert |
0m
Model:
Tokens:
input: 67998
output: 38
thoughts: 91
Thoughts: **Debugging a Potential Scheduler Imbalance**
Alright, I don't need to trace back through the commit history to pinpoint the exact origin of this issue – that's not the angle. The core of the problem, as I see it, is that `sched_balance_rq` is calling `stop_one_cpu_nowait` on a CPU that's currently offline. That's immediately suspicious.
Now, hold on... how is `sched_balance_rq` even *able* to be called with the `busiest` CPU parameter referencing an offline CPU? That's a fundamental inconsistency that needs to be explained. My initial hunch is this: there is some underlying state issue, a race condition, or a logic error preventing the CPUs in question from being considered properly offline.
Let's dive into `sched_balance_newidle` within `kernel/sched/fair.c`. That function seems like the logical starting point to understand how new idle CPUs interact with the balancing logic. It's time to dig into the code and see how `busiest` is determined.
|
| 53/2 |
2026/09/17 02:25 |
tool |
read-file |
0m
Args: map[File:kernel/sched/fair.c FirstLine:14539 LineCount:100]
Results: map[Contents:14539: static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)
14540: __must_hold(__rq_lockp(this_rq))
14541: {
14542: unsigned long next_balance = jiffies + HZ;
14543: int this_cpu = this_rq->cpu;
14544: int continue_balancing = 1;
14545: u64 t0, t1, curr_cost = 0;
14546: struct sched_domain *sd;
14547: int pulled_task = 0;
14548:
14549: update_misfit_status(NULL, this_rq);
14550:
14551: /*
14552: * There is a task waiting to run. No need to search for one.
14553: * Return 0; the task will be enqueued when switching to idle.
14554: */
14555: if (this_rq->ttwu_pending)
14556: return 0;
14557:
14558: /*
14559: * We must set idle_stamp _before_ calling sched_balance_rq()
14560: * for CPU_NEWLY_IDLE, such that we measure the this duration
14561: * as idle time.
14562: */
14563: this_rq->idle_stamp = rq_clock(this_rq);
14564:
14565: /*
14566: * Do not pull tasks towards !active CPUs...
14567: */
14568: if (!cpu_active(this_cpu))
14569: return 0;
14570:
14571: /*
14572: * This is OK, because current is on_cpu, which avoids it being picked
14573: * for load-balance and preemption/IRQs are still disabled avoiding
14574: * further scheduler activity on it and we're being very careful to
14575: * re-start the picking loop.
14576: */
14577: rq_unpin_lock(this_rq, rf);
14578:
14579: sd = rcu_dereference_sched_domain(this_rq->sd);
14580: if (!sd)
14581: goto out;
14582:
14583: if (!get_rd_overloaded(this_rq->rd) ||
14584: this_rq->avg_idle < sd->max_newidle_lb_cost) {
14585:
14586: update_next_balance(sd, &next_balance);
14587: goto out;
14588: }
14589:
14590: /*
14591: * Include sched_balance_update_blocked_averages() in the cost
14592: * calculation because it can be quite costly -- this ensures we skip
14593: * it when avg_idle gets to be very low.
14594: */
14595: t0 = sched_clock_cpu(this_cpu);
14596: __sched_balance_update_blocked_averages(this_rq);
14597:
14598: rq_modified_begin(this_rq, &fair_sched_class);
14599: raw_spin_rq_unlock(this_rq);
14600:
14601: for_each_domain(this_cpu, sd) {
14602: u64 domain_cost;
14603:
14604: update_next_balance(sd, &next_balance);
14605:
14606: if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost)
14607: break;
14608:
14609: if (sd->flags & SD_BALANCE_NEWIDLE) {
14610: unsigned int weight = 1;
14611:
14612: if (sched_feat(NI_RANDOM) && sd->newidle_ratio < 1024) {
14613: /*
14614: * Throw a 1k sided dice; and only run
14615: * newidle_balance according to the success
14616: * rate.
14617: */
14618: u32 d1k = sched_rng() % 1024;
14619: weight = 1 + sd->newidle_ratio;
14620: if (d1k > weight) {
14621: update_newidle_stats(sd, 0);
14622: continue;
14623: }
14624: weight = (1024 + weight/2) / weight;
14625: }
14626:
14627: pulled_task = sched_balance_rq(this_cpu, this_rq,
14628: sd, CPU_NEWLY_IDLE,
14629: &continue_balancing);
14630:
14631: t1 = sched_clock_cpu(this_cpu);
14632: domain_cost = t1 - t0;
14633: curr_cost += domain_cost;
14634: t0 = t1;
14635:
14636: /*
14637: * Track max cost of a domain to make sure to not delay the
14638: * next wakeup on the CPU.
]
|
| 54/2 |
2026/09/17 02:25 |
llm |
expert |
0m
Model:
Tokens:
input: 69966
output: 38
thoughts: 29
Thoughts: Here's my take on those thoughts, tailored for an expert audience:
**Diving Back into `sched_balance_rq`**
Okay, so I'm revisiting `sched_balance_rq`. My immediate thought is, "Right, let's step through this one again, focusing on how it navigates the sched domain groups." I need a fresh look at the interations inside the function, making sure I haven't missed any edge cases or implications for multi-group scenarios. My focus is on understanding the group iteration logic within `sched_balance_rq` as my primary concern.
|
| 55/2 |
2026/09/17 02:25 |
tool |
read-file |
0m
Args: map[File:kernel/sched/fair.c FirstLine:13427 LineCount:100]
Results: map[Contents:13427: static int sched_balance_rq(int this_cpu, struct rq *this_rq,
13428: struct sched_domain *sd, enum cpu_idle_type idle,
13429: int *continue_balancing)
13430: {
13431: int ld_moved, cur_ld_moved, active_balance = 0;
13432: struct sched_domain *sd_parent = sd->parent;
13433: struct sched_group *group;
13434: struct rq *busiest;
13435: struct rq_flags rf;
13436: struct cpumask *cpus = this_cpu_cpumask_var_ptr(load_balance_mask);
13437: struct lb_env env = {
13438: .sd = sd,
13439: .dst_cpu = this_cpu,
13440: .dst_rq = this_rq,
13441: .dst_grpmask = group_balance_mask(sd->groups),
13442: .idle = idle,
13443: .loop_break = SCHED_NR_MIGRATE_BREAK,
13444: .cpus = cpus,
13445: .fbq_type = all,
13446: .tasks = LIST_HEAD_INIT(env.tasks),
13447: };
13448: bool need_unlock = false;
13449:
13450: cpumask_and(cpus, sched_domain_span(sd), cpu_active_mask);
13451:
13452: schedstat_inc(sd->lb_count[idle]);
13453:
13454: redo:
13455: if (!should_we_balance(&env)) {
13456: *continue_balancing = 0;
13457: goto out_balanced;
13458: }
13459:
13460: if (!need_unlock && (sd->flags & SD_SERIALIZE)) {
13461: int zero = 0;
13462: if (!atomic_try_cmpxchg_acquire(&sched_balance_running, &zero, 1))
13463: goto out_balanced;
13464:
13465: need_unlock = true;
13466: }
13467:
13468: group = sched_balance_find_src_group(&env);
13469: if (!group) {
13470: schedstat_inc(sd->lb_nobusyg[idle]);
13471: goto out_balanced;
13472: }
13473:
13474: busiest = sched_balance_find_src_rq(&env, group);
13475: if (!busiest) {
13476: schedstat_inc(sd->lb_nobusyq[idle]);
13477: goto out_balanced;
13478: }
13479:
13480: WARN_ON_ONCE(busiest == env.dst_rq);
13481:
13482: update_lb_imbalance_stat(&env, sd, idle);
13483:
13484: env.src_cpu = busiest->cpu;
13485: env.src_rq = busiest;
13486:
13487: ld_moved = 0;
13488: /* Clear this flag as soon as we find a pullable task */
13489: env.flags |= LBF_ALL_PINNED;
13490: if (busiest->nr_running > 1) {
13491: /*
13492: * Attempt to move tasks. If sched_balance_find_src_group has found
13493: * an imbalance but busiest->nr_running <= 1, the group is
13494: * still unbalanced. ld_moved simply stays zero, so it is
13495: * correctly treated as an imbalance.
13496: */
13497: env.loop_max = min(sysctl_sched_nr_migrate, busiest->nr_running);
13498:
13499: more_balance:
13500: rq_lock_irqsave(busiest, &rf);
13501: update_rq_clock(busiest);
13502:
13503: /*
13504: * cur_ld_moved - load moved in current iteration
13505: * ld_moved - cumulative load moved across iterations
13506: */
13507: cur_ld_moved = detach_tasks(&env);
13508:
13509: /*
13510: * We've detached some tasks from busiest_rq. Every
13511: * task is masked "TASK_ON_RQ_MIGRATING", so we can safely
13512: * unlock busiest->lock, and we are able to be sure
13513: * that nobody can manipulate the tasks in parallel.
13514: * See task_rq_lock() family for the details.
13515: */
13516:
13517: rq_unlock(busiest, &rf);
13518:
13519: if (cur_ld_moved) {
13520: attach_tasks(&env);
13521: ld_moved += cur_ld_moved;
13522: }
13523:
13524: local_irq_restore(rf.flags);
13525:
13526: if (env.flags & LBF_NEED_BREAK) {
]
|
| 56/2 |
2026/09/17 02:25 |
llm |
expert-compressor |
0m
Model:
Reply: ### 1. Approaches Tried So Far and Their Results
1. **Analyzed Bug Report and Call Trace:**
- **Report:**
```
sched: Unexpected reschedule of offline CPU#3!
WARNING: arch/x86/kernel/apic/ipi.c:71 at native_smp_send_reschedule+0x4d/0x60 arch/x86/kernel/apic/ipi.c:71, CPU#2: kworker/u32:4/5842
```
- **Call Trace:**
- Context: Workqueue `netns cleanup_net` running on CPU#2 (PID 5842).
- Call path:
`cleanup_net` -> `ops_undo_list` -> `afs_net_exit` -> `afs_close_socket` -> `sock_release` -> `rxrpc_release` -> `rxrpc_unuse_local` -> `kthread_stop` -> `schedule_timeout` -> `__schedule` -> `pick_next_task` -> `pick_task_fair` -> `sched_balance_newidle` -> `sched_balance_rq` -> `stop_one_cpu_nowait` -> `cpu_stop_queue_work` -> `try_to_wake_up` -> `ttwu_queue` -> `ttwu_do_activate` -> `wakeup_preempt` -> `__resched_curr` -> `arch_smp_send_reschedule` -> `native_smp_send_reschedule`.
2. **Examined `native_smp_send_reschedule` (`arch/x86/kernel/apic/ipi.c:68-75`):**
```c
void native_smp_send_reschedule(int cpu)
{
if (unlikely(cpu_is_offline(cpu))) {
WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
return;
}
__apic_send_IPI(cpu, RESCHEDULE_VECTOR);
}
```
- Function explicitly guards sending IPI to offline CPUs with `WARN(1, ...)` and safely returns without attempting to deliver the IPI (`return;`).
3. **Investigated Origin in CFS Load Balancing (`kernel/sched/fair.c`):**
- In `sched_balance_rq()` lines 13655-13665:
```c
busiest->active_balance = 1;
busiest->push_cpu = this_cpu;
active_balance = 1;
preempt_disable();
}
if (active_balance) {
stop_one_cpu_nowait(cpu_of(busiest),
active_load_balance_cpu_stop, busiest,
&busiest->active_balance_work);
}
preempt_enable();
```
- Active load balancing triggers `stop_one_cpu_nowait()` targeting `cpu_of(busiest)` (here CPU#3).
4. **Investigated Stop Machine / Stopper Mechanics (`kernel/stop_machine.c`):**
- `cpu_stop_queue_work(cpu, work)` lines 92-112:
```c
static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
{
struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
unsigned long flags;
bool enabled;
preempt_disable();
raw_spin_lock_irqsave(&stopper->lock, flags);
enabled = stopper->enabled;
if (enabled)
__cpu_stop_queue_work(stopper, work);
else if (work->done)
cpu_stop_signal_done(work->done);
raw_spin_unlock_irqrestore(&stopper->lock, flags);
if (enabled)
wake_up_process(stopper->thread);
preempt_enable();
return enabled;
}
```
- If `stopper->enabled` is still true, it calls `wake_up_process(stopper->thread)`.
- `wake_up_process` calls `try_to_wake_up`, which calls `ttwu_queue` / `ttwu_do_activate` -> `wakeup_preempt` -> `resched_curr` -> `smp_send_reschedule(cpu)`.
5. **Investigated CPU Offline Lifecycle and Ordering:**
- In `kernel/cpu.c` -> `take_cpu_down()`:
```c
err = __cpu_disable(); // In x86 native_cpu_disable -> cpu_disable_common -> remove_cpu_from_maps(cpu) -> set_cpu_online(cpu, false)
...
stop_machine_park(cpu); // sets stopper->enabled = false; kthread_park(stopper->thread);
```
- Notice that `set_cpu_online(cpu, false)` runs *before* `stop_machine_park(cpu)`.
- Furthermore, scheduling domains (`sched_domains`) rebuild happens asynchronously / later in the CPU unplug state machine (`cpuhp_invoke_callback_range_nofail` / `sched_cpu_deactivate`).
- Hence, while CPU#3 was being taken down or right after going offline:
- `cpu_is_offline(3)` was true (`set_cpu_online(3, false)` had been executed).
- But sched domains still included CPU#3, or `stopper->enabled` was still true, allowing `sched_balance_rq` to pick CPU#3 as `busiest`, run `stop_one_cpu_nowait(3, ...)`, and attempt to wake up CPU#3's stopper thread, triggering `native_smp_send_reschedule(3)`.
6. **Git Log / History Check:**
- Git log in this shallow/rebased repository shows commit `08dbfad3f504` ("Merge tag 'for-linus' of ...") as the root or merge head, so extensive git history search was truncated.
---
### 2. Current Hypotheses and Lines of Investigation
- **Nature of the Bug:**
- Race condition between CPU hotplug offline path (`take_cpu_down` / CPU teardown) and CFS idle load balance (`sched_balance_newidle` -> `sched_balance_rq`).
- While a CPU is transitioning offline or freshly offline, CFS picks it as `busiest` and queues an active load balance stopper work (`stop_one_cpu_nowait`).
- When trying to wake up the target CPU's stopper thread, the scheduler tries to send a reschedule IPI to the target CPU via `native_smp_send_reschedule()`.
- `native_smp_send_reschedule` catches this condition via `unlikely(cpu_is_offline(cpu))`, logs a `WARN(1, ...)`, and immediately returns without sending the IPI or touching hardware APIC.
- **Impact & Assessment Dimensions:**
1. **Exploitable:**
- The warning handles the condition gracefully: `if (unlikely(cpu_is_offline(cpu))) { WARN(...); return; }`.
- No uninitialized memory, no buffer overflow, no use-after-free, no privilege escalation primitive, no memory corruption, and no information leak.
- Even if the stopper work was queued, if the CPU is offline or going offline, APIC soft-disable is active and interrupts are drained/ignored; active balance work either doesn't execute or is aborted.
- Not exploitable.
2. **Denial of Service (DoS):**
- In production builds without `panic_on_warn`, this is a non-fatal `WARN()`.
- The code safely returns (`return;`). The lost reschedule is harmless because the target CPU is offline anyway.
- However, need to check if unprivileged users can trigger CPU hotplug (offline/online).
3. **Reachability / Accessibility:**
- CPU offlining requires `CAP_SYS_ADMIN` (writing to `/sys/devices/system/cpu/cpuX/online`). An unprivileged process cannot offline a CPU.
- User namespaces do not permit offlining host CPUs (`sysfs` CPU online attribute requires global `CAP_SYS_ADMIN`).
- Network traffic / peripherals / filesystems / VM guests cannot trigger CPU offlining unless privileged control allows hotplugging.
- Even if CPU hotplug occurs in a VM guest, that's inside the guest kernel, not a hypervisor escape.
---
### 3. Critical Files, Code Snippets, and Configuration
- **`arch/x86/kernel/apic/ipi.c`**:
```c
void native_smp_send_reschedule(int cpu)
{
if (unlikely(cpu_is_offline(cpu))) {
WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
return;
}
__apic_send_IPI(cpu, RESCHEDULE_VECTOR);
}
```
- **`kernel/stop_machine.c`**:
```c
static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
{
struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
...
enabled = stopper->enabled;
if (enabled)
__cpu_stop_queue_work(stopper, work);
...
if (enabled)
wake_up_process(stopper->thread);
...
}
```
- **`kernel/cpu.c`**:
`take_cpu_down()` executes `__cpu_disable()` before `stop_machine_park(cpu)`.
- **`kernel/sched/fair.c`**:
`sched_balance_rq()` calls `stop_one_cpu_nowait(cpu_of(busiest), ...)` when `active_balance` is needed.
- **Check `.config`:**
Need to check configuration parameters (e.g. `CONFIG_HOTPLUG_CPU`, `CONFIG_PREEMPT`, etc.) and ensure verification of permission needed to offline CPUs.
---
### 4. Watch Out / Potential Reasoning Loops
- Do not repeat git searches looking for older commits: the repository contains a squash/merge commit at HEAD with no earlier history.
- The stack trace showing `afs_net_exit`, `rxrpc_release`, `kworker/u32:4 netns cleanup_net` was simply the background context that called `schedule_timeout()` on CPU#2. The scheduling event invoked `pick_task_fair` -> `sched_balance_newidle` while CPU#3 was being offlined concurrently (e.g., by syzkaller hotplug testing). The networking stack is NOT the bug cause; it's purely a scheduler/hotplug race.
- Keep in mind requirements for `set-results` before final response.
Tokens:
input: 62344
output: 2555
thoughts: 0
|
| 57/2 |
2026/09/17 02:25 |
llm |
expert |
0m
Model:
Tokens:
input: 14717
output: 38
thoughts: 0
|
| 58/2 |
2026/09/17 02:26 |
tool |
read-file |
0m
Args: map[File:kernel/sched/fair.c FirstLine:13640 LineCount:100]
Results: map[Contents:13640: * ->active_balance synchronizes accesses to
13641: * ->active_balance_work. Once set, it's cleared
13642: * only after active load balance is finished.
13643: */
13644: if (busiest->active_balance)
13645: goto out_unbalanced;
13646:
13647: /*
13648: * @busiest dropped its rq_lock in the middle of
13649: * scheduling out its ->curr task (->on_rq := 0), no
13650: * need to forcefully punt it away with active balance.
13651: */
13652: if (!busiest->curr->on_rq)
13653: goto out_unbalanced;
13654:
13655: busiest->active_balance = 1;
13656: busiest->push_cpu = this_cpu;
13657: active_balance = 1;
13658: preempt_disable();
13659: }
13660: if (active_balance) {
13661: stop_one_cpu_nowait(cpu_of(busiest),
13662: active_load_balance_cpu_stop, busiest,
13663: &busiest->active_balance_work);
13664: }
13665: preempt_enable();
13666:
13667: out_unbalanced:
13668: /* We were unbalanced, so reset the balancing interval */
13669: sd->balance_interval = sd->min_interval;
13670: goto out;
13671:
13672: out_balanced:
13673: /*
13674: * We reach balance although we may have faced some affinity
13675: * constraints. Clear the imbalance flag only if other tasks got
13676: * a chance to move and fix the imbalance.
13677: */
13678: if (sd_parent && !(env.flags & LBF_ALL_PINNED)) {
13679: int *group_imbalance = &sd_parent->groups->sgc->imbalance;
13680:
13681: if (*group_imbalance)
13682: *group_imbalance = 0;
13683: }
13684:
13685: out_all_pinned:
13686: /*
13687: * We reach balance because all tasks are pinned at this level so
13688: * we can't migrate them. Let the imbalance flag set so parent level
13689: * can try to migrate them.
13690: */
13691: schedstat_inc(sd->lb_balanced[idle]);
13692:
13693: sd->nr_balance_failed = 0;
13694:
13695: out_one_pinned:
13696: ld_moved = 0;
13697:
13698: /*
13699: * sched_balance_newidle() disregards balance intervals, so we could
13700: * repeatedly reach this code, which would lead to balance_interval
13701: * skyrocketing in a short amount of time. Skip the balance_interval
13702: * increase logic to avoid that.
13703: *
13704: * Similarly misfit migration which is not necessarily an indication of
13705: * the system being busy and requires lb to backoff to let it settle
13706: * down.
13707: */
13708: if (env.idle == CPU_NEWLY_IDLE ||
13709: env.migration_type == migrate_misfit)
13710: goto out;
13711:
13712: /* tune up the balancing interval */
13713: if ((env.flags & LBF_ALL_PINNED &&
13714: sd->balance_interval < MAX_PINNED_INTERVAL) ||
13715: sd->balance_interval < sd->max_interval)
13716: sd->balance_interval *= 2;
13717: out:
13718: if (need_unlock)
13719: atomic_set_release(&sched_balance_running, 0);
13720:
13721: return ld_moved;
13722: }
13723:
13724: static inline unsigned long
13725: get_sd_balance_interval(struct sched_domain *sd, int cpu_busy)
13726: {
13727: unsigned long interval = sd->balance_interval;
13728:
13729: if (cpu_busy)
13730: interval *= sd->busy_factor;
13731:
13732: /* scale ms to jiffies */
13733: interval = msecs_to_jiffies(interval);
13734:
13735: /*
13736: * Reduce likelihood of busy balancing at higher domains racing with
13737: * balancing at lower domains by preventing their balancing periods
13738: * from being multiples of each other.
13739: */
]
|
| 59/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 16280
output: 35
thoughts: 0
|
| 60/2 |
2026/09/17 02:26 |
tool |
read-file |
0m
Args: map[File:kernel/stop_machine.c FirstLine:92 LineCount:100]
Results: map[Contents: 92: static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
93: {
94: struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
95: unsigned long flags;
96: bool enabled;
97:
98: preempt_disable();
99: raw_spin_lock_irqsave(&stopper->lock, flags);
100: enabled = stopper->enabled;
101: if (enabled)
102: __cpu_stop_queue_work(stopper, work);
103: else if (work->done)
104: cpu_stop_signal_done(work->done);
105: raw_spin_unlock_irqrestore(&stopper->lock, flags);
106:
107: if (enabled)
108: wake_up_process(stopper->thread);
109: preempt_enable();
110:
111: return enabled;
112: }
113:
114: /**
115: * stop_one_cpu - stop a cpu
116: * @cpu: cpu to stop
117: * @fn: function to execute
118: * @arg: argument to @fn
119: *
120: * Execute @fn(@arg) on @cpu. @fn is run in a process context with
121: * the highest priority preempting any task on the cpu and
122: * monopolizing it. This function returns after the execution is
123: * complete.
124: *
125: * This function doesn't guarantee @cpu stays online till @fn
126: * completes. If @cpu goes down in the middle, execution may happen
127: * partially or fully on different cpus. @fn should either be ready
128: * for that or the caller should ensure that @cpu stays online until
129: * this function completes.
130: *
131: * CONTEXT:
132: * Might sleep.
133: *
134: * RETURNS:
135: * -ENOENT if @fn(@arg) was not executed because @cpu was offline;
136: * otherwise, the return value of @fn.
137: */
138: int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg)
139: {
140: struct cpu_stop_done done;
141: struct cpu_stop_work work = { .fn = fn, .arg = arg, .done = &done, .caller = _RET_IP_ };
142:
143: cpu_stop_init_done(&done, 1);
144: if (!cpu_stop_queue_work(cpu, &work))
145: return -ENOENT;
146: /*
147: * In case @cpu == smp_proccessor_id() we can avoid a sleep+wakeup
148: * cycle by doing a preemption:
149: */
150: cond_resched();
151: wait_for_completion(&done.completion);
152: return done.ret;
153: }
154:
155: /* This controls the threads on each CPU. */
156: enum multi_stop_state {
157: /* Dummy starting state for thread. */
158: MULTI_STOP_NONE,
159: /* Awaiting everyone to be scheduled. */
160: MULTI_STOP_PREPARE,
161: /* Disable interrupts. */
162: MULTI_STOP_DISABLE_IRQ,
163: /* Run the function */
164: MULTI_STOP_RUN,
165: /* Exit */
166: MULTI_STOP_EXIT,
167: };
168:
169: struct multi_stop_data {
170: cpu_stop_fn_t fn;
171: void *data;
172: /* Like num_online_cpus(), but hotplug cpu uses us, so we need this. */
173: unsigned int num_threads;
174: const struct cpumask *active_cpus;
175:
176: enum multi_stop_state state;
177: atomic_t thread_ack;
178: };
179:
180: static void set_state(struct multi_stop_data *msdata,
181: enum multi_stop_state newstate)
182: {
183: /* Reset ack counter. */
184: atomic_set(&msdata->thread_ack, msdata->num_threads);
185: smp_wmb();
186: WRITE_ONCE(msdata->state, newstate);
187: }
188:
189: /* Last one to ack a state moves to the next state. */
190: static void ack_state(struct multi_stop_data *msdata)
191: {
]
|
| 61/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 17781
output: 35
thoughts: 0
|
| 62/2 |
2026/09/17 02:26 |
tool |
read-file |
0m
Args: map[File:kernel/cpu.c FirstLine:1330 LineCount:100]
Results: map[Contents:1330: *
1331: * Wait for the stop thread to go away.
1332: */
1333: wait_for_ap_thread(st, false);
1334: BUG_ON(st->state != CPUHP_AP_IDLE_DEAD);
1335:
1336: /* Interrupts are moved away from the dying cpu, reenable alloc/free */
1337: irq_unlock_sparse();
1338:
1339: hotplug_cpu__broadcast_tick_pull(cpu);
1340: /* This actually kills the CPU. */
1341: __cpu_die(cpu);
1342:
1343: cpuhp_bp_sync_dead(cpu);
1344:
1345: lockdep_cleanup_dead_cpu(cpu, idle_thread_get(cpu));
1346:
1347: /*
1348: * Callbacks must be re-integrated right away to the RCU state machine.
1349: * Otherwise an RCU callback could block a further teardown function
1350: * waiting for its completion.
1351: */
1352: rcutree_migrate_callbacks(cpu);
1353:
1354: return 0;
1355: }
1356:
1357: static void cpuhp_complete_idle_dead(void *arg)
1358: {
1359: struct cpuhp_cpu_state *st = arg;
1360:
1361: complete_ap_thread(st, false);
1362: }
1363:
1364: void cpuhp_report_idle_dead(void)
1365: {
1366: struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
1367:
1368: BUG_ON(st->state != CPUHP_AP_OFFLINE);
1369: tick_assert_timekeeping_handover();
1370: rcutree_report_cpu_dead();
1371: st->state = CPUHP_AP_IDLE_DEAD;
1372: /*
1373: * We cannot call complete after rcutree_report_cpu_dead() so we delegate it
1374: * to an online cpu.
1375: */
1376: smp_call_function_single(cpumask_first(cpu_online_mask),
1377: cpuhp_complete_idle_dead, st, 0);
1378: }
1379:
1380: static int cpuhp_down_callbacks(unsigned int cpu, struct cpuhp_cpu_state *st,
1381: enum cpuhp_state target)
1382: {
1383: enum cpuhp_state prev_state = st->state;
1384: int ret = 0;
1385:
1386: ret = cpuhp_invoke_callback_range(false, cpu, st, target);
1387: if (ret) {
1388: pr_debug("CPU DOWN failed (%d) CPU %u state %s (%d)\n",
1389: ret, cpu, cpuhp_get_step(st->state)->name,
1390: st->state);
1391:
1392: cpuhp_reset_state(cpu, st, prev_state);
1393:
1394: if (st->state < prev_state)
1395: WARN_ON(cpuhp_invoke_callback_range(true, cpu, st,
1396: prev_state));
1397: }
1398:
1399: return ret;
1400: }
1401:
1402: /* Requires cpu_add_remove_lock to be held */
1403: static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
1404: enum cpuhp_state target)
1405: {
1406: struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
1407: int prev_state, ret = 0;
1408:
1409: if (num_online_cpus() == 1)
1410: return -EBUSY;
1411:
1412: if (!cpu_present(cpu))
1413: return -EINVAL;
1414:
1415: cpus_write_lock();
1416:
1417: /*
1418: * Keep at least one housekeeping cpu onlined to avoid generating
1419: * an empty sched_domain span.
1420: */
1421: if (cpumask_any_and(cpu_online_mask,
1422: housekeeping_cpumask(HK_TYPE_DOMAIN)) >= nr_cpu_ids) {
1423: ret = -EBUSY;
1424: goto out;
1425: }
1426:
1427: cpuhp_tasks_frozen = tasks_frozen;
1428:
1429: prev_state = cpuhp_set_state(cpu, st, target);
]
|
| 63/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 19294
output: 35
thoughts: 0
|
| 64/2 |
2026/09/17 02:26 |
tool |
read-file |
0m
Args: map[File:kernel/cpu.c FirstLine:1230 LineCount:100]
Results: map[Contents:1230: #define arch_clear_mm_cpumask_cpu(cpu, mm) cpumask_clear_cpu(cpu, mm_cpumask(mm))
1231: #endif
1232:
1233: /**
1234: * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU
1235: * @cpu: a CPU id
1236: *
1237: * This function walks all processes, finds a valid mm struct for each one and
1238: * then clears a corresponding bit in mm's cpumask. While this all sounds
1239: * trivial, there are various non-obvious corner cases, which this function
1240: * tries to solve in a safe manner.
1241: *
1242: * Also note that the function uses a somewhat relaxed locking scheme, so it may
1243: * be called only for an already offlined CPU.
1244: */
1245: void clear_tasks_mm_cpumask(int cpu)
1246: {
1247: struct task_struct *p;
1248:
1249: /*
1250: * This function is called after the cpu is taken down and marked
1251: * offline, so its not like new tasks will ever get this cpu set in
1252: * their mm mask. -- Peter Zijlstra
1253: * Thus, we may use rcu_read_lock() here, instead of grabbing
1254: * full-fledged tasklist_lock.
1255: */
1256: WARN_ON(cpu_online(cpu));
1257: rcu_read_lock();
1258: for_each_process(p) {
1259: struct task_struct *t;
1260:
1261: /*
1262: * Main thread might exit, but other threads may still have
1263: * a valid mm. Find one.
1264: */
1265: t = find_lock_task_mm(p);
1266: if (!t)
1267: continue;
1268: arch_clear_mm_cpumask_cpu(cpu, t->mm);
1269: task_unlock(t);
1270: }
1271: rcu_read_unlock();
1272: }
1273:
1274: /* Take this CPU down. */
1275: static int take_cpu_down(void *_param)
1276: {
1277: struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
1278: enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
1279: int err, cpu = smp_processor_id();
1280:
1281: /* Ensure this CPU doesn't handle any more interrupts. */
1282: err = __cpu_disable();
1283: if (err < 0)
1284: return err;
1285:
1286: /*
1287: * Must be called from CPUHP_TEARDOWN_CPU, which means, as we are going
1288: * down, that the current state is CPUHP_TEARDOWN_CPU - 1.
1289: */
1290: WARN_ON(st->state != (CPUHP_TEARDOWN_CPU - 1));
1291:
1292: /*
1293: * Invoke the former CPU_DYING callbacks. DYING must not fail!
1294: */
1295: cpuhp_invoke_callback_range_nofail(false, cpu, st, target);
1296:
1297: /* Park the stopper thread */
1298: stop_machine_park(cpu);
1299: return 0;
1300: }
1301:
1302: static int takedown_cpu(unsigned int cpu)
1303: {
1304: struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
1305: int err;
1306:
1307: /* Park the smpboot threads */
1308: kthread_park(st->thread);
1309:
1310: /*
1311: * Prevent irq alloc/free while the dying cpu reorganizes the
1312: * interrupt affinities.
1313: */
1314: irq_lock_sparse();
1315:
1316: err = stop_machine_cpuslocked(take_cpu_down, NULL, cpumask_of(cpu));
1317: if (err) {
1318: /* CPU refused to die */
1319: irq_unlock_sparse();
1320: /* Unpark the hotplug thread so we can rollback there */
1321: kthread_unpark(st->thread);
1322: return err;
1323: }
1324: BUG_ON(cpu_online(cpu));
1325:
1326: /*
1327: * The teardown callback for CPUHP_AP_SCHED_STARTING will have removed
1328: * all runnable tasks from the CPU, there's only the idle task left now
1329: * that the migration thread is done doing the stop_machine thing.
]
|
| 65/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 20845
output: 43
thoughts: 0
|
| 66/2 |
2026/09/17 02:26 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/smpboot.c FirstLine:1290 LineCount:100]
Results: map[Contents:1290: {
1291: alloc_bootmem_cpumask_var(&cpu_sibling_setup_mask);
1292: }
1293:
1294: #ifdef CONFIG_HOTPLUG_CPU
1295:
1296: /* Recompute SMT state for all CPUs on offline */
1297: static void recompute_smt_state(void)
1298: {
1299: int max_threads, cpu;
1300:
1301: max_threads = 0;
1302: for_each_online_cpu (cpu) {
1303: int threads = cpumask_weight(topology_sibling_cpumask(cpu));
1304:
1305: if (threads > max_threads)
1306: max_threads = threads;
1307: }
1308: __max_smt_threads = max_threads;
1309: }
1310:
1311: static void remove_siblinginfo(int cpu)
1312: {
1313: int sibling;
1314: struct cpuinfo_x86 *c = &cpu_data(cpu);
1315:
1316: for_each_cpu(sibling, topology_core_cpumask(cpu)) {
1317: cpumask_clear_cpu(cpu, topology_core_cpumask(sibling));
1318: /*/
1319: * last thread sibling in this cpu core going down
1320: */
1321: if (cpumask_weight(topology_sibling_cpumask(cpu)) == 1)
1322: cpu_data(sibling).booted_cores--;
1323: }
1324:
1325: for_each_cpu(sibling, topology_die_cpumask(cpu))
1326: cpumask_clear_cpu(cpu, topology_die_cpumask(sibling));
1327:
1328: for_each_cpu(sibling, topology_sibling_cpumask(cpu)) {
1329: cpumask_clear_cpu(cpu, topology_sibling_cpumask(sibling));
1330: if (cpumask_weight(topology_sibling_cpumask(sibling)) == 1)
1331: cpu_data(sibling).smt_active = false;
1332: }
1333:
1334: for_each_cpu(sibling, cpu_llc_shared_mask(cpu))
1335: cpumask_clear_cpu(cpu, cpu_llc_shared_mask(sibling));
1336: for_each_cpu(sibling, cpu_l2c_shared_mask(cpu))
1337: cpumask_clear_cpu(cpu, cpu_l2c_shared_mask(sibling));
1338: cpumask_clear(cpu_llc_shared_mask(cpu));
1339: cpumask_clear(cpu_l2c_shared_mask(cpu));
1340: cpumask_clear(topology_sibling_cpumask(cpu));
1341: cpumask_clear(topology_core_cpumask(cpu));
1342: cpumask_clear(topology_die_cpumask(cpu));
1343: c->topo.core_id = 0;
1344: c->booted_cores = 0;
1345: cpumask_clear_cpu(cpu, cpu_sibling_setup_mask);
1346: recompute_smt_state();
1347: }
1348:
1349: static void remove_cpu_from_maps(int cpu)
1350: {
1351: set_cpu_online(cpu, false);
1352: numa_remove_cpu(cpu);
1353: }
1354:
1355: void cpu_disable_common(void)
1356: {
1357: int cpu = smp_processor_id();
1358:
1359: remove_siblinginfo(cpu);
1360:
1361: /*
1362: * Stop allowing kernel-mode FPU. This is needed so that if the CPU is
1363: * brought online again, the initial state is not allowed:
1364: */
1365: this_cpu_write(kernel_fpu_allowed, false);
1366:
1367: /* It's now safe to remove this processor from the online map */
1368: lock_vector_lock();
1369: remove_cpu_from_maps(cpu);
1370: unlock_vector_lock();
1371: fixup_irqs();
1372: lapic_offline();
1373: }
1374:
1375: int native_cpu_disable(void)
1376: {
1377: int ret;
1378:
1379: ret = lapic_can_unplug_cpu();
1380: if (ret)
1381: return ret;
1382:
1383: cpu_disable_common();
1384:
1385: /*
1386: * Disable the local APIC. Otherwise IPI broadcasts will reach
1387: * it. It still responds normally to INIT, NMI, SMI, and SIPI
1388: * messages.
1389: *
]
|
| 67/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 22402
output: 49
thoughts: 0
|
| 68/2 |
2026/09/17 02:26 |
tool |
codesearch-find-references |
0m
Error:
Args: map[ContextFile:kernel/sched/fair.c IncludeSnippetLines:0 Name:cpu_is_offline SourceTreePrefix:]
Results: map[References:<nil> TruncatedOutput:false]
|
| 69/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 22472
output: 25
thoughts: 0
|
| 70/2 |
2026/09/17 02:26 |
tool |
grepper |
0m
Args: map[Expression:cpu_is_offline PathPrefix:]
Results: map[Output:arch/powerpc/mm/numa.c=766=static void verify_cpu_node_mapping(int cpu, int node)
--
arch/powerpc/mm/numa.c-775-
arch/powerpc/mm/numa.c:776: if (sibling == cpu || cpu_is_offline(sibling))
arch/powerpc/mm/numa.c-777- continue;
--
arch/powerpc/sysdev/fsl_rcpm.c=143=static void rcpm_v2_cpu_die(int cpu)
--
arch/powerpc/sysdev/fsl_rcpm.c-149- primary = cpu_first_thread_sibling(cpu);
arch/powerpc/sysdev/fsl_rcpm.c:150: if (cpu_is_offline(primary) && cpu_is_offline(primary + 1)) {
arch/powerpc/sysdev/fsl_rcpm.c-151- /* if both threads are offline, put the cpu in PH20 */
--
arch/sparc/kernel/process_64.c=58=void arch_cpu_idle(void)
--
arch/sparc/kernel/process_64.c-76-
arch/sparc/kernel/process_64.c:77: if (!need_resched() && !cpu_is_offline(smp_processor_id())) {
arch/sparc/kernel/process_64.c-78- sun4v_cpu_yield();
--
arch/x86/include/asm/cpumask.h=9=extern void setup_cpu_local_masks(void);
--
arch/x86/include/asm/cpumask.h-11-/*
arch/x86/include/asm/cpumask.h:12: * NMI and MCE exceptions need cpu_is_offline() _really_ early,
arch/x86/include/asm/cpumask.h-13- * provide an arch_ special for them to avoid instrumentation.
--
arch/x86/include/asm/cpumask.h=31=static __always_inline void arch_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
--
arch/x86/include/asm/cpumask.h-36-
arch/x86/include/asm/cpumask.h:37:#define arch_cpu_is_offline(cpu) unlikely(!arch_cpu_online(cpu))
arch/x86/include/asm/cpumask.h-38-
--
arch/x86/kernel/apic/ipi.c=68=void native_smp_send_reschedule(int cpu)
arch/x86/kernel/apic/ipi.c-69-{
arch/x86/kernel/apic/ipi.c:70: if (unlikely(cpu_is_offline(cpu))) {
arch/x86/kernel/apic/ipi.c-71- WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
--
arch/x86/kernel/cpu/mce/core.c=1307=static noinstr bool mce_check_crashing_cpu(void)
--
arch/x86/kernel/cpu/mce/core.c-1310-
arch/x86/kernel/cpu/mce/core.c:1311: if (arch_cpu_is_offline(cpu) ||
arch/x86/kernel/cpu/mce/core.c-1312- (crashing_cpu != -1 && crashing_cpu != cpu)) {
--
arch/x86/kernel/nmi.c=536=DEFINE_IDTENTRY_RAW(exc_nmi)
--
arch/x86/kernel/nmi.c-548-
arch/x86/kernel/nmi.c:549: if (arch_cpu_is_offline(smp_processor_id())) {
arch/x86/kernel/nmi.c-550- if (microcode_nmi_handler_enabled())
--
arch/x86/kernel/nmi.c=621=static char *nmi_check_stall_msg[] = {
--
arch/x86/kernel/nmi.c-623-/* +--------- nmi_seq & 0x1: CPU is currently in NMI handler. */
arch/x86/kernel/nmi.c:624:/* | +------ cpu_is_offline(cpu) */
arch/x86/kernel/nmi.c-625-/* | | +--- nsp->idt_calls_snap != atomic_long_read(&nsp->idt_calls): */
--
arch/x86/kernel/nmi.c=653=void nmi_backtrace_stall_check(const struct cpumask *btp)
--
arch/x86/kernel/nmi.c-673- idx = ((nmi_seq & 0x1) << 2) |
arch/x86/kernel/nmi.c:674: (cpu_is_offline(cpu) << 1) |
arch/x86/kernel/nmi.c-675- (nsp->idt_calls_snap != atomic_long_read(&nsp->idt_calls));
--
arch/x86/kernel/nmi.c=707=DEFINE_FREDENTRY_NMI(exc_nmi)
--
arch/x86/kernel/nmi.c-710-
arch/x86/kernel/nmi.c:711: if (arch_cpu_is_offline(smp_processor_id())) {
arch/x86/kernel/nmi.c-712- if (microcode_nmi_handler_enabled())
--
drivers/acpi/processor_throttling.c=1042=static int __acpi_processor_set_throttling(struct acpi_processor *pr,
--
drivers/acpi/processor_throttling.c-1060-
drivers/acpi/processor_throttling.c:1061: if (cpu_is_offline(pr->id)) {
drivers/acpi/processor_throttling.c-1062- /*
--
drivers/macintosh/via-pmu.c=1939=powerbook_sleep_Core99(void)
--
drivers/macintosh/via-pmu.c-1949-
drivers/macintosh/via-pmu.c:1950: if (num_online_cpus() > 1 || cpu_is_offline(0))
drivers/macintosh/via-pmu.c-1951- return -EAGAIN;
--
drivers/virt/nitro_enclaves/ne_misc_dev.c=179=static int ne_setup_cpu_pool(const char *ne_cpu_list)
--
drivers/virt/nitro_enclaves/ne_misc_dev.c-214- for_each_cpu(cpu, cpu_pool)
drivers/virt/nitro_enclaves/ne_misc_dev.c:215: if (cpu_is_offline(cpu)) {
drivers/virt/nitro_enclaves/ne_misc_dev.c-216- pr_err("%s: CPU %d is offline, has to be online to get its metadata\n",
--
include/linux/cpumask.h=1293=static __always_inline bool cpu_dying(unsigned int cpu)
--
include/linux/cpumask.h-1299-
include/linux/cpumask.h:1300:#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
include/linux/cpumask.h-1301-
--
kernel/irq_work.c=137=bool irq_work_queue_on(struct irq_work *work, int cpu)
--
kernel/irq_work.c-143- /* All work should have been flushed before going offline */
kernel/irq_work.c:144: WARN_ON_ONCE(cpu_is_offline(cpu));
kernel/irq_work.c-145-
--
kernel/irq_work.c=184=bool irq_work_needs_cpu(void)
--
kernel/irq_work.c-195- /* All work should have been flushed before going offline */
kernel/irq_work.c:196: WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
kernel/irq_work.c-197-
--
kernel/rcu/tree.c=2573=static void rcu_do_batch(struct rcu_data *rdp)
--
kernel/rcu/tree.c-2609- rcu_nocb_lock_irqsave(rdp, flags);
kernel/rcu/tree.c:2610: WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
kernel/rcu/tree.c-2611- pending = rcu_segcblist_get_seglen(&rdp->cblist, RCU_DONE_TAIL);
--
kernel/rcu/tree.c=2868=static __latent_entropy void rcu_core(void)
--
kernel/rcu/tree.c-2872-
kernel/rcu/tree.c:2873: if (cpu_is_offline(smp_processor_id()))
kernel/rcu/tree.c-2874- return;
--
kernel/rcu/tree.c=3059=static void call_rcu_core(struct rcu_data *rdp, struct rcu_head *head,
--
kernel/rcu/tree.c-3070- /* If interrupts were disabled or CPU offline, don't invoke RCU core. */
kernel/rcu/tree.c:3071: if (irqs_disabled_flags(flags) || cpu_is_offline(smp_processor_id()))
kernel/rcu/tree.c-3072- return;
--
kernel/rcu/tree_stall.h=396=static void rcu_dump_cpu_stacks(unsigned long gp_seq)
--
kernel/rcu/tree_stall.h-413- if (rnp->qsmask & leaf_node_cpu_bit(rnp, cpu)) {
kernel/rcu/tree_stall.h:414: if (cpu_is_offline(cpu))
kernel/rcu/tree_stall.h-415- pr_err("Offline CPU %d blocking current GP.\n", cpu);
--
kernel/rcu/tree_stall.h=457=static bool rcu_is_rcuc_kthread_starving(struct rcu_data *rdp, unsigned long *jp)
--
kernel/rcu/tree_stall.h-467- cpu = task_cpu(rcuc);
kernel/rcu/tree_stall.h:468: if (cpu_is_offline(cpu) || idle_cpu(cpu))
kernel/rcu/tree_stall.h-469- return false;
--
kernel/rcu/tree_stall.h=568=static void rcu_check_gp_kthread_starvation(void)
--
kernel/rcu/tree_stall.h-588- sched_show_task(gpk);
kernel/rcu/tree_stall.h:589: if (cpu_is_offline(cpu)) {
kernel/rcu/tree_stall.h-590- pr_err("RCU GP kthread last ran on offline CPU %d.\n", cpu);
--
kernel/scftorture.c=472=static int scftorture_invoker(void *arg)
--
kernel/scftorture.c-509- scftorture_invoke_one(scfp, &rand);
kernel/scftorture.c:510: while (cpu_is_offline(cpu) && !torture_must_stop()) {
kernel/scftorture.c-511- schedule_timeout_interruptible(HZ / 5);
--
kernel/sched/core.c=1369=static bool wake_up_full_nohz_cpu(int cpu)
--
kernel/sched/core.c-1376- */
kernel/sched/core.c:1377: if (cpu_is_offline(cpu))
kernel/sched/core.c-1378- return true; /* Don't try to wake offline CPUs. */
--
kernel/sched/core.c=6231=pick_next_task(struct rq *rq, struct rq_flags *rf)
--
kernel/sched/core.c-6248- /* Stopper task is switching into idle, no need core-wide selection. */
kernel/sched/core.c:6249: if (cpu_is_offline(cpu)) {
kernel/sched/core.c-6250- /*
--
kernel/sched/idle.c=278=static void do_idle(void)
--
kernel/sched/idle.c-282-
kernel/sched/idle.c:283: if (cpu_is_offline(cpu)) {
kernel/sched/idle.c-284- local_irq_disable();
--
kernel/time/tick-sched.c=1096=static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)
kernel/time/tick-sched.c-1097-{
kernel/time/tick-sched.c:1098: WARN_ON_ONCE(cpu_is_offline(cpu));
kernel/time/tick-sched.c-1099-
--
kernel/time/timer.c=2183=static inline u64 __get_next_timer_interrupt(unsigned long basej, u64 basem,
--
kernel/time/timer.c-2194- */
kernel/time/timer.c:2195: if (WARN_ON_ONCE(cpu_is_offline(smp_processor_id()))) {
kernel/time/timer.c-2196- if (idle)
--
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh=80=cpu_is_online()
--
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh-84-
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh:85:cpu_is_offline()
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh-86-{
--
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh=113=online_cpu_expect_fail()
--
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh-119- retval=1
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh:120: elif ! cpu_is_offline $cpu; then
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh-121- echo $FUNCNAME $cpu: unexpected online >&2
--
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh=126=offline_cpu_expect_success()
--
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh-132- retval=1
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh:133: elif ! cpu_is_offline $cpu; then
tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh-134- echo $FUNCNAME $cpu: unexpected offline >&2
]
|
| 71/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 26531
output: 41
thoughts: 0
|
| 72/2 |
2026/09/17 02:26 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/apic/ipi.c FirstLine:60 LineCount:20]
Results: map[Contents: 60: __apic_send_IPI_mask_allbutself(cpu_online_mask, vector);
61: }
62:
63: /*
64: * Send a 'reschedule' IPI to another CPU. It goes straight through and
65: * wastes no time serializing anything. Worst case is that we lose a
66: * reschedule ...
67: */
68: void native_smp_send_reschedule(int cpu)
69: {
70: if (unlikely(cpu_is_offline(cpu))) {
71: WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
72: return;
73: }
74: __apic_send_IPI(cpu, RESCHEDULE_VECTOR);
75: }
76:
77: void native_send_call_func_single_ipi(int cpu)
78: {
79: __apic_send_IPI(cpu, CALL_FUNCTION_SINGLE_VECTOR);
]
|
| 73/2 |
2026/09/17 02:26 |
llm |
expert |
0m
Model:
Tokens:
input: 26873
output: 218
thoughts: 0
|
| 74/2 |
2026/09/17 02:26 |
tool |
codeexpert |
3m
Args: map[Question:In the provided kernel bug report, `native_smp_send_reschedule` triggers a `WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);` because `cpu_is_offline(cpu)` is true. The call stack shows this happens during CFS load balancing (`sched_balance_newidle` -> `sched_balance_rq` -> `stop_one_cpu_nowait` -> `cpu_stop_queue_work` -> `wake_up_process` -> `try_to_wake_up` -> `smp_send_reschedule`).
Is this a known race condition between CPU hotplug (offlining) and the scheduler's load balancing?
Can this WARNING lead to any memory corruption, use-after-free, or other exploitable conditions?
Is there any way an unprivileged user can trigger this, assuming they cannot offline CPUs (which requires root/CAP_SYS_ADMIN)?]
Results: map[Answer:1. Race condition nature:
Yes, this is a known race condition between CPU offlining (hotplug) and CFS load balancing (active load balance). Specifically:
- During CPU teardown, the dying CPU marks itself offline (via `__cpu_disable()` -> `cpu_disable_common()` -> `set_cpu_online(cpu, false)`) and then parks its cpu_stopper thread (via `stop_machine_park()`).
- Concurrently, another CPU running idle load balancing (`sched_balance_newidle` -> `sched_balance_rq`) decides to kick active load balancing on the dying CPU, calling `stop_one_cpu_nowait()`.
- In `cpu_stop_queue_work()`, `stopper->enabled` is checked and found to be true (prior to or during park), so work is queued and `wake_up_process(stopper->thread)` is called.
- Inside `try_to_wake_up()`, waking the stopper thread pinned to the dying CPU leads to `smp_send_reschedule(cpu)`. By the time `native_smp_send_reschedule()` runs, `cpu_is_offline(cpu)` evaluates to true because the dying CPU has already cleared its online bit, tripping the `WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu)`.
2. Memory corruption, UAF, or exploitability:
No. This warning cannot lead to memory corruption, use-after-free, or exploitable conditions:
- In `native_smp_send_reschedule()`, upon detecting that the CPU is offline, it emits the WARN and immediately returns (`return;`), avoiding sending an invalid APIC IPI.
- The stopper work and scheduler state on the dying CPU are safely handled and torn down during subsequent hotplug stages (`sched_cpu_dying`, task migration, and stopper parking).
- No memory is unsafely freed or accessed out of bounds; it is purely a timing glitch triggering a diagnostic warning.
3. Unprivileged user trigger:
No. Offlining a CPU requires root/CAP_SYS_ADMIN permissions (e.g. via `/sys/devices/system/cpu/cpu*/online` or privileged system power state operations). An unprivileged user without CAP_SYS_ADMIN cannot offline CPUs and therefore cannot trigger this race condition.]
|
| 75/3 |
2026/09/17 02:26 |
agent |
codeexpert |
3m
Model:
Results: map[Answer:1. Race condition nature:
Yes, this is a known race condition between CPU offlining (hotplug) and CFS load balancing (active load balance). Specifically:
- During CPU teardown, the dying CPU marks itself offline (via `__cpu_disable()` -> `cpu_disable_common()` -> `set_cpu_online(cpu, false)`) and then parks its cpu_stopper thread (via `stop_machine_park()`).
- Concurrently, another CPU running idle load balancing (`sched_balance_newidle` -> `sched_balance_rq`) decides to kick active load balancing on the dying CPU, calling `stop_one_cpu_nowait()`.
- In `cpu_stop_queue_work()`, `stopper->enabled` is checked and found to be true (prior to or during park), so work is queued and `wake_up_process(stopper->thread)` is called.
- Inside `try_to_wake_up()`, waking the stopper thread pinned to the dying CPU leads to `smp_send_reschedule(cpu)`. By the time `native_smp_send_reschedule()` runs, `cpu_is_offline(cpu)` evaluates to true because the dying CPU has already cleared its online bit, tripping the `WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu)`.
2. Memory corruption, UAF, or exploitability:
No. This warning cannot lead to memory corruption, use-after-free, or exploitable conditions:
- In `native_smp_send_reschedule()`, upon detecting that the CPU is offline, it emits the WARN and immediately returns (`return;`), avoiding sending an invalid APIC IPI.
- The stopper work and scheduler state on the dying CPU are safely handled and torn down during subsequent hotplug stages (`sched_cpu_dying`, task migration, and stopper parking).
- No memory is unsafely freed or accessed out of bounds; it is purely a timing glitch triggering a diagnostic warning.
3. Unprivileged user trigger:
No. Offlining a CPU requires root/CAP_SYS_ADMIN permissions (e.g. via `/sys/devices/system/cpu/cpu*/online` or privileged system power state operations). An unprivileged user without CAP_SYS_ADMIN cannot offline CPUs and therefore cannot trigger this race condition.]
Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Research the question using targeted, efficient tool calls. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code. Keep your tool calls focused and limited to the
scope of the question. Do not explore tangential code paths or perform unbounded searches.
Use all available sources of information:
- kernel source code
- documentation in the Documentation dir in the source tree
- git commits descriptions, git blame
Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.
Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
or codesearch-struct-layout FIRST to retrieve clean, exact definitions
without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
4. Be concise and targeted. Answer the question as directly and concisely as possible
once you have located the relevant code or definitions. If a symbol or function cannot
be found after targeted searches, conclude with the best available information rather
than continuing repetitive searches.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.
Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.
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: In the provided kernel bug report, `native_smp_send_reschedule` triggers a `WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);` because `cpu_is_offline(cpu)` is true. The call stack shows this happens during CFS load balancing (`sched_balance_newidle` -> `sched_balance_rq` -> `stop_one_cpu_nowait` -> `cpu_stop_queue_work` -> `wake_up_process` -> `try_to_wake_up` -> `smp_send_reschedule`).
Is this a known race condition between CPU hotplug (offlining) and the scheduler's load balancing?
Can this WARNING lead to any memory corruption, use-after-free, or other exploitable conditions?
Is there any way an unprivileged user can trigger this, assuming they cannot offline CPUs (which requires root/CAP_SYS_ADMIN)?
|
| 76/4 |
2026/09/17 02:26 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 4350
output: 19
thoughts: 378
Thoughts: **Analyzing a Kernel Scheduler Warning**
Okay, so I'm looking into this kernel issue where `native_smp_send_reschedule` is throwing a warning: "sched: Unexpected reschedule of offline CPU#...". The user's query boils down to several key questions, and this is exactly the kind of thing I'm used to dealing with. They're specifically wondering if this is a known race condition between CPU hotplug and the scheduler's load balancing, and more importantly, they're concerned about potential security implications. My immediate thought is, "Okay, vulnerability analysis time."
Specifically, they're worried if this warning could lead to memory corruption, use-after-free conditions, or other exploitable states. They're also curious if an unprivileged user, without root access or the `CAP_SYS_ADMIN` capability (which is usually needed to offline CPUs), could trigger this. That last point is crucial for determining the real-world impact. We *always* look for ways an attacker could leverage a vulnerability.
From a risk perspective, this appears to be a pretty low-severity issue, at least at face value. We're talking about source code analysis and assessing the impact of a warning. The user isn't asking for exploit code or anything that smacks of malware development. This is about understanding the vulnerability's scope and assessing exploitability, which I can safely investigate.
My next step is to actually dig into the kernel source. I'll search for the warning message itself, `"sched: Unexpected reschedule of offline CPU#..."`, and also for instances of `native_smp_send_reschedule`. This will give me a better understanding of the call paths involved, how the warning is triggered, and what contexts are affected. From there, I can begin to assess the potential for memory corruption or other issues and whether or not it's easily reachable.
|
| 77/4 |
2026/09/17 02:26 |
tool |
grepper |
0m
Args: map[Expression:Unexpected reschedule of offline CPU]
Results: map[Output:arch/x86/kernel/apic/ipi.c=68=void native_smp_send_reschedule(int cpu)
--
arch/x86/kernel/apic/ipi.c-70- if (unlikely(cpu_is_offline(cpu))) {
arch/x86/kernel/apic/ipi.c:71: WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
arch/x86/kernel/apic/ipi.c-72- return;
]
|
| 78/4 |
2026/09/17 02:26 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 5286
output: 40
thoughts: 29
Thoughts: Here's my summary, as though I'm thinking through this process:
**Investigating a Potential Issue in the x86 APIC IPI Code**
Okay, so I need to dig into the `arch/x86/kernel/apic/ipi.c` file and specifically, line 71. My initial instinct is to use Git to trace the history and understand what's happening there. I'm thinking I'll start with `git blame` – that should quickly tell me who last touched that line and, ideally, give me a clue as to *why* that specific line was modified. If `git blame` doesn't give me enough context, or if I need a broader understanding of the changes around that line, I'll switch to `git log`. `git log` should provide a more comprehensive history of commits touching that area, allowing me to see the rationale behind the modifications. I'm expecting this is probably some inter-processor interrupt issue. Let's see what that line is doing!
|
| 79/4 |
2026/09/17 02:26 |
tool |
git-blame |
0m
Args: map[End:80 File:arch/x86/kernel/apic/ipi.c Start:65]
Results: map[Output:^08dbfad3f504 65) * wastes no time serializing anything. Worst case is that we lose a
^08dbfad3f504 66) * reschedule ...
^08dbfad3f504 67) */
^08dbfad3f504 68) void native_smp_send_reschedule(int cpu)
^08dbfad3f504 69) {
^08dbfad3f504 70) if (unlikely(cpu_is_offline(cpu))) {
^08dbfad3f504 71) WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
^08dbfad3f504 72) return;
^08dbfad3f504 73) }
^08dbfad3f504 74) __apic_send_IPI(cpu, RESCHEDULE_VECTOR);
^08dbfad3f504 75) }
^08dbfad3f504 76)
^08dbfad3f504 77) void native_send_call_func_single_ipi(int cpu)
^08dbfad3f504 78) {
^08dbfad3f504 79) __apic_send_IPI(cpu, CALL_FUNCTION_SINGLE_VECTOR);
^08dbfad3f504 80) }
]
|
| 80/4 |
2026/09/17 02:26 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 5969
output: 24
thoughts: 42
Thoughts: Okay, here's my interpretation of those thoughts, framed as my own, given my expertise:
**Diving Deep into the Scheduler's Behavior**
Alright, so I need to understand what's been happening with the scheduler, specifically around how it handles CPU reschedules, especially when offline CPUs are involved. My immediate thought is to zero in on commit `08dbfad3f504`. That's likely where the root of the problem might lie, or at least a related change. Going straight to that specific commit is the quickest way to identify if it was a direct cause.
Failing that, I'll need to explore the `native_smp_send_reschedule` function, and dig through the git log. The function's role in the reschedule process is crucial. The logs might reveal the circumstances and other clues. I need to understand exactly how that function behaves and what conditions trigger it. Is it being called in unexpected situations related to an offline CPU?
If neither of those paths lead me to an answer, I will go wider, and search for the phrase "Unexpected reschedule of offline CPU" in the commit logs, that's almost certainly going to provide context for debugging a crash that might have occurred. Using the exact search phrase allows me to rapidly identify any commits or messages that discuss the problem directly. Time to get my hands dirty and use those tools.
|
| 81/4 |
2026/09/17 02:26 |
tool |
git-show |
0m
Args:
Results: map[Output:commit 08dbfad3f5040f5bdb6c529da20d6d4e81fefd72
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sat Aug 29 11:55:36 2026 -0700
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
Pull more SCSI updates from Martin Petersen:
"Remaining updates for the 7.3 merge window. The only core change is
enabling context analysis for the SCSI layer and UFS.
The remaining changes are either bug fixes or hardening"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi: (26 commits)
scsi: snic: Fix SCSI host leak on workqueue allocation failure
scsi: MAINTAINERS: Update my email address
scsi: MAINTAINERS: Leave the cumana_1 and oak drivers to the RISCPC maintainers
scsi: leapraid: Standardize NCQ priority sysfs attributes
scsi: leapraid: Serialize firmware log mmap with teardown
scsi: leapraid: Balance host references for firmware log VMAs
scsi: lpfc: Remove unnnecessary NULL check
scsi: qla2xxx: Fix an loop timeout test
scsi: qla2xxx: Fix an error code in qla_get_tmf()
scsi: ibmvfc: Fix use of uninitialized rport in ibmvfc_do_work()
scsi: core: Enable context analysis for hosts.o
scsi: lpfc: Replace strlcat() with sysfs_emit_at() in the sysfs show functions
scsi: lpfc: Replace strlcat() with seq_buf in the debugfs dump helpers
scsi: lpfc: Replace strlcat() with seq_buf in lpfc_rx_monitor_report()
scsi: lpfc: Replace strlcat() with scnprintf() in lpfc_vport_symbolic_node_name()
scsi: lpfc: Replace strlcat() with seq_buf in lpfc_info()
scsi: core: Enable context analysis
scsi: core: Protect host state changes with the host lock
scsi: core: Add lock context annotations
scsi: core: Pass the SCSI host pointer directly to scanning functions
...
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 000000000..5ef5743b7
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,808 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# clang-format configuration file. Intended for clang-format >= 11.
+#
+# For more information, see:
+#
+# Documentation/dev-tools/clang-format.rst
+# https://clang.llvm.org/docs/ClangFormat.html
+# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
+#
+---
+AccessModifierOffset: -4
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Left
+AlignOperands: true
+AlignTrailingComments: false
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: false
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+ AfterClass: false
+ AfterControlStatement: false
+ AfterEnum: false
+ AfterFunction: true
+ AfterNamespace: true
+ AfterObjCDeclaration: false
+ AfterStruct: false
+ AfterUnion: false
+ AfterExternBlock: false
+ BeforeCatch: false
+ BeforeElse: false
+ IndentBraces: false
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Custom
+BreakBeforeInheritanceComma: false
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializersBeforeComma: false
+BreakConstructorInitializers: BeforeComma
+BreakAfterJavaFieldAnnotations: false
+BreakStringLiterals: false
+ColumnLimit: 80
+CommentPragmas: '^ IWYU pragma:'
+CompactNamespaces: false
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 8
+ContinuationIndentWidth: 8
+Cpp11BracedListStyle: false
+DerivePointerAlignment: false
+DisableFormat: false
+ExperimentalAutoDetectBinPacking: false
+FixNamespaceComments: false
+
+# Taken from:
+# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
+# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
+# | LC_ALL=C sort -u
+ForEachMacros:
+ - '__ata_qc_for_each'
+ - '__bio_for_each_bvec'
+ - '__bio_for_each_segment'
+ - '__evlist__for_each_entry'
+ - '__evlist__for_each_entry_continue'
+ - '__evlist__for_each_entry_from'
+ - '__evlist__for_each_entry_reverse'
+ - '__evlist__for_each_entry_safe'
+ - '__for_each_mem_range'
+ - '__for_each_mem_range_rev'
+ - '__for_each_thread'
+ - '__hlist_for_each_rcu'
+ - '__map__for_each_symbol_by_name'
+ - '__pci_bus_for_each_res0'
+ - '__pci_bus_for_each_res1'
+ - '__pci_dev_for_each_res0'
+ - '__pci_dev_for_each_res1'
+ - '__perf_evlist__for_each_entry'
+ - '__perf_evlist__for_each_entry_reverse'
+ - '__perf_evlist__for_each_entry_safe'
+ - '__rq_for_each_bio'
+ - '__shost_for_each_device'
+ - '__sym_for_each'
+ - '_for_each_counter'
+ - 'apei_estatus_for_each_section'
+ - 'ata_for_each_dev'
+ - 'ata_for_each_link'
+ - 'ata_qc_for_each'
+ - 'ata_qc_for_each_raw'
+ - 'ata_qc_for_each_with_internal'
+ - 'ax25_for_each'
+ - 'ax25_uid_for_each'
+ - 'bio_for_each_bvec'
+ - 'bio_for_each_bvec_all'
+ - 'bio_for_each_folio_all'
+ - 'bio_for_each_integrity_vec'
+ - 'bio_for_each_segment'
+ - 'bio_for_each_segment_all'
+ - 'bio_list_for_each'
+ - 'bip_for_each_vec'
+ - 'bond_for_each_slave'
+ - 'bond_for_each_slave_rcu'
+ - 'bpf_for_each'
+ - 'bpf_for_each_reg_in_vstate'
+ - 'bpf_for_each_reg_in_vstate_mask'
+ - 'bpf_for_each_spilled_reg'
+ - 'bpf_object__for_each_map'
+ - 'bpf_object__for_each_program'
+ - 'btree_for_each_safe128'
+ - 'btree_for_each_safe32'
+ - 'btree_for_each_safe64'
+ - 'btree_for_each_safel'
+ - 'card_for_each_dev'
+ - 'cgroup_taskset_for_each'
+ - 'cgroup_taskset_for_each_leader'
+ - 'cpu_aggr_map__for_each_idx'
+ - 'cpufreq_for_each_efficient_entry_idx'
+ - 'cpufreq_for_each_entry'
+ - 'cpufreq_for_each_entry_idx'
+ - 'cpufreq_for_each_valid_entry'
+ - 'cpufreq_for_each_valid_entry_idx'
+ - 'css_for_each_child'
+ - 'css_for_each_descendant_post'
+ - 'css_for_each_descendant_pre'
+ - 'damon_for_each_region'
+ - 'damon_for_each_region_from'
+ - 'damon_for_each_region_safe'
+ - 'damon_for_each_scheme'
+ - 'damon_for_each_scheme_safe'
+ - 'damon_for_each_target'
+ - 'damon_for_each_target_safe'
+ - 'damos_for_each_core_filter'
+ - 'damos_for_each_core_filter_safe'
+ - 'damos_for_each_ops_filter'
+ - 'damos_for_each_ops_filter_safe'
+ - 'damos_for_each_quota_goal'
+ - 'damos_for_each_quota_goal_safe'
+ - 'data__for_each_file'
+ - 'data__for_each_file_new'
+ - 'data__for_each_file_start'
+ - 'def_for_each_cpu'
+ - 'device_for_each_child_node'
+ - 'device_for_each_child_node_scoped'
+ - 'dma_fence_array_for_each'
+ - 'dma_fence_chain_for_each'
+ - 'dma_fence_unwrap_for_each'
+ - 'dma_resv_for_each_fence'
+ - 'dma_resv_for_each_fence_unlocked'
+ - 'do_for_each_ftrace_op'
+ - 'drm_atomic_crtc_for_each_plane'
+ - 'drm_atomic_crtc_state_for_each_plane'
+ - 'drm_atomic_crtc_state_for_each_plane_state'
+ - 'drm_atomic_for_each_plane_damage'
+ - 'drm_client_for_each_connector_iter'
+ - 'drm_client_for_each_modeset'
+ - 'drm_connector_for_each_possible_encoder'
+ - 'drm_exec_for_each_locked_object'
+ - 'drm_exec_for_each_locked_object_reverse'
+ - 'drm_for_each_bridge_in_chain'
+ - 'drm_for_each_connector_iter'
+ - 'drm_for_each_crtc'
+ - 'drm_for_each_crtc_reverse'
+ - 'drm_for_each_encoder'
+ - 'drm_for_each_encoder_mask'
+ - 'drm_for_each_fb'
+ - 'drm_for_each_legacy_plane'
+ - 'drm_for_each_plane'
+ - 'drm_for_each_plane_mask'
+ - 'drm_for_each_privobj'
+ - 'drm_gem_for_each_gpuvm_bo'
+ - 'drm_gem_for_each_gpuvm_bo_safe'
+ - 'drm_gpusvm_for_each_range'
+ - 'drm_gpuva_for_each_op'
+ - 'drm_gpuva_for_each_op_from_reverse'
+ - 'drm_gpuva_for_each_op_reverse'
+ - 'drm_gpuva_for_each_op_safe'
+ - 'drm_gpuvm_bo_for_each_va'
+ - 'drm_gpuvm_bo_for_each_va_safe'
+ - 'drm_gpuvm_for_each_va'
+ - 'drm_gpuvm_for_each_va_range'
+ - 'drm_gpuvm_for_each_va_range_safe'
+ - 'drm_gpuvm_for_each_va_safe'
+ - 'drm_mm_for_each_hole'
+ - 'drm_mm_for_each_node'
+ - 'drm_mm_for_each_node_in_range'
+ - 'drm_mm_for_each_node_safe'
+ - 'dsa_switch_for_each_available_port'
+ - 'dsa_switch_for_each_cpu_port'
+ - 'dsa_switch_for_each_cpu_port_continue_reverse'
+ - 'dsa_switch_for_each_port'
+ - 'dsa_switch_for_each_port_continue_reverse'
+ - 'dsa_switch_for_each_port_safe'
+ - 'dsa_switch_for_each_user_port'
+ - 'dsa_switch_for_each_user_port_continue_reverse'
+ - 'dsa_tree_for_each_cpu_port'
+ - 'dsa_tree_for_each_user_port'
+ - 'dsa_tree_for_each_user_port_continue_reverse'
+ - 'dso__for_each_symbol'
+ - 'elf_hash_for_each_possible'
+ - 'elf_symtab__for_each_symbol'
+ - 'evlist__for_each_cpu'
+ - 'evlist__for_each_entry'
+ - 'evlist__for_each_entry_continue'
+ - 'evlist__for_each_entry_from'
+ - 'evlist__for_each_entry_reverse'
+ - 'evlist__for_each_entry_safe'
+ - 'flow_action_for_each'
+ - 'for_each_acpi_consumer_dev'
+ - 'for_each_acpi_dev_match'
+ - 'for_each_active_dev_scope'
+ - 'for_each_active_drhd_unit'
+ - 'for_each_active_iommu'
+ - 'for_each_active_irq'
+ - 'for_each_active_route'
+ - 'for_each_aggr_pgid'
+ - 'for_each_alloc_capable_rdt_resource'
+ - 'for_each_and_bit'
+ - 'for_each_andnot_bit'
+ - 'for_each_available_child_of_node'
+ - 'for_each_available_child_of_node_scoped'
+ - 'for_each_bench'
+ - 'for_each_bio'
+ - 'for_each_board_func_rsrc'
+ - 'for_each_btf_ext_rec'
+ - 'for_each_btf_ext_sec'
+ - 'for_each_bvec'
+ - 'for_each_capable_rdt_resource'
+ - 'for_each_card_auxs'
+ - 'for_each_card_auxs_safe'
+ - 'for_each_card_components'
+ - 'for_each_card_dapms'
+ - 'for_each_card_pre_auxs'
+ - 'for_each_card_prelinks'
+ - 'for_each_card_rtds'
+ - 'for_each_card_rtds_safe'
+ - 'for_each_card_widgets'
+ - 'for_each_card_widgets_safe'
+ - 'for_each_cgroup_storage_type'
+ - 'for_each_child_of_node'
+ - 'for_each_child_of_node_scoped'
+ - 'for_each_child_of_node_with_prefix'
+ - 'for_each_clear_bit'
+ - 'for_each_clear_bit_from'
+ - 'for_each_clear_bitrange'
+ - 'for_each_clear_bitrange_from'
+ - 'for_each_cmd'
+ - 'for_each_cmsghdr'
+ - 'for_each_collection'
+ - 'for_each_comp_order'
+ - 'for_each_compatible_node'
+ - 'for_each_compatible_node_scoped'
+ - 'for_each_component_dais'
+ - 'for_each_component_dais_safe'
+ - 'for_each_conduit'
+ - 'for_each_console'
+ - 'for_each_console_srcu'
+ - 'for_each_cpu'
+ - 'for_each_cpu_and'
+ - 'for_each_cpu_andnot'
+ - 'for_each_cpu_from'
+ - 'for_each_cpu_or'
+ - 'for_each_cpu_wrap'
+ - 'for_each_dapm_widgets'
+ - 'for_each_dedup_cand'
+ - 'for_each_dev_addr'
+ - 'for_each_dev_scope'
+ - 'for_each_dma_cap_mask'
+ - 'for_each_dpcm_be'
+ - 'for_each_dpcm_be_rollback'
+ - 'for_each_dpcm_be_safe'
+ - 'for_each_dpcm_fe'
+ - 'for_each_drhd_unit'
+ - 'for_each_dss_dev'
+ - 'for_each_efi_memory_desc'
+ - 'for_each_efi_memory_desc_in_map'
+ - 'for_each_element'
+ - 'for_each_element_extid'
+ - 'for_each_element_id'
+ - 'for_each_enabled_cpu'
+ - 'for_each_endpoint_of_node'
+ - 'for_each_event'
+ - 'for_each_event_tps'
+ - 'for_each_evictable_lru'
+ - 'for_each_fib6_node_rt_rcu'
+ - 'for_each_fib6_walker_rt'
+ - 'for_each_file_lock'
+ - 'for_each_free_mem_range'
+ - 'for_each_free_mem_range_reverse'
+ - 'for_each_func_rsrc'
+ - 'for_each_gpiochip_node'
+ - 'for_each_group_evsel'
+ - 'for_each_group_evsel_head'
+ - 'for_each_group_member'
+ - 'for_each_group_member_head'
+ - 'for_each_hstate'
+ - 'for_each_hwgpio'
+ - 'for_each_hwgpio_in_range'
+ - 'for_each_if'
+ - 'for_each_inject_fn'
+ - 'for_each_insn'
+ - 'for_each_insn_op_loc'
+ - 'for_each_insn_prefix'
+ - 'for_each_intid'
+ - 'for_each_iommu'
+ - 'for_each_ip_tunnel_rcu'
+ - 'for_each_irq_desc'
+ - 'for_each_irq_nr'
+ - 'for_each_lang'
+ - 'for_each_link_ch_maps'
+ - 'for_each_link_codecs'
+ - 'for_each_link_cpus'
+ - 'for_each_link_platforms'
+ - 'for_each_lru'
+ - 'for_each_matching_node'
+ - 'for_each_matching_node_and_match'
+ - 'for_each_media_entity_data_link'
+ - 'for_each_mem_pfn_range'
+ - 'for_each_mem_range'
+ - 'for_each_mem_range_rev'
+ - 'for_each_mem_region'
+ - 'for_each_member'
+ - 'for_each_memory'
+ - 'for_each_migratetype_order'
+ - 'for_each_missing_reg'
+ - 'for_each_mle_subelement'
+ - 'for_each_mod_mem_type'
+ - 'for_each_mon_capable_rdt_resource'
+ - 'for_each_mp_bvec'
+ - 'for_each_net'
+ - 'for_each_net_continue_reverse'
+ - 'for_each_net_rcu'
+ - 'for_each_netdev'
+ - 'for_each_netdev_continue'
+ - 'for_each_netdev_continue_rcu'
+ - 'for_each_netdev_continue_reverse'
+ - 'for_each_netdev_dump'
+ - 'for_each_netdev_feature'
+ - 'for_each_netdev_in_bond_rcu'
+ - 'for_each_netdev_rcu'
+ - 'for_each_netdev_reverse'
+ - 'for_each_netdev_safe'
+ - 'for_each_new_connector_in_state'
+ - 'for_each_new_crtc_in_state'
+ - 'for_each_new_mst_mgr_in_state'
+ - 'for_each_new_plane_in_state'
+ - 'for_each_new_plane_in_state_reverse'
+ - 'for_each_new_private_obj_in_state'
+ - 'for_each_new_reg'
+ - 'for_each_nhlt_endpoint'
+ - 'for_each_nhlt_endpoint_fmtcfg'
+ - 'for_each_nhlt_fmtcfg'
+ - 'for_each_node'
+ - 'for_each_node_by_name'
+ - 'for_each_node_by_type'
+ - 'for_each_node_mask'
+ - 'for_each_node_numadist'
+ - 'for_each_node_state'
+ - 'for_each_node_with_cpus'
+ - 'for_each_node_with_property'
+ - 'for_each_nonreserved_multicast_dest_pgid'
+ - 'for_each_numa_hop_mask'
+ - 'for_each_of_allnodes'
+ - 'for_each_of_allnodes_from'
+ - 'for_each_of_cpu_node'
+ - 'for_each_of_graph_port'
+ - 'for_each_of_graph_port_endpoint'
+ - 'for_each_of_pci_range'
+ - 'for_each_old_connector_in_state'
+ - 'for_each_old_crtc_in_state'
+ - 'for_each_old_mst_mgr_in_state'
+ - 'for_each_old_plane_in_state'
+ - 'for_each_old_private_obj_in_state'
+ - 'for_each_oldnew_connector_in_state'
+ - 'for_each_oldnew_crtc_in_state'
+ - 'for_each_oldnew_mst_mgr_in_state'
+ - 'for_each_oldnew_plane_in_state'
+ - 'for_each_oldnew_plane_in_state_reverse'
+ - 'for_each_oldnew_private_obj_in_state'
+ - 'for_each_online_cpu'
+ - 'for_each_online_cpu_wrap'
+ - 'for_each_online_node'
+ - 'for_each_online_pgdat'
+ - 'for_each_or_bit'
+ - 'for_each_page_ext'
+ - 'for_each_path'
+ - 'for_each_pci_bridge'
+ - 'for_each_pci_dev'
+ - 'for_each_pcm_streams'
+ - 'for_each_physmem_range'
+ - 'for_each_populated_zone'
+ - 'for_each_possible_cpu'
+ - 'for_each_possible_cpu_wrap'
+ - 'for_each_present_blessed_reg'
+ - 'for_each_present_cpu'
+ - 'for_each_present_section_nr'
+ - 'for_each_prime_number'
+ - 'for_each_prime_number_from'
+ - 'for_each_probe_cache_entry'
+ - 'for_each_process'
+ - 'for_each_process_thread'
+ - 'for_each_prop_codec_conf'
+ - 'for_each_prop_dai_codec'
+ - 'for_each_prop_dai_cpu'
+ - 'for_each_prop_dlc_codecs'
+ - 'for_each_prop_dlc_cpus'
+ - 'for_each_prop_dlc_platforms'
+ - 'for_each_property_of_node'
+ - 'for_each_pt_level_entry'
+ - 'for_each_rdt_resource'
+ - 'for_each_reg'
+ - 'for_each_reg_filtered'
+ - 'for_each_reloc'
+ - 'for_each_reloc_from'
+ - 'for_each_requested_gpio'
+ - 'for_each_requested_gpio_in_range'
+ - 'for_each_reserved_child_of_node'
+ - 'for_each_reserved_mem_range'
+ - 'for_each_reserved_mem_region'
+ - 'for_each_rtd_ch_maps'
+ - 'for_each_rtd_codec_dais'
+ - 'for_each_rtd_components'
+ - 'for_each_rtd_cpu_dais'
+ - 'for_each_rtd_dais'
+ - 'for_each_rtd_dais_reverse'
+ - 'for_each_sband_iftype_data'
+ - 'for_each_script'
+ - 'for_each_sec'
+ - 'for_each_set_bit'
+ - 'for_each_set_bit_from'
+ - 'for_each_set_bit_wrap'
+ - 'for_each_set_bitrange'
+ - 'for_each_set_bitrange_from'
+ - 'for_each_set_clump8'
+ - 'for_each_sg'
+ - 'for_each_sg_dma_page'
+ - 'for_each_sg_page'
+ - 'for_each_sgtable_dma_page'
+ - 'for_each_sgtable_dma_sg'
+ - 'for_each_sgtable_page'
+ - 'for_each_sgtable_sg'
+ - 'for_each_sibling_event'
+ - 'for_each_sta_active_link'
+ - 'for_each_subelement'
+ - 'for_each_subelement_extid'
+ - 'for_each_subelement_id'
+ - 'for_each_sublist'
+ - 'for_each_subsystem'
+ - 'for_each_suite'
+ - 'for_each_supported_activate_fn'
+ - 'for_each_supported_inject_fn'
+ - 'for_each_sym'
+ - 'for_each_thread'
+ - 'for_each_token'
+ - 'for_each_unicast_dest_pgid'
+ - 'for_each_valid_link'
+ - 'for_each_vif_active_link'
+ - 'for_each_vma'
+ - 'for_each_vma_range'
+ - 'for_each_vsi'
+ - 'for_each_wakeup_source'
+ - 'for_each_zone'
+ - 'for_each_zone_zonelist'
+ - 'for_each_zone_zonelist_nodemask'
+ - 'func_for_each_insn'
+ - 'fwnode_for_each_available_child_node'
+ - 'fwnode_for_each_child_node'
+ - 'fwnode_for_each_parent_node'
+ - 'fwnode_graph_for_each_endpoint'
+ - 'gadget_for_each_ep'
+ - 'genradix_for_each'
+ - 'genradix_for_each_from'
+ - 'genradix_for_each_reverse'
+ - 'guard'
+ - 'hash_for_each'
+ - 'hash_for_each_possible'
+ - 'hash_for_each_possible_rcu'
+ - 'hash_for_each_possible_rcu_notrace'
+ - 'hash_for_each_possible_safe'
+ - 'hash_for_each_rcu'
+ - 'hash_for_each_safe'
+ - 'hashmap__for_each_entry'
+ - 'hashmap__for_each_entry_safe'
+ - 'hashmap__for_each_key_entry'
+ - 'hashmap__for_each_key_entry_safe'
+ - 'hctx_for_each_ctx'
+ - 'hists__for_each_format'
+ - 'hists__for_each_sort_list'
+ - 'hlist_bl_for_each_entry'
+ - 'hlist_bl_for_each_entry_rcu'
+ - 'hlist_bl_for_each_entry_safe'
+ - 'hlist_for_each'
+ - 'hlist_for_each_entry'
+ - 'hlist_for_each_entry_continue'
+ - 'hlist_for_each_entry_continue_rcu'
+ - 'hlist_for_each_entry_continue_rcu_bh'
+ - 'hlist_for_each_entry_from'
+ - 'hlist_for_each_entry_from_rcu'
+ - 'hlist_for_each_entry_rcu'
+ - 'hlist_for_each_entry_rcu_bh'
+ - 'hlist_for_each_entry_rcu_notrace'
+ - 'hlist_for_each_entry_safe'
+ - 'hlist_for_each_entry_srcu'
+ - 'hlist_for_each_safe'
+ - 'hlist_nulls_for_each_entry'
+ - 'hlist_nulls_for_each_entry_from'
+ - 'hlist_nulls_for_each_entry_rcu'
+ - 'hlist_nulls_for_each_entry_safe'
+ - 'i3c_bus_for_each_i2cdev'
+ - 'i3c_bus_for_each_i3cdev'
+ - 'idr_for_each_entry'
+ - 'idr_for_each_entry_continue'
+ - 'idr_for_each_entry_continue_ul'
+ - 'idr_for_each_entry_ul'
+ - 'iio_for_each_active_channel'
+ - 'in_dev_for_each_ifa_rcu'
+ - 'in_dev_for_each_ifa_rtnl'
+ - 'in_dev_for_each_ifa_rtnl_net'
+ - 'inet_bind_bucket_for_each'
+ - 'interval_tree_for_each_span'
+ - 'intlist__for_each_entry'
+ - 'intlist__for_each_entry_safe'
+ - 'kcore_copy__for_each_phdr'
+ - 'key_for_each'
+ - 'key_for_each_safe'
+ - 'klp_for_each_func'
+ - 'klp_for_each_func_safe'
+ - 'klp_for_each_func_static'
+ - 'klp_for_each_object'
+ - 'klp_for_each_object_safe'
+ - 'klp_for_each_object_static'
+ - 'kunit_suite_for_each_test_case'
+ - 'kvm_for_each_memslot'
+ - 'kvm_for_each_memslot_in_gfn_range'
+ - 'kvm_for_each_vcpu'
+ - 'libbpf_nla_for_each_attr'
+ - 'list_for_each'
+ - 'list_for_each_codec'
+ - 'list_for_each_codec_safe'
+ - 'list_for_each_continue'
+ - 'list_for_each_entry'
+ - 'list_for_each_entry_continue'
+ - 'list_for_each_entry_continue_rcu'
+ - 'list_for_each_entry_continue_reverse'
+ - 'list_for_each_entry_from'
+ - 'list_for_each_entry_from_rcu'
+ - 'list_for_each_entry_from_reverse'
+ - 'list_for_each_entry_lockless'
+ - 'list_for_each_entry_rcu'
+ - 'list_for_each_entry_reverse'
+ - 'list_for_each_entry_safe'
+ - 'list_for_each_entry_safe_continue'
+ - 'list_for_each_entry_safe_from'
+ - 'list_for_each_entry_safe_reverse'
+ - 'list_for_each_entry_srcu'
+ - 'list_for_each_from'
+ - 'list_for_each_prev'
+ - 'list_for_each_prev_safe'
+ - 'list_for_each_rcu'
+ - 'list_for_each_safe'
+ - 'llist_for_each'
+ - 'llist_for_each_entry'
+ - 'llist_for_each_entry_safe'
+ - 'llist_for_each_safe'
+ - 'lwq_for_each_safe'
+ - 'map__for_each_symbol'
+ - 'map__for_each_symbol_by_name'
+ - 'mas_for_each'
+ - 'mas_for_each_rev'
+ - 'mci_for_each_dimm'
+ - 'media_device_for_each_entity'
+ - 'media_device_for_each_intf'
+ - 'media_device_for_each_link'
+ - 'media_device_for_each_pad'
+ - 'media_entity_for_each_pad'
+ - 'media_pipeline_for_each_entity'
+ - 'media_pipeline_for_each_pad'
+ - 'mlx5_lag_for_each_peer_mdev'
+ - 'mptcp_for_each_subflow'
+ - 'msi_domain_for_each_desc'
+ - 'msi_for_each_desc'
+ - 'mt_for_each'
+ - 'nanddev_io_for_each_block'
+ - 'nanddev_io_for_each_page'
+ - 'neigh_for_each_in_bucket'
+ - 'neigh_for_each_in_bucket_rcu'
+ - 'neigh_for_each_in_bucket_safe'
+ - 'netdev_for_each_lower_dev'
+ - 'netdev_for_each_lower_private'
+ - 'netdev_for_each_lower_private_rcu'
+ - 'netdev_for_each_mc_addr'
+ - 'netdev_for_each_synced_mc_addr'
+ - 'netdev_for_each_synced_uc_addr'
+ - 'netdev_for_each_uc_addr'
+ - 'netdev_for_each_upper_dev_rcu'
+ - 'netdev_hw_addr_list_for_each'
+ - 'nft_rule_for_each_expr'
+ - 'nla_for_each_attr'
+ - 'nla_for_each_attr_type'
+ - 'nla_for_each_nested'
+ - 'nla_for_each_nested_type'
+ - 'nlmsg_for_each_attr'
+ - 'nlmsg_for_each_msg'
+ - 'nr_neigh_for_each'
+ - 'nr_neigh_for_each_safe'
+ - 'nr_node_for_each'
+ - 'nr_node_for_each_safe'
+ - 'of_for_each_phandle'
+ - 'of_property_for_each_string'
+ - 'of_property_for_each_u32'
+ - 'pci_bus_for_each_resource'
+ - 'pci_dev_for_each_resource'
+ - 'pcl_for_each_chunk'
+ - 'pcl_for_each_segment'
+ - 'pcm_for_each_format'
+ - 'perf_config_items__for_each_entry'
+ - 'perf_config_sections__for_each_entry'
+ - 'perf_config_set__for_each_entry'
+ - 'perf_cpu_map__for_each_cpu'
+ - 'perf_cpu_map__for_each_cpu_skip_any'
+ - 'perf_cpu_map__for_each_idx'
+ - 'perf_evlist__for_each_entry'
+ - 'perf_evlist__for_each_entry_reverse'
+ - 'perf_evlist__for_each_entry_safe'
+ - 'perf_evlist__for_each_evsel'
+ - 'perf_evlist__for_each_mmap'
+ - 'perf_evsel_for_each_per_thread_period_safe'
+ - 'perf_hpp_list__for_each_format'
+ - 'perf_hpp_list__for_each_format_safe'
+ - 'perf_hpp_list__for_each_sort_list'
+ - 'perf_hpp_list__for_each_sort_list_safe'
+ - 'plist_for_each'
+ - 'plist_for_each_continue'
+ - 'plist_for_each_entry'
+ - 'plist_for_each_entry_continue'
+ - 'plist_for_each_entry_safe'
+ - 'plist_for_each_safe'
+ - 'pnp_for_each_card'
+ - 'pnp_for_each_dev'
+ - 'protocol_for_each_card'
+ - 'protocol_for_each_dev'
+ - 'queue_for_each_hw_ctx'
+ - 'radix_tree_for_each_slot'
+ - 'radix_tree_for_each_tagged'
+ - 'rb_for_each'
+ - 'rbtree_postorder_for_each_entry_safe'
+ - 'rdma_for_each_block'
+ - 'rdma_for_each_port'
+ - 'rdma_umem_for_each_dma_block'
+ - 'resource_list_for_each_entry'
+ - 'resource_list_for_each_entry_safe'
+ - 'rhl_for_each_entry_rcu'
+ - 'rhl_for_each_rcu'
+ - 'rht_for_each'
+ - 'rht_for_each_entry'
+ - 'rht_for_each_entry_from'
+ - 'rht_for_each_entry_rcu'
+ - 'rht_for_each_entry_rcu_from'
+ - 'rht_for_each_entry_safe'
+ - 'rht_for_each_from'
+ - 'rht_for_each_rcu'
+ - 'rht_for_each_rcu_from'
+ - 'rq_for_each_bvec'
+ - 'rq_for_each_segment'
+ - 'rq_list_for_each'
+ - 'rq_list_for_each_safe'
+ - 'sample_read_group__for_each'
+ - 'scoped_guard'
+ - 'scsi_for_each_prot_sg'
+ - 'scsi_for_each_sg'
+ - 'sctp_for_each_hentry'
+ - 'sctp_skb_for_each'
+ - 'sec_for_each_insn'
+ - 'sec_for_each_insn_continue'
+ - 'sec_for_each_insn_from'
+ - 'sec_for_each_sym'
+ - 'shdma_for_each_chan'
+ - 'shost_for_each_device'
+ - 'sk_for_each'
+ - 'sk_for_each_bound'
+ - 'sk_for_each_bound_safe'
+ - 'sk_for_each_entry_offset_rcu'
+ - 'sk_for_each_from'
+ - 'sk_for_each_rcu'
+ - 'sk_for_each_safe'
+ - 'sk_nulls_for_each'
+ - 'sk_nulls_for_each_from'
+ - 'sk_nulls_for_each_rcu'
+ - 'snd_array_for_each'
+ - 'snd_pcm_group_for_each_entry'
+ - 'snd_soc_dapm_widget_for_each_path'
+ - 'snd_soc_dapm_widget_for_each_path_safe'
+ - 'snd_soc_dapm_widget_for_each_sink_path'
+ - 'snd_soc_dapm_widget_for_each_source_path'
+ - 'sparsebit_for_each_set_range'
+ - 'strlist__for_each_entry'
+ - 'strlist__for_each_entry_safe'
+ - 'sym_for_each_insn'
+ - 'sym_for_each_insn_continue_reverse'
+ - 'symbols__for_each_entry'
+ - 'tb_property_for_each'
+ - 'tcf_act_for_each_action'
+ - 'tcf_exts_for_each_action'
+ - 'test_suite__for_each_test_case'
+ - 'tool_pmu__for_each_event'
+ - 'ttm_bo_lru_for_each_reserved_guarded'
+ - 'ttm_resource_manager_for_each_res'
+ - 'udp_lrpa_for_each_entry_rcu'
+ - 'udp_portaddr_for_each_entry'
+ - 'udp_portaddr_for_each_entry_rcu'
+ - 'usb_hub_for_each_child'
+ - 'v4l2_device_for_each_subdev'
+ - 'v4l2_m2m_for_each_dst_buf'
+ - 'v4l2_m2m_for_each_dst_buf_safe'
+ - 'v4l2_m2m_for_each_src_buf'
+ - 'v4l2_m2m_for_each_src_buf_safe'
+ - 'virtio_device_for_each_vq'
+ - 'vkms_config_for_each_connector'
+ - 'vkms_config_for_each_crtc'
+ - 'vkms_config_for_each_encoder'
+ - 'vkms_config_for_each_plane'
+ - 'vkms_config_connector_for_each_possible_encoder'
+ - 'vkms_config_encoder_for_each_possible_crtc'
+ - 'vkms_config_plane_for_each_possible_crtc'
+ - 'while_for_each_ftrace_op'
+ - 'workloads__for_each'
+ - 'xa_for_each'
+ - 'xa_for_each_marked'
+ - 'xa_for_each_range'
+ - 'xa_for_each_start'
+ - 'xas_for_each'
+ - 'xas_for_each_conflict'
+ - 'xas_for_each_marked'
+ - 'xbc_array_for_each_value'
+ - 'xbc_for_each_key_value'
+ - 'xbc_node_for_each_array_value'
+ - 'xbc_node_for_each_child'
+ - 'xbc_node_for_each_key_value'
+ - 'xbc_node_for_each_subkey'
+ - 'ynl_attr_for_each'
+ - 'ynl_attr_for_each_nested'
+ - 'ynl_attr_for_each_payload'
+ - 'zorro_for_each_dev'
+ - 'zpci_bus_for_each'
+
+IncludeBlocks: Preserve
+IncludeCategories:
+ - Regex: '.*'
+ Priority: 1
+IncludeIsMainRegex: '(Test)?$'
+IndentCaseLabels: false
+IndentGotoLabels: false
+IndentPPDirectives: None
+IndentWidth: 8
+IndentWrappedFunctionNames: false
+JavaScriptQuotes: Leave
+JavaScriptWrapImports: true
+KeepEmptyLinesAtTheStartOfBlocks: false
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBinPackProtocolList: Auto
+ObjCBlockIndentWidth: 8
+ObjCSpaceAfterProperty: true
+ObjCSpaceBeforeProtocolList: true
+
+# Taken from git's rules
+PenaltyBreakAssignment: 10
+PenaltyBreakBeforeFirstCallParameter: 30
+PenaltyBreakComment: 10
+PenaltyBreakFirstLessLess: 0
+PenaltyBreakString: 10
+PenaltyExcessCharacter: 100
+PenaltyReturnTypeOnItsOwnLine: 60
+
+PointerAlignment: Right
+ReflowComments: false
+SortIncludes: false
+SortUsingDeclarations: false
+SpaceAfterCStyleCast: false
+SpaceAfterTemplateKeyword: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCtorInitializerColon: true
+SpaceBeforeInheritanceColon: true
+SpaceBeforeParens: ControlStatementsExceptForEachMacros
+SpaceBeforeRangeBasedForLoopColon: true
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles: false
+SpacesInContainerLiterals: false
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: Cpp03
+TabWidth: 8
+UseTab: Always
+...
diff --git a/.clippy.toml b/.clippy.toml
new file mode 100644
index 000000000..b0a78cc8b
--- /dev/null
+++ b/.clippy.toml
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: GPL-2.0
+
+msrv = "1.85.0"
+
+check-private-items = true
+
+disallowed-macros = [
+ # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate
+ # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303.
+ { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true },
+]
+
+[[disallowed-methods]]
+path = "core::ffi::CStr::as_ptr"
+replacement = "kernel::prelude::CStrExt::as_char_ptr"
+reason = "kernel's `char` is always unsigned, use `as_char_ptr` instead"
+
+[[disallowed-methods]]
+path = "core::ffi::CStr::from_ptr"
+replacement = "kernel::prelude::CStrExt::from_char_ptr"
+reason = "kernel's `char` is always unsigned, use `from_char_ptr` instead"
diff --git a/.cocciconfig b/.cocciconfig
new file mode 100644
index 000000000..43967c6b2
--- /dev/null
+++ b/.cocciconfig
@@ -0,0 +1,3 @@
+[spatch]
+ options = --timeout 200
+ options = --use-gitgrep
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..69718ac91
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+[{*.{awk,c,dts,dtsi,dtso,h,mk,rst,s,S},Kconfig,Makefile,Makefile.*}]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+indent_size = 8
+
+[*.{json,py,rs}]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+
+# this must be below the general *.py to overwrite it
+[tools/{perf,power,rcu,testing/kunit}/**.py,]
+indent_style = tab
+indent_size = 8
+
+[*.yaml]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 2
diff --git a/.get_maintainer.ignore b/.get_maintainer.ignore
new file mode 100644
index 000000000..5ad082b4d
--- /dev/null
+++ b/.get_maintainer.ignore
@@ -0,0 +1,9 @@
+Alan Cox <alan@lxorguk.ukuu.org.uk>
+Alan Cox <root@hraefn.swansea.linux.org.uk>
+Alyssa Rosenzweig <alyssa@rosenzweig.io>
+Askar Safin <safinaskar@gmail.com>
+Christoph Hellwig <hch@lst.de>
+Jeff Kirsher <jeffrey.t.kirsher@intel.com>
+Marc Gonzalez <marc.w.gonzalez@free.fr>
+Nathan Chancellor <nathan@kernel.org>
+Ralf Baechle <ralf@linux-mips.org>
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..2325c529e
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-only
+*.[ch] diff=cpp
+*.dts diff=dts
+*.dts[io] diff=dts
+*.rs diff=rust
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..9875120ea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,196 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# NOTE! Don't add files that are generated in specific
+# subdirectories here. Add them in the ".gitignore" file
+# in that subdirectory instead.
+#
+# NOTE! Please use 'git ls-files -i -c --exclude-per-directory=.gitignore'
+# command after changing this file, to see if there are
+# any tracked files which get ignored after the change.
+#
+# Normal rules (sorted alphabetically)
+#
+.*
+*.a
+*.asn1.[ch]
+*.bc
+*.bin
+*.bz2
+*.c.[012]*.*
+*.dt.yaml
+*.dtb
+*.dtbo
+*.dtb.S
+*.dtbo.S
+*.dwo
+*.dylib
+*.elf
+*.gcno
+*.gcda
+*.gz
+*.i
+*.ko
+*.lex.c
+*.ll
+*.lst
+*.lz4
+*.lzma
+*.lzo
+*.mod
+*.mod.c
+*.o
+*.o.*
+*.patch
+*.pyc
+*.rlib
+*.rmeta
+*.rpm
+*.rsi
+*.s
+*.so
[Output truncated: showing 1000 of 44387137 lines]]
|
| 82/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 20129
output: 34
thoughts: 24
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Diving into the Inter-Processor Interrupts (IPI) Implementation**
Okay, time to dig into the `arch/x86/kernel/apic/ipi.c` file. I need to refresh my understanding of the IPI mechanisms on x86, particularly the intricacies of how they're implemented at the kernel level. This file is the heart of how different CPUs communicate with each other through interrupts, and it's essential for understanding kernel synchronization primitives, interrupt handling, and generally how we achieve parallel execution on the architecture. I'm especially curious about how this specific implementation handles various APIC configurations - the LAPIC and IOAPIC interplay, how they handle different modes like edge-triggered and level-triggered interrupts, and the nuances of the interrupt delivery modes supported. The goal is to see how the implementation handles the specifics of the hardware, particularly the interrupt controller's register access, interrupt vector assignments, and potential race conditions within the multi-threaded kernel. I need to see how the code handles different CPUs, how it manages interrupt routing, and any optimizations that might be in place for common IPI scenarios. Understanding the data structures used here is crucial, too, like any lock primitives employed for synchronization between the different CPUs when sending interrupts. It's a critical area, especially for investigating potential performance bottlenecks or subtle correctness issues, so I'm keen to see if I find anything that stands out.
|
| 83/4 |
2026/09/17 02:27 |
tool |
git-log |
0m
Args: map[Count:5 PathPrefix:arch/x86/kernel/apic/ipi.c]
Results: map[Output:08dbfad3f504 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
]
|
| 84/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 20553
output: 24
thoughts: 75
Thoughts: **Debugging Git History: The Shallow Clone Suspect**
Okay, so `git log` is only showing me a single commit, and that's usually a red flag. My initial thought is it's a shallow clone, or maybe there's just one commit in this particular repository. But that seems unlikely, and I'd like to investigate further. Let's dig in a bit.
First, I need to confirm whether `git log` is actually giving me an accurate representation of the repository's history, or if there's some kind of limitation in place. I'll take a step back and check the actual commit count to see if the problem exists independent of the output format. To that end, I want to use `git log` to ascertain the total number of commits.
I'm getting ahead of myself, let's step back again! I'll re-check the output of `git log`. Just in case there is some filtering occurring, I'll issue a vanilla `git log` command. Then, to make sure I get a meaningful set of commits I'll try `git log --count=10` to get the first 10 commits. If both of those commands produce the same single commit, that'll point me definitively in the shallow clone direction. That's the first thing to check.
|
| 85/4 |
2026/09/17 02:27 |
tool |
git-log |
0m
Args: map[Count:10 PathPrefix:kernel/sched]
Results: map[Output:08dbfad3f504 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi
]
|
| 86/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 20989
output: 41
thoughts: 443
Thoughts: **Analyzing a Kernel Bug Report**
Okay, so this git repo appears to be a shallow clone, specifically at commit `08dbfad3f504`. Before I dig into `git log` with regex, let's just go straight to the code. That's usually faster.
Right, let me re-read the bug report carefully, since I need to make sure I'm following it properly. It says: the `native_smp_send_reschedule` function is triggering a `WARN` because `cpu_is_offline(cpu)` is true. The call stack points to a scenario involving CFS load balancing – from `sched_balance_newidle` down to `smp_send_reschedule`.
I need to understand this: Is this known to be a race condition between CPU hotplug (specifically offlining) and the scheduler's load balancing? Could this warning actually *lead* to something nasty, like memory corruption or a use-after-free, something that could be exploited? And, assuming the user *can't* offline CPUs (which requires root and `CAP_SYS_ADMIN`), is there any way an unprivileged user can trigger this?
Alright, let's break down the questions: (1) race condition between hotplug/scheduler? (2) exploit potential? (3) unprivileged trigger?
Okay, let's trace through the kernel source code. I'll start with `arch/x86/kernel/apic/ipi.c`. Let's look at `native_smp_send_reschedule`, specifically around lines 50-90. Time to get down into the details.
|
| 87/4 |
2026/09/17 02:27 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/apic/ipi.c FirstLine:50 LineCount:40]
Results: map[Contents: 50: }
51:
52: void apic_send_IPI_allbutself(unsigned int vector)
53: {
54: if (num_online_cpus() < 2)
55: return;
56:
57: if (static_branch_likely(&apic_use_ipi_shorthand))
58: __apic_send_IPI_allbutself(vector);
59: else
60: __apic_send_IPI_mask_allbutself(cpu_online_mask, vector);
61: }
62:
63: /*
64: * Send a 'reschedule' IPI to another CPU. It goes straight through and
65: * wastes no time serializing anything. Worst case is that we lose a
66: * reschedule ...
67: */
68: void native_smp_send_reschedule(int cpu)
69: {
70: if (unlikely(cpu_is_offline(cpu))) {
71: WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu);
72: return;
73: }
74: __apic_send_IPI(cpu, RESCHEDULE_VECTOR);
75: }
76:
77: void native_send_call_func_single_ipi(int cpu)
78: {
79: __apic_send_IPI(cpu, CALL_FUNCTION_SINGLE_VECTOR);
80: }
81:
82: void native_send_call_func_ipi(const struct cpumask *mask)
83: {
84: if (static_branch_likely(&apic_use_ipi_shorthand)) {
85: unsigned int cpu = smp_processor_id();
86:
87: if (!cpumask_or_equal(mask, cpumask_of(cpu), cpu_online_mask))
88: goto sendmask;
89:
]
|
| 88/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 22400
output: 20
thoughts: 260
Thoughts: **Analyzing a Potential Scheduling Bug**
Okay, so I'm looking at this code and something's immediately jumping out at me. Lines 70-73 are concerning. It looks like if the CPU is offline, it emits a warning and *immediately* returns. No IPI sent. That's... not ideal. It seems to short-circuit the entire process. I'm wondering what's happening in the calling chain, so let's check that call stack they've provided.
Right, so we're going from `sched_balance_newidle` or `sched_balance_rq` down to `smp_send_reschedule`. Hmm, I'm already starting to put things together. Wait a second, the function names... `sched_balance_newidle` and `sched_balance_rq`? Aren't those the *renamed* versions of `newidle_balance` and `load_balance`? I'm pretty sure I remember a commit that went through and changed those names... or was it CFS load balancing?
Yeah, I'm almost certain that I'm on the right track, this name change feels very familiar. I need to be sure, though. Let's see if I can verify my suspicion quickly, I'm going to run a quick grep for both `sched_balance_newidle` and `sched_balance_rq` across the relevant codebase. That should help confirm that this is indeed the renamed code and that I'm thinking about this correctly. This might be a real issue.
|
| 89/4 |
2026/09/17 02:27 |
tool |
grepper |
0m
Args: map[Expression:sched_balance_newidle]
Results: map[Output:kernel/sched/fair.c=5940=static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq)
--
kernel/sched/fair.c-5944-
kernel/sched/fair.c:5945:static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)
kernel/sched/fair.c-5946- __must_hold(__rq_lockp(this_rq));
--
kernel/sched/fair.c=8204=static inline unsigned int cfs_h_nr_delayed(struct rq *rq)
--
kernel/sched/fair.c-8208-
kernel/sched/fair.c:8209:/* Working cpumask for: sched_balance_rq(), sched_balance_newidle(). */
kernel/sched/fair.c-8210-static DEFINE_PER_CPU(cpumask_var_t, load_balance_mask);
--
kernel/sched/fair.c=10046=struct task_struct *pick_task_fair(struct rq *rq, struct rq_flags *rf)
--
kernel/sched/fair.c-10072-
kernel/sched/fair.c:10073: new_tasks = sched_balance_newidle(rq, rf);
kernel/sched/fair.c-10074- if (new_tasks < 0)
--
kernel/sched/fair.c=13427=static int sched_balance_rq(int this_cpu, struct rq *this_rq,
--
kernel/sched/fair.c-13698- /*
kernel/sched/fair.c:13699: * sched_balance_newidle() disregards balance intervals, so we could
kernel/sched/fair.c-13700- * repeatedly reach this code, which would lead to balance_interval
--
kernel/sched/fair.c=14527=static inline void nohz_newidle_balance(struct rq *this_rq) { }
--
kernel/sched/fair.c-14530-/*
kernel/sched/fair.c:14531: * sched_balance_newidle is called by schedule() if this_cpu is about to become
kernel/sched/fair.c-14532- * idle. Attempts to pull tasks from other CPUs.
--
kernel/sched/fair.c-14538- */
kernel/sched/fair.c:14539:static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)
kernel/sched/fair.c-14540- __must_hold(__rq_lockp(this_rq))
--
kernel/sched/pelt.c=181=___update_load_sum(u64 now, struct sched_avg *sa,
--
kernel/sched/pelt.c-211- * but also for a cfs_rq if the latter becomes idle. As an example,
kernel/sched/pelt.c:212: * this happens during sched_balance_newidle() which calls
kernel/sched/pelt.c-213- * sched_balance_update_blocked_averages().
]
|
| 90/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 23822
output: 32
thoughts: 90
Thoughts: Okay, here's my thought process on this:
**Digging into a Potential Scheduler Imbalance Issue**
Alright, I'm going to start by looking at a potential scheduler imbalance issue, specifically focusing on interactions related to `sched_balance_newidle` and `sched_balance_rq`. These are key functions involved in distributing tasks when new CPUs come online and during regular runqueue balancing. I'll need to see if there have been any recent commits or reported issues directly mentioning an "Unexpected reschedule of offline CPU", or perhaps even functions like `stop_one_cpu_nowait` and `active_load_balance_cpu_stop`, because those could be related to a CPU being wrongly triggered for work.
My next move is to zero in on the `kernel/sched/fair.c` file since that’s where the core scheduler logic resides. I'll grep for instances of `stop_one_cpu_nowait` within that file. This should help me understand how the kernel is *supposed* to handle stopping a CPU, and hopefully reveal if there might be a flaw that could trigger those unexpected reschedules. Finding relevant code and comments will be key to understanding the underlying problem and potential solutions.
|
| 91/4 |
2026/09/17 02:27 |
tool |
grepper |
0m
Args: map[Expression:stop_one_cpu_nowait PathPrefix:kernel/sched/]
Results: map[Output:kernel/sched/core.c=2621=static int migration_cpu_stop(void *data)
--
kernel/sched/core.c-2717- raw_spin_unlock_irqrestore(&p->pi_lock, rf.flags);
kernel/sched/core.c:2718: stop_one_cpu_nowait(task_cpu(p), migration_cpu_stop,
kernel/sched/core.c-2719- &pending->arg, &pending->stop_work);
--
kernel/sched/core.c=2969=static int affine_move_task(struct rq *rq, struct task_struct *p, struct rq_flags *rf,
--
kernel/sched/core.c-3005- if (push_task) {
kernel/sched/core.c:3006: stop_one_cpu_nowait(rq->cpu, push_cpu_stop,
kernel/sched/core.c-3007- p, &rq->push_work);
--
kernel/sched/core.c-3077- if (!stop_pending) {
kernel/sched/core.c:3078: stop_one_cpu_nowait(cpu_of(rq), migration_cpu_stop,
kernel/sched/core.c-3079- &pending->arg, &pending->stop_work);
--
kernel/sched/core.c=8475=static void balance_push(struct rq *rq)
--
kernel/sched/core.c-8527- raw_spin_rq_unlock(rq);
kernel/sched/core.c:8528: stop_one_cpu_nowait(rq->cpu, __balance_push_cpu_stop, push_task,
kernel/sched/core.c-8529- this_cpu_ptr(&push_work));
--
kernel/sched/deadline.c=3218=static void pull_dl_task(struct rq *this_rq)
--
kernel/sched/deadline.c-3296- raw_spin_rq_unlock(this_rq);
kernel/sched/deadline.c:3297: stop_one_cpu_nowait(src_rq->cpu, push_cpu_stop,
kernel/sched/deadline.c-3298- push_task, &src_rq->push_work);
--
kernel/sched/fair.c=13427=static int sched_balance_rq(int this_cpu, struct rq *this_rq,
--
kernel/sched/fair.c-13660- if (active_balance) {
kernel/sched/fair.c:13661: stop_one_cpu_nowait(cpu_of(busiest),
kernel/sched/fair.c-13662- active_load_balance_cpu_stop, busiest,
--
kernel/sched/rt.c=1960=static int push_rt_task(struct rq *rq, bool pull)
--
kernel/sched/rt.c-2016- raw_spin_rq_unlock(rq);
kernel/sched/rt.c:2017: stop_one_cpu_nowait(rq->cpu, push_cpu_stop,
kernel/sched/rt.c-2018- push_task, &rq->push_work);
--
kernel/sched/rt.c=2261=static void pull_rt_task(struct rq *this_rq)
--
kernel/sched/rt.c-2358- raw_spin_rq_unlock(this_rq);
kernel/sched/rt.c:2359: stop_one_cpu_nowait(src_rq->cpu, push_cpu_stop,
kernel/sched/rt.c-2360- push_task, &src_rq->push_work);
]
|
| 92/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 25168
output: 37
thoughts: 108
Thoughts: **Analyzing the Scheduler's Active Load Balancing**
Alright, let's dive into the guts of the scheduler. I'm looking at `kernel/sched/fair.c` around line 13661. Specifically, I'm zeroing in on this snippet involving `active_balance`:
```c
if (active_balance) {
stop_one_cpu_nowait(cpu_of(busiest),
active_load_balance_cpu_stop, busiest,
&busiest->active_balance_work);
```
This is where the scheduler likely handles the initiation of load balancing when `active_balance` is true. The call to `stop_one_cpu_nowait` is what really interests me. I bet this is where the action starts in terms of migrating tasks from the `busiest` CPU. I want to understand the mechanics of this CPU stop and the associated work. I need to back up a few lines and see the context. I'll read around line 13650 through 13680 to get a good picture of how and why the `active_balance` mechanism is triggered. I'm going to look to see if this is being called after a context switch or timer interrupt, and how it's determining that a load imbalance exists. Gotta understand the conditions that lead to this specific code path. It's likely a critical piece in understanding the system's overall responsiveness and resource utilization.
|
| 93/4 |
2026/09/17 02:27 |
tool |
read-file |
0m
Args: map[File:kernel/sched/fair.c FirstLine:13650 LineCount:40]
Results: map[Contents:13650: * need to forcefully punt it away with active balance.
13651: */
13652: if (!busiest->curr->on_rq)
13653: goto out_unbalanced;
13654:
13655: busiest->active_balance = 1;
13656: busiest->push_cpu = this_cpu;
13657: active_balance = 1;
13658: preempt_disable();
13659: }
13660: if (active_balance) {
13661: stop_one_cpu_nowait(cpu_of(busiest),
13662: active_load_balance_cpu_stop, busiest,
13663: &busiest->active_balance_work);
13664: }
13665: preempt_enable();
13666:
13667: out_unbalanced:
13668: /* We were unbalanced, so reset the balancing interval */
13669: sd->balance_interval = sd->min_interval;
13670: goto out;
13671:
13672: out_balanced:
13673: /*
13674: * We reach balance although we may have faced some affinity
13675: * constraints. Clear the imbalance flag only if other tasks got
13676: * a chance to move and fix the imbalance.
13677: */
13678: if (sd_parent && !(env.flags & LBF_ALL_PINNED)) {
13679: int *group_imbalance = &sd_parent->groups->sgc->imbalance;
13680:
13681: if (*group_imbalance)
13682: *group_imbalance = 0;
13683: }
13684:
13685: out_all_pinned:
13686: /*
13687: * We reach balance because all tasks are pinned at this level so
13688: * we can't migrate them. Let the imbalance flag set so parent level
13689: * can try to migrate them.
]
|
| 94/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 26259
output: 35
thoughts: 83
Thoughts: Here's my summary, as if I were thinking it:
**Diving into the Scheduler's Balancing Act**
Okay, so I'm digging into `sched_balance_rq` here. My immediate focus is on that call to `stop_one_cpu_nowait`. It's pretty clear what it's trying to do: stop a CPU, and specifically, the busiest one, indicated by `busiest`, immediately. It's using `active_load_balance_cpu_stop` as the stop function, and passing along some `active_balance_work` as context. The key here is the `nowait` part – it's an asynchronous stop. My next step? I need to understand what's happening *inside* that `stop_one_cpu_nowait` function, which resides in `kernel/stop_machine.c`. I have a feeling this is where the meat of the load balancing magic is taking place, so let's check it out.
|
| 95/4 |
2026/09/17 02:27 |
tool |
grepper |
0m
Args: map[Expression:stop_one_cpu_nowait PathPrefix:kernel/stop_machine.c]
Results: map[Output:kernel/stop_machine.c=336=int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
--
kernel/stop_machine.c-368-/**
kernel/stop_machine.c:369: * stop_one_cpu_nowait - stop a cpu but don't wait for completion
kernel/stop_machine.c-370- * @cpu: cpu to stop
--
kernel/stop_machine.c-382- */
kernel/stop_machine.c:383:void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
kernel/stop_machine.c-384- struct cpu_stop_work *work_buf)
]
|
| 96/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 26796
output: 35
thoughts: 24
Thoughts: Here's a summary of my thought process, as requested:
**Diving into `stop_machine.c`**
Alright, let's zero in on `kernel/stop_machine.c`. I need to understand what's happening around lines 370 to 420. This section is likely dealing with a critical aspect of system shutdown or resource management, given the file's name. I'm already anticipating some complexity here, likely involving synchronization primitives, state transitions, and perhaps error handling related to halting or restarting various subsystems. I'll be looking for clues about the process of gracefully stopping the kernel threads, halting CPUs, and ensuring a clean shutdown with minimal data corruption. I'm keen to see if they're using specific locking mechanisms, or implementing a custom control flow. I'll be paying close attention to any atomic operations and interrupt disabling, too, for clues on how they're handling concurrency during this crucial phase. Time to get my hands dirty. Let's see what the code has to say.
|
| 97/4 |
2026/09/17 02:27 |
tool |
read-file |
0m
Args: map[File:kernel/stop_machine.c FirstLine:370 LineCount:50]
Results: map[Contents: 370: * @cpu: cpu to stop
371: * @fn: function to execute
372: * @arg: argument to @fn
373: * @work_buf: pointer to cpu_stop_work structure
374: *
375: * Similar to stop_one_cpu() but doesn't wait for completion. The
376: * caller is responsible for ensuring @work_buf is currently unused
377: * and will remain untouched until stopper starts executing @fn.
378: *
379: * CONTEXT:
380: * Don't care, but the caller must ensure @cpu's stopper stays enabled
381: * until the work is queued, e.g. by preempt_disable().
382: */
383: void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
384: struct cpu_stop_work *work_buf)
385: {
386: *work_buf = (struct cpu_stop_work){ .fn = fn, .arg = arg, .caller = _RET_IP_, };
387: WARN_ON_ONCE(!cpu_stop_queue_work(cpu, work_buf));
388: }
389:
390: static bool queue_stop_cpus_work(const struct cpumask *cpumask,
391: cpu_stop_fn_t fn, void *arg,
392: struct cpu_stop_done *done)
393: {
394: struct cpu_stop_work *work;
395: unsigned int cpu;
396: bool queued = false;
397:
398: /*
399: * Disable preemption while queueing to avoid getting
400: * preempted by a stopper which might wait for other stoppers
401: * to enter @fn which can lead to deadlock.
402: */
403: preempt_disable();
404: stop_cpus_in_progress = true;
405: barrier();
406: for_each_cpu(cpu, cpumask) {
407: work = &per_cpu(cpu_stopper.stop_work, cpu);
408: work->fn = fn;
409: work->arg = arg;
410: work->done = done;
411: work->caller = _RET_IP_;
412: if (cpu_stop_queue_work(cpu, work))
413: queued = true;
414: }
415: barrier();
416: stop_cpus_in_progress = false;
417: preempt_enable();
418:
419: return queued;
]
|
| 98/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 27863
output: 38
thoughts: 99
Thoughts: **Analyzing CPU Stop Mechanics**
Okay, let's break this down. I'm focusing on `stop_one_cpu_nowait` here. The documentation emphasizes that the *caller* must guarantee the target CPU's "stopper" remains enabled until the work is actually queued. Specifically, they use `preempt_disable()` as an example. Hmm, that's where I get a bit hung up. My first thought was, "Does `preempt_disable()` somehow protect another CPU's stopper?" But hang on... of course not! `preempt_disable()` *only* disables preemption on the *current* CPU. It doesn't magically extend that protection to other CPUs. I'm going to have to review the details in `cpu_stop_queue_work(cpu, work_buf)` to see how the other CPU is actually protected, or what mechanisms are involved.
|
| 99/4 |
2026/09/17 02:27 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:kernel/stop_machine.c Name:cpu_stop_queue_work]
Results: map[SourceCode: 91: /* queue @work to @stopper. if offline, @work is completed immediately */
92: static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
93: {
94: struct cpu_stopper *stopper = &per_cpu(cpu_stopper, cpu);
95: unsigned long flags;
96: bool enabled;
97:
98: preempt_disable();
99: raw_spin_lock_irqsave(&stopper->lock, flags);
100: enabled = stopper->enabled;
101: if (enabled)
102: __cpu_stop_queue_work(stopper, work);
103: else if (work->done)
104: cpu_stop_signal_done(work->done);
105: raw_spin_unlock_irqrestore(&stopper->lock, flags);
106:
107: if (enabled)
108: wake_up_process(stopper->thread);
109: preempt_enable();
110:
111: return enabled;
112: }
SourceFile:kernel/stop_machine.c]
|
| 100/4 |
2026/09/17 02:27 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 28534
output: 28
thoughts: 176
Thoughts: **Analyzing the `cpu_stop_queue_work` Function**
Okay, let's break this down. I see we're looking at `cpu_stop_queue_work`, and the first thing that jumps out is that `stopper->enabled` check. That's the gatekeeper. We're enqueuing work, and `__cpu_stop_queue_work` is only called if it's enabled. If it isn't enabled, and there's a completion function `work->done`, it's signaled. The surrounding lock and unlock are standard for concurrent access. Then we have a final wakeup call on the stopper thread. Preemption is enabled at the end.
The key question is, when does `stopper->enabled` transition to false? That's the critical point for understanding how a CPU gets offlined, or stops. We can see that the code is returning the value of `enabled`. I'll need to trace where this `stopper` struct comes from and then search the code for any assignments to `stopper->enabled = false`. It looks like we need to see where `stopper` is initialized to start. Let's do a search for all references to `stopper->enabled` and `cpu_stop_park`. That should give us the full picture.
|
| 101/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:enabled PathPrefix:kernel/stop_machine.c]
Results: map[Output:kernel/stop_machine.c=31=struct cpu_stop_done {
--
kernel/stop_machine.c-36-
kernel/stop_machine.c:37:/* the actual stopper, one per every possible cpu, enabled on online cpus */
kernel/stop_machine.c-38-struct cpu_stopper {
--
kernel/stop_machine.c-41- raw_spinlock_t lock;
kernel/stop_machine.c:42: bool enabled; /* is this stopper enabled? */
kernel/stop_machine.c-43- struct list_head works; /* list of pending works */
--
kernel/stop_machine.c=92=static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
--
kernel/stop_machine.c-95- unsigned long flags;
kernel/stop_machine.c:96: bool enabled;
kernel/stop_machine.c-97-
--
kernel/stop_machine.c-99- raw_spin_lock_irqsave(&stopper->lock, flags);
kernel/stop_machine.c:100: enabled = stopper->enabled;
kernel/stop_machine.c:101: if (enabled)
kernel/stop_machine.c-102- __cpu_stop_queue_work(stopper, work);
--
kernel/stop_machine.c-106-
kernel/stop_machine.c:107: if (enabled)
kernel/stop_machine.c-108- wake_up_process(stopper->thread);
--
kernel/stop_machine.c-110-
kernel/stop_machine.c:111: return enabled;
kernel/stop_machine.c-112-}
--
kernel/stop_machine.c=261=static int cpu_stop_queue_two_works(int cpu1, struct cpu_stop_work *work1,
--
kernel/stop_machine.c-279-
kernel/stop_machine.c:280: if (!stopper1->enabled || !stopper2->enabled) {
kernel/stop_machine.c-281- err = -ENOENT;
--
kernel/stop_machine.c=336=int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
--
kernel/stop_machine.c-379- * CONTEXT:
kernel/stop_machine.c:380: * Don't care, but the caller must ensure @cpu's stopper stays enabled
kernel/stop_machine.c-381- * until the work is queued, e.g. by preempt_disable().
--
kernel/stop_machine.c=525=void stop_machine_park(int cpu)
--
kernel/stop_machine.c-532- */
kernel/stop_machine.c:533: stopper->enabled = false;
kernel/stop_machine.c-534- kthread_park(stopper->thread);
--
kernel/stop_machine.c=549=void stop_machine_unpark(int cpu)
--
kernel/stop_machine.c-552-
kernel/stop_machine.c:553: stopper->enabled = true;
kernel/stop_machine.c-554- kthread_unpark(stopper->thread);
]
|
| 102/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 29858
output: 19
thoughts: 32
Thoughts: Okay, here's my interpretation of those thoughts, framed as if they're my own:
**Analyzing the `stop_machine_park(int cpu)` Function**
Alright, let's dive into this `stop_machine_park(int cpu)` function. My initial thought is to understand its scope and usage. Given the function name, I'm assuming it relates to a mechanism for parking or stopping a machine, and that the `cpu` parameter probably indicates a specific CPU core involved. Now, my next move is clear. I need to trace its call sites. Knowing *where* this function is invoked will give me vital context: what triggers the "stop" operation, under what conditions, and what other modules or systems are interacting with it. That information will paint a broader picture, making it easier to understand its function, and how best to improve it.
|
| 103/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:stop_machine_park]
Results: map[Output:include/linux/stop_machine.h=35=void stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
include/linux/stop_machine.h-36- struct cpu_stop_work *work_buf);
include/linux/stop_machine.h:37:void stop_machine_park(int cpu);
include/linux/stop_machine.h-38-void stop_machine_unpark(int cpu);
--
kernel/cpu.c=1275=static int take_cpu_down(void *_param)
--
kernel/cpu.c-1297- /* Park the stopper thread */
kernel/cpu.c:1298: stop_machine_park(cpu);
kernel/cpu.c-1299- return 0;
--
kernel/stop_machine.c=485=static void cpu_stopper_thread(unsigned int cpu)
--
kernel/stop_machine.c-524-
kernel/stop_machine.c:525:void stop_machine_park(int cpu)
kernel/stop_machine.c-526-{
]
|
| 104/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 30381
output: 34
thoughts: 34
Thoughts: Here's my summary, as though I'm thinking through this process:
**Diving into CPU Management**
Okay, so I need to understand this `take_cpu_down` function. I'm going to start by going straight to the source, kernel code is where I can get to the bottom of this. Specifically, I'm aiming for `kernel/cpu.c`, and I'm betting the relevant logic is somewhere in the vicinity of lines 1250 through 1320. That's a reasonable range to zero in on, based on my past experience with similar systems. Let's see what gems we can unearth in there.
|
| 105/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:kernel/cpu.c FirstLine:1250 LineCount:60]
Results: map[Contents:1250: * This function is called after the cpu is taken down and marked
1251: * offline, so its not like new tasks will ever get this cpu set in
1252: * their mm mask. -- Peter Zijlstra
1253: * Thus, we may use rcu_read_lock() here, instead of grabbing
1254: * full-fledged tasklist_lock.
1255: */
1256: WARN_ON(cpu_online(cpu));
1257: rcu_read_lock();
1258: for_each_process(p) {
1259: struct task_struct *t;
1260:
1261: /*
1262: * Main thread might exit, but other threads may still have
1263: * a valid mm. Find one.
1264: */
1265: t = find_lock_task_mm(p);
1266: if (!t)
1267: continue;
1268: arch_clear_mm_cpumask_cpu(cpu, t->mm);
1269: task_unlock(t);
1270: }
1271: rcu_read_unlock();
1272: }
1273:
1274: /* Take this CPU down. */
1275: static int take_cpu_down(void *_param)
1276: {
1277: struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
1278: enum cpuhp_state target = max((int)st->target, CPUHP_AP_OFFLINE);
1279: int err, cpu = smp_processor_id();
1280:
1281: /* Ensure this CPU doesn't handle any more interrupts. */
1282: err = __cpu_disable();
1283: if (err < 0)
1284: return err;
1285:
1286: /*
1287: * Must be called from CPUHP_TEARDOWN_CPU, which means, as we are going
1288: * down, that the current state is CPUHP_TEARDOWN_CPU - 1.
1289: */
1290: WARN_ON(st->state != (CPUHP_TEARDOWN_CPU - 1));
1291:
1292: /*
1293: * Invoke the former CPU_DYING callbacks. DYING must not fail!
1294: */
1295: cpuhp_invoke_callback_range_nofail(false, cpu, st, target);
1296:
1297: /* Park the stopper thread */
1298: stop_machine_park(cpu);
1299: return 0;
1300: }
1301:
1302: static int takedown_cpu(unsigned int cpu)
1303: {
1304: struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
1305: int err;
1306:
1307: /* Park the smpboot threads */
1308: kthread_park(st->thread);
1309:
]
|
| 106/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 31486
output: 34
thoughts: 40
Thoughts: Here's my take on those lines of code, focusing on the CPU hotplug and takedown process, as if I'm the one thinking it through:
**Deconstructing `takedown_cpu` and Hotplug in Kernel/CPU.c**
Alright, let's dive into this `takedown_cpu` function and the CPU hotplug mechanics. I want to understand exactly what's happening under the hood. I'm going to focus on lines 1300 through 1360 in `kernel/cpu.c`.
Okay, starting to read that section of the `kernel/cpu.c` file. I'm looking for the core logic of `takedown_cpu`. Essentially, this is the cleanup function when a CPU is being removed, right? It's likely handling the crucial steps before the core is fully de-activated. I expect it will de-schedule tasks, handle interrupts, and perform any necessary resource cleanup on the target CPU. I'm betting we'll see synchronization primitives being used extensively to avoid race conditions. I'm assuming it may work with per-CPU data structures to protect this process. Let me read a little bit and see what's actually there.
|
| 107/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:kernel/cpu.c FirstLine:1300 LineCount:60]
Results: map[Contents:1300: }
1301:
1302: static int takedown_cpu(unsigned int cpu)
1303: {
1304: struct cpuhp_cpu_state *st = per_cpu_ptr(&cpuhp_state, cpu);
1305: int err;
1306:
1307: /* Park the smpboot threads */
1308: kthread_park(st->thread);
1309:
1310: /*
1311: * Prevent irq alloc/free while the dying cpu reorganizes the
1312: * interrupt affinities.
1313: */
1314: irq_lock_sparse();
1315:
1316: err = stop_machine_cpuslocked(take_cpu_down, NULL, cpumask_of(cpu));
1317: if (err) {
1318: /* CPU refused to die */
1319: irq_unlock_sparse();
1320: /* Unpark the hotplug thread so we can rollback there */
1321: kthread_unpark(st->thread);
1322: return err;
1323: }
1324: BUG_ON(cpu_online(cpu));
1325:
1326: /*
1327: * The teardown callback for CPUHP_AP_SCHED_STARTING will have removed
1328: * all runnable tasks from the CPU, there's only the idle task left now
1329: * that the migration thread is done doing the stop_machine thing.
1330: *
1331: * Wait for the stop thread to go away.
1332: */
1333: wait_for_ap_thread(st, false);
1334: BUG_ON(st->state != CPUHP_AP_IDLE_DEAD);
1335:
1336: /* Interrupts are moved away from the dying cpu, reenable alloc/free */
1337: irq_unlock_sparse();
1338:
1339: hotplug_cpu__broadcast_tick_pull(cpu);
1340: /* This actually kills the CPU. */
1341: __cpu_die(cpu);
1342:
1343: cpuhp_bp_sync_dead(cpu);
1344:
1345: lockdep_cleanup_dead_cpu(cpu, idle_thread_get(cpu));
1346:
1347: /*
1348: * Callbacks must be re-integrated right away to the RCU state machine.
1349: * Otherwise an RCU callback could block a further teardown function
1350: * waiting for its completion.
1351: */
1352: rcutree_migrate_callbacks(cpu);
1353:
1354: return 0;
1355: }
1356:
1357: static void cpuhp_complete_idle_dead(void *arg)
1358: {
1359: struct cpuhp_cpu_state *st = arg;
]
|
| 108/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 32678
output: 29
thoughts: 65
Thoughts: **Dissecting the CPU Shutdown Procedure**
Okay, so I'm looking at this `take_cpu_down` function. Right, first things first: it calls `__cpu_disable()`. Now, on x86, what *exactly* does that function do? Need to be absolutely clear on that crucial step. Time to dig into the architecture-specific implementation. Let's head over to `arch/x86/kernel/smpboot.c` and check out `__cpu_disable()`. I need to understand what state it puts the core in. Is it halting? Is it putting the processor to sleep? Is it just disabling interrupts? Let's get the details, and then I can understand the bigger picture here.
|
| 109/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:__cpu_disable PathPrefix:arch/x86]
Results: map[Output:arch/x86/include/asm/smp.h=66=static inline void smp_cpus_done(unsigned int max_cpus)
--
arch/x86/include/asm/smp.h-70-
arch/x86/include/asm/smp.h:71:static inline int __cpu_disable(void)
arch/x86/include/asm/smp.h-72-{
]
|
| 110/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 33048
output: 41
thoughts: 26
Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and written in the first person:
**Diving into SMP Configuration on x86**
Alright, I'm thinking I need to refresh my memory on the x86 Single Processor (SMP) configuration, specifically the relevant definitions. Let's start with `arch/x86/include/asm/smp.h`. Line 71, in particular, has got my attention. I'm probably looking for something specific there - perhaps related to the fundamental data structures, macros, or bit definitions dealing with how the CPU cores are brought up or synchronized during boot or runtime. It could be something related to the APIC configuration, CPU hotplugging, or even the locking primitives used for inter-processor communication. Given the location of this header, and knowing the low-level nature of SMP code, it's likely something fundamental to the overall multi-core architecture implementation for x86. I need to understand how the system's managing multiple processors at this stage. I'll focus on what specific aspect of the code on that line triggers this specific thought, for a clear understanding of the design philosophy.
|
| 111/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:arch/x86/include/asm/smp.h FirstLine:65 LineCount:40]
Results: map[Contents: 65:
66: static inline void smp_cpus_done(unsigned int max_cpus)
67: {
68: smp_ops.smp_cpus_done(max_cpus);
69: }
70:
71: static inline int __cpu_disable(void)
72: {
73: return smp_ops.cpu_disable();
74: }
75:
76: static inline void __cpu_die(unsigned int cpu)
77: {
78: if (smp_ops.cpu_die)
79: smp_ops.cpu_die(cpu);
80: }
81:
82: static inline void __noreturn play_dead(void)
83: {
84: smp_ops.play_dead();
85: BUG();
86: }
87:
88: static inline void arch_smp_send_reschedule(int cpu)
89: {
90: smp_ops.smp_send_reschedule(cpu);
91: }
92:
93: static inline void arch_send_call_function_single_ipi(int cpu)
94: {
95: smp_ops.send_call_func_single_ipi(cpu);
96: }
97:
98: static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
99: {
100: smp_ops.send_call_func_ipi(mask);
101: }
102:
103: void cpu_disable_common(void);
104: void native_smp_prepare_boot_cpu(void);
]
|
| 112/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 33877
output: 28
thoughts: 33
Thoughts: Okay, here's my summarized thought process, presented as if I were thinking it:
**Tracing the CPU Disable Function**
Alright, I need to figure out the implementation details of `smp_ops.cpu_disable`. Specifically, I want to see how the kernel actually disables a CPU. My first instinct is to look at the common implementations, which suggests I check both `cpu_disable_common` and `native_cpu_disable`. These are likely candidates, depending on the architecture or the specific kernel configuration. Let's start there.
|
| 113/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:cpu_disable PathPrefix:arch/x86]
Results: map[Output:arch/x86/include/asm/smp.h=24=struct smp_ops {
--
arch/x86/include/asm/smp.h-35- int (*kick_ap_alive)(unsigned cpu, struct task_struct *tidle);
arch/x86/include/asm/smp.h:36: int (*cpu_disable)(void);
arch/x86/include/asm/smp.h-37- void (*cpu_die)(unsigned int cpu);
--
arch/x86/include/asm/smp.h=66=static inline void smp_cpus_done(unsigned int max_cpus)
--
arch/x86/include/asm/smp.h-70-
arch/x86/include/asm/smp.h:71:static inline int __cpu_disable(void)
arch/x86/include/asm/smp.h-72-{
arch/x86/include/asm/smp.h:73: return smp_ops.cpu_disable();
arch/x86/include/asm/smp.h-74-}
--
arch/x86/include/asm/smp.h=98=static inline void arch_send_call_function_ipi_mask(const struct cpumask *mask)
--
arch/x86/include/asm/smp.h-102-
arch/x86/include/asm/smp.h:103:void cpu_disable_common(void);
arch/x86/include/asm/smp.h-104-void native_smp_prepare_boot_cpu(void);
--
arch/x86/include/asm/smp.h=109=int native_kick_ap(unsigned int cpu, struct task_struct *tidle);
arch/x86/include/asm/smp.h:110:int native_cpu_disable(void);
arch/x86/include/asm/smp.h-111-void __noreturn hlt_play_dead(void);
--
arch/x86/kernel/smp.c=284=struct smp_ops smp_ops = {
--
arch/x86/kernel/smp.c-295- .kick_ap_alive = native_kick_ap,
arch/x86/kernel/smp.c:296: .cpu_disable = native_cpu_disable,
arch/x86/kernel/smp.c-297- .play_dead = native_play_dead,
--
arch/x86/kernel/smpboot.c=1349=static void remove_cpu_from_maps(int cpu)
--
arch/x86/kernel/smpboot.c-1354-
arch/x86/kernel/smpboot.c:1355:void cpu_disable_common(void)
arch/x86/kernel/smpboot.c-1356-{
--
arch/x86/kernel/smpboot.c-1374-
arch/x86/kernel/smpboot.c:1375:int native_cpu_disable(void)
arch/x86/kernel/smpboot.c-1376-{
--
arch/x86/kernel/smpboot.c-1382-
arch/x86/kernel/smpboot.c:1383: cpu_disable_common();
arch/x86/kernel/smpboot.c-1384-
--
arch/x86/kernel/smpboot.c-1389- *
arch/x86/kernel/smpboot.c:1390: * Disabling the APIC must happen after cpu_disable_common()
arch/x86/kernel/smpboot.c-1391- * which invokes fixup_irqs().
--
arch/x86/kernel/smpboot.c=1504=void __noreturn native_play_dead(void)
--
arch/x86/kernel/smpboot.c-1517-#else /* ... !CONFIG_HOTPLUG_CPU */
arch/x86/kernel/smpboot.c:1518:int native_cpu_disable(void)
arch/x86/kernel/smpboot.c-1519-{
--
arch/x86/power/cpu.c=306=static void __noreturn resume_play_dead(void)
--
arch/x86/power/cpu.c-312-
arch/x86/power/cpu.c:313:int hibernate_resume_nonboot_cpu_disable(void)
arch/x86/power/cpu.c-314-{
--
arch/x86/power/hibernate.c=193=int arch_resume_nosmt(void)
--
arch/x86/power/hibernate.c-200- * against control transition during resume (see comment in
arch/x86/power/hibernate.c:201: * hibernate_resume_nonboot_cpu_disable()).
arch/x86/power/hibernate.c-202- *
--
arch/x86/xen/smp_pv.c=317=static void xen_pv_poll_sync_state(void)
--
arch/x86/xen/smp_pv.c-322-#ifdef CONFIG_HOTPLUG_CPU
arch/x86/xen/smp_pv.c:323:static int xen_pv_cpu_disable(void)
arch/x86/xen/smp_pv.c-324-{
--
arch/x86/xen/smp_pv.c-328-
arch/x86/xen/smp_pv.c:329: cpu_disable_common();
arch/x86/xen/smp_pv.c-330-
--
arch/x86/xen/smp_pv.c=351=static void __noreturn xen_pv_play_dead(void) /* used only with HOTPLUG_CPU */
--
arch/x86/xen/smp_pv.c-359-#else /* !CONFIG_HOTPLUG_CPU */
arch/x86/xen/smp_pv.c:360:static int xen_pv_cpu_disable(void)
arch/x86/xen/smp_pv.c-361-{
--
arch/x86/xen/smp_pv.c=422=static const struct smp_ops xen_smp_ops __initconst = {
--
arch/x86/xen/smp_pv.c-430- .poll_sync_state = xen_pv_poll_sync_state,
arch/x86/xen/smp_pv.c:431: .cpu_disable = xen_pv_cpu_disable,
arch/x86/xen/smp_pv.c-432- .play_dead = xen_pv_play_dead,
]
|
| 114/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 35834
output: 42
thoughts: 32
Thoughts: Here's a summary of my thought process, as requested:
**Diving into `smpboot.c` - X86 Style**
Okay, time to dig into the x86 SMP boot process. I'm going to zero in on `arch/x86/kernel/smpboot.c`, specifically around lines 1350 to 1400. That range is usually where the core multi-processor initialization steps reside, or at least the later stages. I suspect this will involve looking at how secondary processors are brought online, potentially how the APIC is set up, or maybe even the handoff from the bootloader. Given my understanding of the x86 architecture, I'm expecting to see calls to functions dealing with interrupt management, memory mapping, and potentially some low-level I/O operations related to the boot process. I’ll be watching for any nuances related to the ACPI specification or any platform-specific quirks that the code might be handling. I anticipate seeing conditional logic based on features such as virtualization or NUMA configurations. Let's get to it!
|
| 115/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:arch/x86/kernel/smpboot.c FirstLine:1345 LineCount:55]
Results: map[Contents:1345: cpumask_clear_cpu(cpu, cpu_sibling_setup_mask);
1346: recompute_smt_state();
1347: }
1348:
1349: static void remove_cpu_from_maps(int cpu)
1350: {
1351: set_cpu_online(cpu, false);
1352: numa_remove_cpu(cpu);
1353: }
1354:
1355: void cpu_disable_common(void)
1356: {
1357: int cpu = smp_processor_id();
1358:
1359: remove_siblinginfo(cpu);
1360:
1361: /*
1362: * Stop allowing kernel-mode FPU. This is needed so that if the CPU is
1363: * brought online again, the initial state is not allowed:
1364: */
1365: this_cpu_write(kernel_fpu_allowed, false);
1366:
1367: /* It's now safe to remove this processor from the online map */
1368: lock_vector_lock();
1369: remove_cpu_from_maps(cpu);
1370: unlock_vector_lock();
1371: fixup_irqs();
1372: lapic_offline();
1373: }
1374:
1375: int native_cpu_disable(void)
1376: {
1377: int ret;
1378:
1379: ret = lapic_can_unplug_cpu();
1380: if (ret)
1381: return ret;
1382:
1383: cpu_disable_common();
1384:
1385: /*
1386: * Disable the local APIC. Otherwise IPI broadcasts will reach
1387: * it. It still responds normally to INIT, NMI, SMI, and SIPI
1388: * messages.
1389: *
1390: * Disabling the APIC must happen after cpu_disable_common()
1391: * which invokes fixup_irqs().
1392: *
1393: * Disabling the APIC preserves already set bits in IRR, but
1394: * an interrupt arriving after disabling the local APIC does not
1395: * set the corresponding IRR bit.
1396: *
1397: * fixup_irqs() scans IRR for set bits so it can raise a not
1398: * yet handled interrupt on the new destination CPU via an IPI
1399: * but obviously it can't do so for IRR bits which are not set.
]
|
| 116/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 36918
output: 37
thoughts: 495
Thoughts: **Analyzing CPU Disabling and Potential Race Conditions**
Okay, let's break this down. First, I see `cpu_disable_common()` and immediately notice the critical sequence: it grabs the `vector_lock`, removes the CPU from the maps, then unlocks the `vector_lock`. The key line here is the call to `remove_cpu_from_maps(cpu)`, which effectively sets the CPU offline using `set_cpu_online(cpu, false)`. This is happening right within `__cpu_disable()`. Interesting.
Now, I'm following the flow and see `stop_machine_park(cpu)` is called much later, within `take_cpu_down`. This is where it gets interesting. `take_cpu_down` is responsible for taking the CPU down, and *after* `__cpu_disable()` – which sets the CPU offline – we have the crucial line invoking CPU_DYING callbacks, then *finally* calling `stop_machine_park(cpu)`.
Diving into `stop_machine_park(cpu)`, it sets `stopper->enabled = false` and then parks the stopper thread. The problem is, at the point when `stop_machine_park(cpu)` is called, the CPU *should* be offline because `__cpu_disable()` already set `cpu` as OFFLINE with `set_cpu_online(cpu, false)`. This means that `cpu_is_offline(cpu)` should be returning `TRUE`. However, the code's execution flow implies that the `stopper->enabled` flag is still `TRUE` at this point.
So, to recap, `cpu` goes offline, and the stopper is still *enabled* at some point. Is there a race condition here?
What I'm worried about is whether another CPU might see `cpu_online` at an unexpected point. This is where things get dicey. Let's look at how `sched_balance_newidle` and `sched_balance_rq` handle CPU selection. Specifically, I need to know how `sched_balance_rq` decides which CPU is the `busiest` CPU. Let's analyze those functions to be sure.
|
| 117/4 |
2026/09/17 02:28 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:kernel/sched/fair.c Name:sched_balance_newidle]
Results: map[SourceCode:14530: /*
14531: * sched_balance_newidle is called by schedule() if this_cpu is about to become
14532: * idle. Attempts to pull tasks from other CPUs.
14533: *
14534: * Returns:
14535: * < 0 - we released the lock and there are !fair tasks present
14536: * 0 - failed, no new tasks
14537: * > 0 - success, new (fair) tasks present
14538: */
14539: static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf)
14540: __must_hold(__rq_lockp(this_rq))
14541: {
14542: unsigned long next_balance = jiffies + HZ;
14543: int this_cpu = this_rq->cpu;
14544: int continue_balancing = 1;
14545: u64 t0, t1, curr_cost = 0;
14546: struct sched_domain *sd;
14547: int pulled_task = 0;
14548:
14549: update_misfit_status(NULL, this_rq);
14550:
14551: /*
14552: * There is a task waiting to run. No need to search for one.
14553: * Return 0; the task will be enqueued when switching to idle.
14554: */
14555: if (this_rq->ttwu_pending)
14556: return 0;
14557:
14558: /*
14559: * We must set idle_stamp _before_ calling sched_balance_rq()
14560: * for CPU_NEWLY_IDLE, such that we measure the this duration
14561: * as idle time.
14562: */
14563: this_rq->idle_stamp = rq_clock(this_rq);
14564:
14565: /*
14566: * Do not pull tasks towards !active CPUs...
14567: */
14568: if (!cpu_active(this_cpu))
14569: return 0;
14570:
14571: /*
14572: * This is OK, because current is on_cpu, which avoids it being picked
14573: * for load-balance and preemption/IRQs are still disabled avoiding
14574: * further scheduler activity on it and we're being very careful to
14575: * re-start the picking loop.
14576: */
14577: rq_unpin_lock(this_rq, rf);
14578:
14579: sd = rcu_dereference_sched_domain(this_rq->sd);
14580: if (!sd)
14581: goto out;
14582:
14583: if (!get_rd_overloaded(this_rq->rd) ||
14584: this_rq->avg_idle < sd->max_newidle_lb_cost) {
14585:
14586: update_next_balance(sd, &next_balance);
14587: goto out;
14588: }
14589:
14590: /*
14591: * Include sched_balance_update_blocked_averages() in the cost
14592: * calculation because it can be quite costly -- this ensures we skip
14593: * it when avg_idle gets to be very low.
14594: */
14595: t0 = sched_clock_cpu(this_cpu);
14596: __sched_balance_update_blocked_averages(this_rq);
14597:
14598: rq_modified_begin(this_rq, &fair_sched_class);
14599: raw_spin_rq_unlock(this_rq);
14600:
14601: for_each_domain(this_cpu, sd) {
14602: u64 domain_cost;
14603:
14604: update_next_balance(sd, &next_balance);
14605:
14606: if (this_rq->avg_idle < curr_cost + sd->max_newidle_lb_cost)
14607: break;
14608:
14609: if (sd->flags & SD_BALANCE_NEWIDLE) {
14610: unsigned int weight = 1;
14611:
14612: if (sched_feat(NI_RANDOM) && sd->newidle_ratio < 1024) {
14613: /*
14614: * Throw a 1k sided dice; and only run
14615: * newidle_balance according to the success
14616: * rate.
14617: */
14618: u32 d1k = sched_rng() % 1024;
14619: weight = 1 + sd->newidle_ratio;
14620: if (d1k > weight) {
14621: update_newidle_stats(sd, 0);
14622: continue;
14623: }
14624: weight = (1024 + weight/2) / weight;
14625: }
14626:
14627: pulled_task = sched_balance_rq(this_cpu, this_rq,
14628: sd, CPU_NEWLY_IDLE,
14629: &continue_balancing);
14630:
14631: t1 = sched_clock_cpu(this_cpu);
14632: domain_cost = t1 - t0;
14633: curr_cost += domain_cost;
14634: t0 = t1;
14635:
14636: /*
14637: * Track max cost of a domain to make sure to not delay the
14638: * next wakeup on the CPU.
14639: */
14640: update_newidle_cost(sd, domain_cost, weight * !!pulled_task);
14641: }
14642:
14643: /*
14644: * Stop searching for tasks to pull if there are
14645: * now runnable tasks on this rq.
14646: */
14647: if (pulled_task || !continue_balancing)
14648: break;
14649: }
14650:
14651: raw_spin_rq_lock(this_rq);
14652:
14653: if (curr_cost > this_rq->max_idle_balance_cost)
14654: this_rq->max_idle_balance_cost = curr_cost;
14655:
14656: /*
14657: * While browsing the domains, we released the rq lock, a task could
14658: * have been enqueued in the meantime. Since we're not going idle,
14659: * pretend we pulled a task.
14660: */
14661: if (this_rq->cfs.h_nr_queued && !pulled_task)
14662: pulled_task = 1;
14663:
14664: /* If a higher prio class was modified, restart the pick */
14665: if (rq_modified_above(this_rq, &fair_sched_class))
14666: pulled_task = -1;
14667:
14668: out:
14669: /* Move the next balance forward */
14670: if (time_after(this_rq->next_balance, next_balance))
14671: this_rq->next_balance = next_balance;
14672:
14673: if (pulled_task)
14674: this_rq->idle_stamp = 0;
14675: else
14676: nohz_newidle_balance(this_rq);
14677:
14678: rq_repin_lock(this_rq, rf);
14679:
14680: return pulled_task;
14681: }
SourceFile:kernel/sched/fair.c]
|
| 118/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 40341
output: 37
thoughts: 86
Thoughts: **Tracing the CPU Stop Trigger**
Okay, so I'm diving into how `active_load_balance_cpu_stop` gets fired up within `sched_balance_rq`. My first step, as always, is to search for the function name itself or maybe even that `busiest->active_balance = 1` assignment. That'll be the key to understanding its activation. Looks like I'll want to focus on lines roughly around 13620 to 13670 in `kernel/sched/fair.c`. That's where the magic probably happens. Time to crack open the source and get to it.
|
| 119/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:kernel/sched/fair.c FirstLine:13620 LineCount:50]
Results: map[Contents:13620: env.migration_type != migrate_misfit &&
13621: !(env.flags & LBF_LLC_PINNED))
13622: sd->nr_balance_failed++;
13623:
13624: if (!need_active_balance(&env))
13625: goto out_unbalanced;
13626:
13627: scoped_guard (raw_spin_rq_lock_irqsave, busiest) {
13628: /*
13629: * Don't kick the active_load_balance_cpu_stop,
13630: * if the curr task on busiest CPU can't be
13631: * moved to this_cpu:
13632: */
13633: if (!cpumask_test_cpu(this_cpu, busiest->curr->cpus_ptr))
13634: goto out_one_pinned;
13635:
13636: /* Record that we found at least one task that could run on this_cpu */
13637: env.flags &= ~LBF_ALL_PINNED;
13638:
13639: /*
13640: * ->active_balance synchronizes accesses to
13641: * ->active_balance_work. Once set, it's cleared
13642: * only after active load balance is finished.
13643: */
13644: if (busiest->active_balance)
13645: goto out_unbalanced;
13646:
13647: /*
13648: * @busiest dropped its rq_lock in the middle of
13649: * scheduling out its ->curr task (->on_rq := 0), no
13650: * need to forcefully punt it away with active balance.
13651: */
13652: if (!busiest->curr->on_rq)
13653: goto out_unbalanced;
13654:
13655: busiest->active_balance = 1;
13656: busiest->push_cpu = this_cpu;
13657: active_balance = 1;
13658: preempt_disable();
13659: }
13660: if (active_balance) {
13661: stop_one_cpu_nowait(cpu_of(busiest),
13662: active_load_balance_cpu_stop, busiest,
13663: &busiest->active_balance_work);
13664: }
13665: preempt_enable();
13666:
13667: out_unbalanced:
13668: /* We were unbalanced, so reset the balancing interval */
13669: sd->balance_interval = sd->min_interval;
]
|
| 120/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 41417
output: 20
thoughts: 100
Thoughts: **Investigating a Potential Scheduler Imbalance**
Okay, let's break this down. I'm looking at `sched_balance_rq`. My intuition tells me there's something amiss. The function flow is pretty straightforward: `find_busiest_group`, then `find_busiest_queue`, which ultimately selects the `busiest` CPU. But hang on... how is it even possible that an *offline* CPU could be identified as the `busiest` one? That just doesn't compute. Something is fundamentally wrong with that assumption.
Right, so where's the disconnect? I need to trace this back. My focus shifts to the times when the scheduling domains are rebuilt. That's a key area, particularly concerning CPU hotplug events. That's where I need to look: where are scheduling domains being recreated? The CPU might get included, then it's taken away. When does this happen? Is `sched_cpu_deactivate` the key? I need to focus my search on sched domain rebuild operations that are happening in the context of hotplug events, or more specifically, around the calls to `sched_cpu_deactivate`. That's where I think the bug is hiding.
|
| 121/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:sched_cpu_deactivate]
Results: map[Output:Documentation/core-api/cpu_hotplug.rst=655=With trace events enabled, the individual steps are visible, too::
--
Documentation/core-api/cpu_hotplug.rst-659- bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work)
Documentation/core-api/cpu_hotplug.rst:660: cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate)
Documentation/core-api/cpu_hotplug.rst-661- cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
--
Documentation/translations/zh_CN/core-api/cpu_hotplug.rst=498=CPU hotplug回调和CPU hotplug读取锁定区域内使用。
--
Documentation/translations/zh_CN/core-api/cpu_hotplug.rst-586- bash-394 [001] 22.976: cpuhp_enter: cpu: 0004 target: 140 step: 169 (cpuhp_kick_ap_work)
Documentation/translations/zh_CN/core-api/cpu_hotplug.rst:587: cpuhp/4-31 [004] 22.977: cpuhp_enter: cpu: 0004 target: 140 step: 168 (sched_cpu_deactivate)
Documentation/translations/zh_CN/core-api/cpu_hotplug.rst-588- cpuhp/4-31 [004] 22.990: cpuhp_exit: cpu: 0004 state: 168 step: 168 ret: 0
--
include/linux/sched/hotplug.h=10=extern int sched_cpu_activate(unsigned int cpu);
include/linux/sched/hotplug.h:11:extern int sched_cpu_deactivate(unsigned int cpu);
include/linux/sched/hotplug.h-12-
--
kernel/cpu.c=2046=static struct cpuhp_step cpuhp_hp_states[] = {
--
kernel/cpu.c-2236- .startup.single = sched_cpu_activate,
kernel/cpu.c:2237: .teardown.single = sched_cpu_deactivate,
kernel/cpu.c-2238- },
--
kernel/sched/core.c=8697=int sched_cpu_activate(unsigned int cpu)
--
kernel/sched/core.c-8734-
kernel/sched/core.c:8735:int sched_cpu_deactivate(unsigned int cpu)
kernel/sched/core.c-8736-{
]
|
| 122/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 42597
output: 36
thoughts: 25
Thoughts: Here's my analysis of the provided context, expressed as a first-person summary:
**Diving into `sched_cpu_deactivate` and Friends**
Alright, let's get into the nitty-gritty of the scheduler. I need to understand how CPU deactivation is handled, particularly within `kernel/sched/core.c`. My focus is zeroing in on `sched_cpu_deactivate` and its connections – likely the functions it calls, and the functions that call it. I want to build a clear mental model of the sequence of events that unfold when a CPU is deactivated, or perhaps removed from the system. What locks are involved? What data structures are updated? I need to understand the implications on the runqueues, tasks, and any other relevant structures. I'm especially interested in how it relates to hotplugging and power management, because those are often intertwined. I'll be looking for potential race conditions or performance bottlenecks, always trying to keep in mind the real-world impact of any changes I'm researching. Let's see what we can find.
|
| 123/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:kernel/sched/core.c FirstLine:8730 LineCount:70]
Results: map[Contents:8730: sched_set_rq_online(rq, cpu);
8731:
8732: return 0;
8733: }
8734:
8735: int sched_cpu_deactivate(unsigned int cpu)
8736: {
8737: struct rq *rq = cpu_rq(cpu);
8738: int ret;
8739:
8740: ret = dl_bw_deactivate(cpu);
8741:
8742: if (ret)
8743: return ret;
8744:
8745: /*
8746: * Remove CPU from nohz.idle_cpus_mask to prevent participating in
8747: * load balancing when not active
8748: */
8749: scoped_guard (rcu)
8750: nohz_balance_exit_idle(rq);
8751:
8752: set_cpu_active(cpu, false);
8753:
8754: /*
8755: * From this point forward, this CPU will refuse to run any task that
8756: * is not: migrate_disable() or KTHREAD_IS_PER_CPU, and will actively
8757: * push those tasks away until this gets cleared, see
8758: * sched_cpu_dying().
8759: */
8760: balance_push_set(cpu, true);
8761:
8762: /*
8763: * We've cleared cpu_active_mask / set balance_push, wait for all
8764: * preempt-disabled and RCU users of this state to go away such that
8765: * all new such users will observe it.
8766: *
8767: * Specifically, we rely on ttwu to no longer target this CPU, see
8768: * ttwu_queue_cond() and is_cpu_allowed().
8769: *
8770: * Do sync before park smpboot threads to take care the RCU boost case.
8771: */
8772: synchronize_rcu();
8773:
8774: sched_domains_free_llc_id(cpu);
8775:
8776: sched_set_rq_offline(rq, cpu);
8777:
8778: scx_rq_deactivate(rq);
8779:
8780: /*
8781: * When going down, decrement the number of cores with SMT present.
8782: */
8783: sched_smt_present_dec(cpu);
8784:
8785: sched_core_cpu_deactivate(cpu);
8786:
8787: if (!sched_smp_initialized)
8788: return 0;
8789:
8790: sched_update_numa(cpu, false);
8791: cpuset_cpu_inactive(cpu);
8792: sched_domains_numa_masks_clear(cpu);
8793: return 0;
8794: }
8795:
8796: static void sched_rq_cpu_starting(unsigned int cpu)
8797: {
8798: struct rq *rq = cpu_rq(cpu);
8799:
]
|
| 124/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 43828
output: 27
thoughts: 26
Thoughts: Here's my attempt at summarizing the thought process, tailored for an expert audience:
**Analyzing CPU Hotplug Callbacks and Scheduler Interactions**
Okay, hold on a second. I need to take a step back and examine the bigger picture. I've been focusing on this specific function, but before I dig deeper, I need to see how it fits into the broader context of CPU hotplug callbacks and their interaction with the scheduler. I think understanding the overall workflow here is critical to understanding the implications.
Let me start by searching the code for scheduler-related hotplug steps. That's probably the most direct way to get a handle on the control flow. By following the call paths that include the scheduler, I can better understand how everything fits together. I need to figure out where this piece slots in and what the dependencies are.
|
| 125/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:sched_ PathPrefix:kernel/cpu.c]
Results: map[Output:kernel/cpu.c=908=static int finish_cpu(unsigned int cpu)
--
kernel/cpu.c-913- /*
kernel/cpu.c:914: * sched_force_init_mm() ensured the use of &init_mm,
kernel/cpu.c-915- * drop that refcount now that the CPU has stopped.
--
kernel/cpu.c=1403=static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
--
kernel/cpu.c-1418- * Keep at least one housekeeping cpu onlined to avoid generating
kernel/cpu.c:1419: * an empty sched_domain span.
kernel/cpu.c-1420- */
--
kernel/cpu.c=2046=static struct cpuhp_step cpuhp_hp_states[] = {
--
kernel/cpu.c-2145- .name = "sched:starting",
kernel/cpu.c:2146: .startup.single = sched_cpu_starting,
kernel/cpu.c:2147: .teardown.single = sched_cpu_dying,
kernel/cpu.c-2148- },
--
kernel/cpu.c-2187- .startup.single = NULL,
kernel/cpu.c:2188: .teardown.single = sched_cpu_wait_empty,
kernel/cpu.c-2189- },
--
kernel/cpu.c-2235- .name = "sched:active",
kernel/cpu.c:2236: .startup.single = sched_cpu_activate,
kernel/cpu.c:2237: .teardown.single = sched_cpu_deactivate,
kernel/cpu.c-2238- },
--
kernel/cpu.c=2987=static ssize_t active_show(struct device *dev,
--
kernel/cpu.c-2989-{
kernel/cpu.c:2990: return sysfs_emit(buf, "%d\n", sched_smt_active());
kernel/cpu.c-2991-}
]
|
| 126/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 44613
output: 30
thoughts: 39
Thoughts: **Investigating CPU Dying and Wait States in the Scheduler**
Okay, let's dive in. My immediate focus is on those two functions, `sched_cpu_dying` and `sched_cpu_wait_empty`. These names suggest crucial aspects of CPU management within the scheduler, probably related to cleanup or idling. To truly grasp their purpose and implementation, I need to pinpoint their definitions. Where are they implemented? My instincts point to `kernel/sched/core.c`. Let's confirm that and examine the surrounding code to understand how these pieces fit into the broader scheduling picture. I'm expecting to find details on how the kernel handles a dying CPU or transitions when it's idle. Time to get to work.
|
| 127/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:sched_cpu_dying PathPrefix:kernel/sched/]
Results: map[Output:kernel/sched/core.c=8735=int sched_cpu_deactivate(unsigned int cpu)
--
kernel/sched/core.c-8757- * push those tasks away until this gets cleared, see
kernel/sched/core.c:8758: * sched_cpu_dying().
kernel/sched/core.c-8759- */
--
kernel/sched/core.c=8804=int sched_cpu_starting(unsigned int cpu)
--
kernel/sched/core.c-8822- * responsible hotplug callback has failed to do it's job.
kernel/sched/core.c:8823: * sched_cpu_dying() will catch it with the appropriate fireworks.
kernel/sched/core.c-8824- */
--
kernel/sched/core.c=8849=static void dump_rq_tasks(struct rq *rq, const char *loglvl)
--
kernel/sched/core.c-8867-
kernel/sched/core.c:8868:int sched_cpu_dying(unsigned int cpu)
kernel/sched/core.c-8869-{
]
|
| 128/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 45132
output: 36
thoughts: 21
Thoughts: Here's a summary of my thought process, as requested:
**Diving into `sched/core.c`**
Alright, let's get down to brass tacks. I'm going to take a closer look at the scheduler core. My current focus? I need to understand a specific piece of the puzzle within `kernel/sched/core.c`. Let's zero in on the vicinity of line 8868. This is likely where some crucial scheduling logic lives, and where I'll find the information I need. Hopefully, this section will shed light on the current problem. Time to dig in!
|
| 129/4 |
2026/09/17 02:28 |
tool |
read-file |
0m
Args: map[File:kernel/sched/core.c FirstLine:8865 LineCount:60]
Results: map[Contents:8865: }
8866: }
8867:
8868: int sched_cpu_dying(unsigned int cpu)
8869: {
8870: struct rq *rq = cpu_rq(cpu);
8871: struct rq_flags rf;
8872:
8873: /* Handle pending wakeups and then migrate everything off */
8874: sched_tick_stop(cpu);
8875:
8876: rq_lock_irqsave(rq, &rf);
8877: update_rq_clock(rq);
8878: if (rq->nr_running != 1 || rq_has_pinned_tasks(rq)) {
8879: WARN(true, "Dying CPU not properly vacated!");
8880: dump_rq_tasks(rq, KERN_WARNING);
8881: }
8882: dl_server_stop(&rq->fair_server);
8883: #ifdef CONFIG_SCHED_CLASS_EXT
8884: dl_server_stop(&rq->ext_server);
8885: #endif
8886: rq_unlock_irqrestore(rq, &rf);
8887:
8888: calc_load_migrate(rq);
8889: update_max_interval();
8890: hrtick_clear(rq);
8891: sched_core_cpu_dying(cpu);
8892: return 0;
8893: }
8894: #endif /* CONFIG_HOTPLUG_CPU */
8895:
8896: void __init sched_init_smp(void)
8897: {
8898: sched_init_numa(NUMA_NO_NODE);
8899:
8900: prandom_init_once(&sched_rnd_state);
8901:
8902: /*
8903: * There's no userspace yet to cause hotplug operations; hence all the
8904: * CPU masks are stable and all blatant races in the below code cannot
8905: * happen.
8906: */
8907: sched_domains_mutex_lock();
8908: sched_init_domains(cpu_active_mask);
8909: sched_domains_mutex_unlock();
8910:
8911: /* Move init over to a non-isolated CPU */
8912: if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_TYPE_DOMAIN)) < 0)
8913: BUG();
8914: current->flags &= ~PF_NO_SETAFFINITY;
8915: sched_init_granularity();
8916:
8917: init_sched_rt_class();
8918: init_sched_dl_class();
8919:
8920: sched_init_dl_servers();
8921:
8922: sched_smp_initialized = true;
8923: }
8924:
]
|
| 130/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 46173
output: 31
thoughts: 17
Thoughts: Here's my thought process, as if I were considering this question:
**Locating `sched_cpu_wait_empty`**
Okay, first things first, I need to find the definition of `sched_cpu_wait_empty`. This function is likely involved in the scheduler and, given the name, probably deals with idle or empty CPU wait queues. I immediately start thinking about where I'd *expect* to find it. Given my expertise, I'm going to scan the core scheduler source files first. Specifically, I'll be looking in directories like `kernel/sched`, `include/linux/sched`, and maybe even `arch/<architecture>/kernel/sched` if it's architecture-specific. I know the scheduler code is usually well-organized, so I can hopefully zero in on the relevant files relatively quickly. I'll probably start with a `grep` or `find` command, targeting those likely locations. The context of its use will tell me more but for now I am just looking for its definition. Once I find its declaration, I can examine its implementation to understand its purpose and behavior in more detail. That should give me a good handle on its role within the CPU scheduling process. I am certain I know the general location, so it's a matter of finding it now!
|
| 131/4 |
2026/09/17 02:28 |
tool |
grepper |
0m
Args: map[Expression:sched_cpu_wait_empty PathPrefix:kernel/sched/]
Results: map[Output:kernel/sched/core.c=8804=int sched_cpu_starting(unsigned int cpu)
--
kernel/sched/core.c-8824- */
kernel/sched/core.c:8825:int sched_cpu_wait_empty(unsigned int cpu)
kernel/sched/core.c-8826-{
]
|
| 132/4 |
2026/09/17 02:28 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 46590
output: 36
thoughts: 23
Thoughts: Here's my summary, as though I'm reading and processing the request:
**Diving into sched_cpu_wait_empty**
Alright, let's get down to it. They want me to look into `sched_cpu_wait_empty`, and it looks like it's defined in `kernel/sched/core.c`. Seems like a core scheduler function, which means this could be interesting. I'll need to understand the context – when is this function called, what's it trying to achieve, and what data structures is it interacting with? I bet this function deals with waiting for a CPU's runqueue to become empty, probably as part of some synchronization primitive or load balancing procedure. This likely involves handling a potentially multi-core environment so I should anticipate potential lock contention, and the subtleties of preemptive scheduling. I need to keep in mind that understanding this requires me to examine the surrounding code to determine how it's integrated into the kernel's scheduler implementation. So let's get started.
|
| 133/4 |
2026/09/17 02:29 |
tool |
read-file |
0m
Args: map[File:kernel/sched/core.c FirstLine:8825 LineCount:40]
Results: map[Contents:8825: int sched_cpu_wait_empty(unsigned int cpu)
8826: {
8827: balance_hotplug_wait();
8828: sched_force_init_mm();
8829: return 0;
8830: }
8831:
8832: /*
8833: * Since this CPU is going 'away' for a while, fold any nr_active delta we
8834: * might have. Called from the CPU stopper task after ensuring that the
8835: * stopper is the last running task on the CPU, so nr_active count is
8836: * stable. We need to take the tear-down thread which is calling this into
8837: * account, so we hand in adjust = 1 to the load calculation.
8838: *
8839: * Also see the comment "Global load-average calculations".
8840: */
8841: static void calc_load_migrate(struct rq *rq)
8842: {
8843: long delta = calc_load_fold_active(rq, 1);
8844:
8845: if (delta)
8846: atomic_long_add(delta, &calc_load_tasks);
8847: }
8848:
8849: static void dump_rq_tasks(struct rq *rq, const char *loglvl)
8850: {
8851: struct task_struct *g, *p;
8852: int cpu = cpu_of(rq);
8853:
8854: lockdep_assert_rq_held(rq);
8855:
8856: printk("%sCPU%d enqueued tasks (%u total):\n", loglvl, cpu, rq->nr_running);
8857: for_each_process_thread(g, p) {
8858: if (task_cpu(p) != cpu)
8859: continue;
8860:
8861: if (!task_on_rq_queued(p))
8862: continue;
8863:
8864: printk("%s\tpid: %d, name: %s\n", loglvl, p->pid, p->comm);
]
|
| 134/4 |
2026/09/17 02:29 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 47484
output: 30
thoughts: 371
Thoughts: **Analyzing a Kernel Bug Report: An Expert's Perspective**
Okay, let's dive into this. The prompt mentions a specific kernel bug report where `native_smp_send_reschedule` throws a `WARN` because it's rescheduling an offline CPU. We're looking at `cpu_is_offline(cpu)` returning true in that context, and the call stack shows this happens during CFS load balancing, specifically within `sched_balance_newidle`.
My initial thought is, this smells like a race condition between CPU hotplug (specifically, offlining a CPU) and the scheduler's load balancing. This isn't entirely unusual, but we need to understand the implications. The important question is, can this lead to something bad? Memory corruption, use-after-free, or something exploitable? And if it is exploitable, is it possible for an unprivileged user to trigger this, assuming they don't have root or CAP_SYS_ADMIN capabilities to directly offline CPUs?
Time to dig into the documentation and commit history. First, I'm going to search for "Unexpected reschedule of offline CPU" or similar phrases. I can also look at the commit log for that specific error message. I see the log is shallow, which is unfortunate, but it's worth checking for any associated documentation or comments that might shed light on this.
Next, I need to figure out the path from `try_to_wake_up` to `smp_send_reschedule`. Where is `arch_smp_send_reschedule` or just `smp_send_reschedule` called from within `try_to_wake_up`? Let's trace through `try_to_wake_up` and see where `ttwu_queue` and `smp_send_reschedule` come into play. Understanding this path is crucial to identifying the potential vulnerability.
|
| 135/4 |
2026/09/17 02:29 |
tool |
grepper |
0m
Args: map[Expression:smp_send_reschedule PathPrefix:kernel/sched]
Results: map[Output:kernel/sched/core.c=1195=static void __resched_curr(struct rq *rq, int tif)
--
kernel/sched/core.c-1224- if (tif == TIF_NEED_RESCHED)
kernel/sched/core.c:1225: smp_send_reschedule(cpu);
kernel/sched/core.c-1226- } else {
--
kernel/sched/core.c=1334=static void wake_up_idle_cpu(int cpu)
--
kernel/sched/core.c-1363- if (set_nr_and_not_polling(task_thread_info(rq->idle), TIF_NEED_RESCHED))
kernel/sched/core.c:1364: smp_send_reschedule(cpu);
kernel/sched/core.c-1365- else
--
kernel/sched/core.c=3523=void kick_process(struct task_struct *p)
--
kernel/sched/core.c-3528- if ((cpu != smp_processor_id()) && task_curr(p))
kernel/sched/core.c:3529: smp_send_reschedule(cpu);
kernel/sched/core.c-3530-}
]
|
| 136/4 |
2026/09/17 02:29 |
llm |
codeexpert |
0m
Model:
Tokens:
input: 45438
output: 523
thoughts: 3005
Thoughts: **Analysis of the Scheduler and CPU Hotplug Race Condition**
Alright, let's break this down. It seems we've uncovered a specific race condition within the Linux kernel, specifically concerning the scheduler's load balancing and the CPU hotplug mechanism. My analysis shows this involves an interaction between `sched_balance_newidle` (and, subsequently, `sched_balance_rq` for active load balancing) and the process of offlining a CPU.
1. **Race Condition Identification:** The core issue appears to be a window of vulnerability when a CPU is in the process of being offlined. The call stack leading to the problematic `WARN` is clear: a load balancing operation (`sched_balance_newidle` -> `sched_balance_rq` -> `stop_one_cpu_nowait` -> `cpu_stop_queue_work` -> `wake_up_process` -> `try_to_wake_up` -> `smp_send_reschedule`) attempts to "reschedule" a CPU while, concurrently, that CPU is being marked as offline by `takedown_cpu`, ultimately via `__cpu_disable()`. The critical point is when `cpu_is_offline(cpu)` evaluates to true within the `native_smp_send_reschedule` function, triggered by `wake_up_process`. This is because the CPU's online status can flip between the time `cpu_stop_queue_work` enables the work and the time `smp_send_reschedule` is actually called.
2. **Potential Exploitation & Security Implications:** Thankfully, the race itself does *not* lead to any exploitable security vulnerabilities. The crucial code in `native_smp_send_reschedule` includes a check for `cpu_is_offline(cpu)`. When the CPU is offline the function safely returns after the warning. No invalid memory access or corruption. The scheduler and hotplug routines handle the CPU shutdown in a way that should prevent any UAF or data corruption. The stopper thread is parked. The scheduler migrations are already handling offline CPUs.
3. **Unprivileged User Trigger:** The good news here is that an unprivileged user can't trigger this condition. The reason being that offlining a CPU requires root privileges, specifically `CAP_SYS_ADMIN`, or an equivalent permission to modify the CPU online state.
So, in summary:
* **Race Condition:** Confirmed. It's a genuine race between the scheduler's load balancing and CPU hotplug. The warning is a symptom of this race.
* **Security Risk:** No exploitable conditions detected. It's a benign race, that results in a diagnostic warning.
* **Unprivileged Trigger:** No. Root privileges are necessary.
I am satisfied that this analysis is complete, as I have followed the program's requirements.
|
| 137/4 |
2026/09/17 02:29 |
tool |
set-results |
0m
Args: map[Answer:1. Race condition nature:
Yes, this is a known race condition between CPU offlining (hotplug) and CFS load balancing (active load balance). Specifically:
- During CPU teardown, the dying CPU marks itself offline (via `__cpu_disable()` -> `cpu_disable_common()` -> `set_cpu_online(cpu, false)`) and then parks its cpu_stopper thread (via `stop_machine_park()`).
- Concurrently, another CPU running idle load balancing (`sched_balance_newidle` -> `sched_balance_rq`) decides to kick active load balancing on the dying CPU, calling `stop_one_cpu_nowait()`.
- In `cpu_stop_queue_work()`, `stopper->enabled` is checked and found to be true (prior to or during park), so work is queued and `wake_up_process(stopper->thread)` is called.
- Inside `try_to_wake_up()`, waking the stopper thread pinned to the dying CPU leads to `smp_send_reschedule(cpu)`. By the time `native_smp_send_reschedule()` runs, `cpu_is_offline(cpu)` evaluates to true because the dying CPU has already cleared its online bit, tripping the `WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu)`.
2. Memory corruption, UAF, or exploitability:
No. This warning cannot lead to memory corruption, use-after-free, or exploitable conditions:
- In `native_smp_send_reschedule()`, upon detecting that the CPU is offline, it emits the WARN and immediately returns (`return;`), avoiding sending an invalid APIC IPI.
- The stopper work and scheduler state on the dying CPU are safely handled and torn down during subsequent hotplug stages (`sched_cpu_dying`, task migration, and stopper parking).
- No memory is unsafely freed or accessed out of bounds; it is purely a timing glitch triggering a diagnostic warning.
3. Unprivileged user trigger:
No. Offlining a CPU requires root/CAP_SYS_ADMIN permissions (e.g. via `/sys/devices/system/cpu/cpu*/online` or privileged system power state operations). An unprivileged user without CAP_SYS_ADMIN cannot offline CPUs and therefore cannot trigger this race condition.]
Results: map[Answer:1. Race condition nature:
Yes, this is a known race condition between CPU offlining (hotplug) and CFS load balancing (active load balance). Specifically:
- During CPU teardown, the dying CPU marks itself offline (via `__cpu_disable()` -> `cpu_disable_common()` -> `set_cpu_online(cpu, false)`) and then parks its cpu_stopper thread (via `stop_machine_park()`).
- Concurrently, another CPU running idle load balancing (`sched_balance_newidle` -> `sched_balance_rq`) decides to kick active load balancing on the dying CPU, calling `stop_one_cpu_nowait()`.
- In `cpu_stop_queue_work()`, `stopper->enabled` is checked and found to be true (prior to or during park), so work is queued and `wake_up_process(stopper->thread)` is called.
- Inside `try_to_wake_up()`, waking the stopper thread pinned to the dying CPU leads to `smp_send_reschedule(cpu)`. By the time `native_smp_send_reschedule()` runs, `cpu_is_offline(cpu)` evaluates to true because the dying CPU has already cleared its online bit, tripping the `WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu)`.
2. Memory corruption, UAF, or exploitability:
No. This warning cannot lead to memory corruption, use-after-free, or exploitable conditions:
- In `native_smp_send_reschedule()`, upon detecting that the CPU is offline, it emits the WARN and immediately returns (`return;`), avoiding sending an invalid APIC IPI.
- The stopper work and scheduler state on the dying CPU are safely handled and torn down during subsequent hotplug stages (`sched_cpu_dying`, task migration, and stopper parking).
- No memory is unsafely freed or accessed out of bounds; it is purely a timing glitch triggering a diagnostic warning.
3. Unprivileged user trigger:
No. Offlining a CPU requires root/CAP_SYS_ADMIN permissions (e.g. via `/sys/devices/system/cpu/cpu*/online` or privileged system power state operations). An unprivileged user without CAP_SYS_ADMIN cannot offline CPUs and therefore cannot trigger this race condition.]
|
| 138/2 |
2026/09/17 02:29 |
llm |
expert |
0m
Model:
Tokens:
input: 27611
output: 66
thoughts: 0
|
| 139/2 |
2026/09/17 02:29 |
tool |
set-results |
0m
Args: map[DenialOfService:false Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
Results: map[DenialOfService:false Exploitable:false FilesystemTrigger:false NetworkTrigger:false PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:false VMGuestTrigger:false VMHostTrigger:false]
|
| 140/2 |
2026/09/17 02:29 |
llm |
expert |
0m
Model:
Tokens:
input: 27741
output: 753
thoughts: 302
Thoughts: **My Assessment of the Scheduler Race Condition Bug**
Okay, so I've dug into this issue, and here's what I've got. It seems there's a race condition between the CPU hotplug mechanism and the CFS load balancing logic in the scheduler. Specifically, the problem occurs when a CPU is being taken offline. While the CPU is in the process of marking itself as offline, another CPU running the idle load balancing code decides, concurrently, to trigger active load balancing on that dying CPU. This kicks off a chain of events that eventually attempts to reschedule tasks onto the offline CPU, through `stop_one_cpu_nowait()`. This queues work and then wakes up the stopper thread on the dying CPU. This, in turn calls `smp_send_reschedule(cpu)`. Inside `native_smp_send_reschedule()`, `cpu_is_offline(cpu)` is correctly true at this point, which is what triggers the warning: "sched: Unexpected reschedule of offline CPU#%d!".
Now, the important part: is this exploitable? Thankfully, no. This is just a warning, a check that flags an unusual but ultimately safe state. No memory corruption, no use-after-free, no information leaks, nothing like that. The system safely returns, and life goes on.
As for denial of service, again, no. It's a non-fatal warning. The system keeps working just fine, so no impact to operation.
And, thankfully, it's not something an unprivileged user can trigger. You need `CAP_SYS_ADMIN` to offline a CPU, so this is not something that can be exploited from an unprivileged context. User namespaces don't even have access to CPU hotplug, so that's a non-starter too.
Finally, it's not something that can be triggered through a VM guest, VM host, network connection, a peripheral, or the filesystem. The race is purely internal to the kernel and relies on CPU hotplug operations. So, overall, it's a minor annoyance, but not a security threat. I can write my report now.
|
| 141/1 |
2026/09/17 02:29 |
action |
format-explanation |
0m
Results: map[Explanation:**Bug Analysis:**
The bug report describes a `WARNING` triggered in `native_smp_send_reschedule()`
at `arch/x86/kernel/apic/ipi.c:71`. The warning message is `"sched: Unexpected
reschedule of offline CPU#%d!\n"`.
This occurs due to a known race condition between CPU hotplug (offlining a CPU)
and the Completely Fair Scheduler (CFS) load balancing mechanism:
1. When a CPU is being taken offline, it first clears its bit in the
`cpu_online_mask` (via `set_cpu_online(cpu, false)`). After this, it proceeds to
park its `cpu_stopper` thread.
2. Concurrently, another CPU might be performing idle load balancing
(`sched_balance_newidle()` -> `sched_balance_rq()`). It can select the dying CPU
as the `busiest` and attempt to initiate active load balancing by calling
`stop_one_cpu_nowait()`.
3. Because the dying CPU's stopper thread hasn't been fully parked yet
(`stopper->enabled` is still true), the active balance work is queued, and the
scheduler attempts to wake up the stopper thread on the dying CPU
(`wake_up_process()`).
4. Waking up a thread pinned to another CPU requires sending a reschedule
Inter-Processor Interrupt (IPI). The scheduler calls `smp_send_reschedule()`,
which on x86 maps to `native_smp_send_reschedule()`.
5. Inside `native_smp_send_reschedule()`, the kernel checks if the target CPU is
offline (`cpu_is_offline(cpu)`). Since the dying CPU already cleared its online
bit in step 1, this check evaluates to true, triggering the `WARN` and safely
returning without sending the IPI.
**Security Assessment:**
* **Exploitable:** **No.**
The warning is purely diagnostic. The code explicitly handles this race
condition gracefully by checking `if (unlikely(cpu_is_offline(cpu)))`, logging
the warning, and immediately returning (`return;`). There is no memory
corruption, use-after-free, out-of-bounds access, or information leak. The
scheduler state and stopper threads are safely cleaned up by the remainder of
the CPU hotplug teardown process.
* **Denial of Service (DoS):** **No.**
In production builds (where `panic_on_warn` is not enabled), this is a
non-fatal warning. The system continues to operate normally, and the missed
reschedule IPI is harmless since the target CPU is going offline anyway.
* **Accessible From Unprivileged Processes:** **No.**
Triggering this race condition requires the ability to offline a CPU (e.g., by
writing `0` to `/sys/devices/system/cpu/cpuX/online`). This action strictly
requires root privileges (`CAP_SYS_ADMIN`). An unprivileged user cannot
initiate CPU hotplug operations.
* **Accessible From User Namespaces:** **No.**
The `sysfs` interface for CPU hotplug is not delegated to unprivileged user
namespaces. It requires global `CAP_SYS_ADMIN` in the initial namespace.
* **Other Triggers (Network, Peripheral, Filesystem, VM):** **No.**
This is a core kernel scheduler and CPU hotplug race condition. It cannot be
triggered remotely via network packets, malicious filesystems, or untrusted
peripherals, nor is it a hypervisor escape from a VM guest.]
|