Skip to content

Commit 440d663

Browse files
committed
Merge tag 'mm-nonmm-stable-2026-04-15-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton: - "pid: make sub-init creation retryable" (Oleg Nesterov) Make creation of init in a new namespace more robust by clearing away some historical cruft which is no longer needed. Also some documentation fixups - "selftests/fchmodat2: Error handling and general" (Mark Brown) Fix and a cleanup for the fchmodat2() syscall selftest - "lib: polynomial: Move to math/ and clean up" (Andy Shevchenko) - "hung_task: Provide runtime reset interface for hung task detector" (Aaron Tomlin) Give administrators the ability to zero out /proc/sys/kernel/hung_task_detect_count - "tools/getdelays: use the static UAPI headers from tools/include/uapi" (Thomas Weißschuh) Teach getdelays to use the in-kernel UAPI headers rather than the system-provided ones - "watchdog/hardlockup: Improvements to hardlockup" (Mayank Rungta) Several cleanups and fixups to the hardlockup detector code and its documentation - "lib/bch: fix undefined behavior from signed left-shifts" (Josh Law) A couple of small/theoretical fixes in the bch code - "ocfs2/dlm: fix two bugs in dlm_match_regions()" (Junrui Luo) - "cleanup the RAID5 XOR library" (Christoph Hellwig) A quite far-reaching cleanup to this code. I can't do better than to quote Christoph: "The XOR library used for the RAID5 parity is a bit of a mess right now. The main file sits in crypto/ despite not being cryptography and not using the crypto API, with the generic implementations sitting in include/asm-generic and the arch implementations sitting in an asm/ header in theory. The latter doesn't work for many cases, so architectures often build the code directly into the core kernel, or create another module for the architecture code. Change this to a single module in lib/ that also contains the architecture optimizations, similar to the library work Eric Biggers has done for the CRC and crypto libraries later. After that it changes to better calling conventions that allow for smarter architecture implementations (although none is contained here yet), and uses static_call to avoid indirection function call overhead" - "lib/list_sort: Clean up list_sort() scheduling workarounds" (Kuan-Wei Chiu) Clean up this library code by removing a hacky thing which was added for UBIFS, which UBIFS doesn't actually need - "Fix bugs in extract_iter_to_sg()" (Christian Ehrhardt) Fix a few bugs in the scatterlist code, add in-kernel tests for the now-fixed bugs and fix a leak in the test itself - "kdump: Enable LUKS-encrypted dump target support in ARM64 and PowerPC" (Coiby Xu) Enable support of the LUKS-encrypted device dump target on arm64 and powerpc - "ocfs2: consolidate extent list validation into block read callbacks" (Joseph Qi) Cleanup, simplify, and make more robust ocfs2's validation of extent list fields (Kernel test robot loves mounting corrupted fs images!) * tag 'mm-nonmm-stable-2026-04-15-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (127 commits) ocfs2: validate group add input before caching ocfs2: validate bg_bits during freefrag scan ocfs2: fix listxattr handling when the buffer is full doc: watchdog: fix typos etc update Sean's email address ocfs2: use get_random_u32() where appropriate ocfs2: split transactions in dio completion to avoid credit exhaustion ocfs2: remove redundant l_next_free_rec check in __ocfs2_find_path() ocfs2: validate extent block list fields during block read ocfs2: remove empty extent list check in ocfs2_dx_dir_lookup_rec() ocfs2: validate dx_root extent list fields during block read ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY ocfs2: handle invalid dinode in ocfs2_group_extend .get_maintainer.ignore: add Askar ocfs2: validate bg_list extent bounds in discontig groups checkpatch: exclude forward declarations of const structs tools/accounting: handle truncated taskstats netlink messages taskstats: set version in TGID exit notifications ocfs2/heartbeat: fix slot mapping rollback leaks on error paths arm64,ppc64le/kdump: pass dm-crypt keys to kdump kernel ...
2 parents 0b2f2b1 + 70b6728 commit 440d663

155 files changed

Lines changed: 3524 additions & 2704 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.mailmap

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,10 @@ Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com> <gokulsri@codeaurora.org>
309309
Govindaraj Saminathan <quic_gsamin@quicinc.com> <gsamin@codeaurora.org>
310310
Guo Ren <guoren@kernel.org> <guoren@linux.alibaba.com>
311311
Guo Ren <guoren@kernel.org> <ren_guo@c-sky.com>
312-
Guru Das Srinagesh <quic_gurus@quicinc.com> <gurus@codeaurora.org>
312+
Guru Das Srinagesh <linux@gurudas.dev>
313+
Guru Das Srinagesh <linux@gurudas.dev> <quic_gurus@quicinc.com>
314+
Guru Das Srinagesh <linux@gurudas.dev> <gurus@codeaurora.org>
315+
Guru Das Srinagesh <linux@gurudas.dev> <gurooodas@gmail.com>
313316
Gustavo Padovan <gustavo@las.ic.unicamp.br>
314317
Gustavo Padovan <padovan@profusion.mobi>
315318
Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> <hamza.mahfooz@amd.com>
@@ -743,6 +746,7 @@ Sathishkumar Muruganandam <quic_murugana@quicinc.com> <murugana@codeaurora.org>
743746
Satya Priya <quic_skakitap@quicinc.com> <quic_c_skakit@quicinc.com> <skakit@codeaurora.org>
744747
S.Çağlar Onur <caglar@pardus.org.tr>
745748
Sayali Lokhande <quic_sayalil@quicinc.com> <sayalil@codeaurora.org>
749+
Sean Anderson <sean.anderson@linux.dev> <sean.anderson@seco.com>
746750
Sean Christopherson <seanjc@google.com> <sean.j.christopherson@intel.com>
747751
Sean Nyekjaer <sean@geanix.com> <sean.nyekjaer@prevas.dk>
748752
Sean Tranchetti <quic_stranche@quicinc.com> <stranche@codeaurora.org>

CREDITS

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4570,8 +4570,5 @@ D: MD driver
45704570
D: EISA/sysfs subsystem
45714571
S: France
45724572

4573-
# Don't add your name here, unless you really _are_ after Marc
4574-
# alphabetically. Leonard used to be very proud of being the
4575-
# last entry, and he'll get positively pissed if he can't even
4576-
# be second-to-last. (and this file really _is_ supposed to be
4577-
# in alphabetic order)
4573+
# Don't add your name here unless you really are last alphabetically.
4574+
# (This file is supposed to be kept in alphabetical order by last name.)

Documentation/admin-guide/lockup-watchdogs.rst

Lines changed: 121 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ details), and a compile option, "BOOTPARAM_SOFTLOCKUP_PANIC", are
1616
provided for this.
1717

1818
A 'hardlockup' is defined as a bug that causes the CPU to loop in
19-
kernel mode for more than 10 seconds (see "Implementation" below for
19+
kernel mode for several seconds (see "Implementation" below for
2020
details), without letting other interrupts have a chance to run.
2121
Similarly to the softlockup case, the current stack trace is displayed
2222
upon detection and the system will stay locked up unless the default
@@ -30,39 +30,135 @@ timeout is set through the confusingly named "kernel.panic" sysctl),
3030
to cause the system to reboot automatically after a specified amount
3131
of time.
3232

33+
Configuration
34+
=============
35+
36+
A kernel knob is provided that allows administrators to configure
37+
this period. The "watchdog_thresh" parameter (default 10 seconds)
38+
controls the threshold. The right value for a particular environment
39+
is a trade-off between fast response to lockups and detection overhead.
40+
3341
Implementation
3442
==============
3543

36-
The soft and hard lockup detectors are built on top of the hrtimer and
37-
perf subsystems, respectively. A direct consequence of this is that,
38-
in principle, they should work in any architecture where these
39-
subsystems are present.
40-
41-
A periodic hrtimer runs to generate interrupts and kick the watchdog
42-
job. An NMI perf event is generated every "watchdog_thresh"
43-
(compile-time initialized to 10 and configurable through sysctl of the
44-
same name) seconds to check for hardlockups. If any CPU in the system
45-
does not receive any hrtimer interrupt during that time the
46-
'hardlockup detector' (the handler for the NMI perf event) will
47-
generate a kernel warning or call panic, depending on the
48-
configuration.
49-
50-
The watchdog job runs in a stop scheduling thread that updates a
51-
timestamp every time it is scheduled. If that timestamp is not updated
52-
for 2*watchdog_thresh seconds (the softlockup threshold) the
44+
The soft and hard lockup detectors are built around an hrtimer.
45+
In addition, the softlockup detector regularly schedules a job, and
46+
the hard lockup detector might use Perf/NMI events on architectures
47+
that support it.
48+
49+
Frequency and Heartbeats
50+
------------------------
51+
52+
The core of the detectors is an hrtimer. It serves multiple purposes:
53+
54+
- schedules watchdog job for the softlockup detector
55+
- bumps the interrupt counter for hardlockup detectors (heartbeat)
56+
- detects softlockups
57+
- detects hardlockups in Buddy mode
58+
59+
The period of this hrtimer is 2*watchdog_thresh/5, which is 4 seconds
60+
by default. The hrtimer has two or three chances to generate an interrupt
61+
(heartbeat) before the hardlockup detector kicks in.
62+
63+
Softlockup Detector
64+
-------------------
65+
66+
The watchdog job is scheduled by the hrtimer and runs in a stop scheduling
67+
thread. It updates a timestamp every time it is scheduled. If that timestamp
68+
is not updated for 2*watchdog_thresh seconds (the softlockup threshold) the
5369
'softlockup detector' (coded inside the hrtimer callback function)
5470
will dump useful debug information to the system log, after which it
5571
will call panic if it was instructed to do so or resume execution of
5672
other kernel code.
5773

58-
The period of the hrtimer is 2*watchdog_thresh/5, which means it has
59-
two or three chances to generate an interrupt before the hardlockup
60-
detector kicks in.
74+
Hardlockup Detector (NMI/Perf)
75+
------------------------------
76+
77+
On architectures that support NMI (Non-Maskable Interrupt) perf events,
78+
a periodic NMI is generated every "watchdog_thresh" seconds.
79+
80+
If any CPU in the system does not receive any hrtimer interrupt
81+
(heartbeat) during the "watchdog_thresh" window, the 'hardlockup
82+
detector' (the handler for the NMI perf event) will generate a kernel
83+
warning or call panic.
84+
85+
**Detection Overhead (NMI):**
86+
87+
The time to detect a lockup can vary depending on when the lockup
88+
occurs relative to the NMI check window. Examples below assume a watchdog_thresh of 10.
89+
90+
* **Best Case:** The lockup occurs just before the first heartbeat is
91+
due. The detector will notice the missing hrtimer interrupt almost
92+
immediately during the next check.
93+
94+
::
95+
96+
Time 100.0: cpu 1 heartbeat
97+
Time 100.1: hardlockup_check, cpu1 stores its state
98+
Time 103.9: Hard Lockup on cpu1
99+
Time 104.0: cpu 1 heartbeat never comes
100+
Time 110.1: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup
101+
102+
Time to detection: ~6 seconds
103+
104+
* **Worst Case:** The lockup occurs shortly after a valid interrupt
105+
(heartbeat) which itself happened just after the NMI check. The next
106+
NMI check sees that the interrupt count has changed (due to that one
107+
heartbeat), assumes the CPU is healthy, and resets the baseline. The
108+
lockup is only detected at the subsequent check.
109+
110+
::
111+
112+
Time 100.0: hardlockup_check, cpu1 stores its state
113+
Time 100.1: cpu 1 heartbeat
114+
Time 100.2: Hard Lockup on cpu1
115+
Time 110.0: hardlockup_check, cpu1 stores its state (misses lockup as state changed)
116+
Time 120.0: hardlockup_check, cpu1 checks the state again, should be the same, declares lockup
117+
118+
Time to detection: ~20 seconds
119+
120+
Hardlockup Detector (Buddy)
121+
---------------------------
122+
123+
On architectures or configurations where NMI perf events are not
124+
available (or disabled), the kernel may use the "buddy" hardlockup
125+
detector. This mechanism requires SMP (Symmetric Multi-Processing).
126+
127+
In this mode, each CPU is assigned a "buddy" CPU to monitor. The
128+
monitoring CPU runs its own hrtimer (the same one used for softlockup
129+
detection) and checks if the buddy CPU's hrtimer interrupt count has
130+
increased.
131+
132+
To ensure timeliness and avoid false positives, the buddy system performs
133+
checks at every hrtimer interval (2*watchdog_thresh/5, which is 4 seconds
134+
by default). It uses a missed-interrupt threshold of 3. If the buddy's
135+
interrupt count has not changed for 3 consecutive checks, it is assumed
136+
that the buddy CPU is hardlocked (interrupts disabled). The monitoring
137+
CPU will then trigger the hardlockup response (warning or panic).
138+
139+
**Detection Overhead (Buddy):**
140+
141+
With a default check interval of 4 seconds (watchdog_thresh = 10):
142+
143+
* **Best case:** Lockup occurs just before a check.
144+
Detected in ~8s (0s till 1st check + 4s till 2nd + 4s till 3rd).
145+
* **Worst case:** Lockup occurs just after a check.
146+
Detected in ~12s (4s till 1st check + 4s till 2nd + 4s till 3rd).
147+
148+
**Limitations of the Buddy Detector:**
149+
150+
1. **All-CPU Lockup:** If all CPUs lock up simultaneously, the buddy
151+
detector cannot detect the condition because the monitoring CPUs
152+
are also frozen.
153+
2. **Stack Traces:** Unlike the NMI detector, the buddy detector
154+
cannot directly interrupt the locked CPU to grab a stack trace.
155+
It relies on architecture-specific mechanisms (like NMI backtrace
156+
support) to try and retrieve the status of the locked CPU. If
157+
such support is missing, the log may only show that a lockup
158+
occurred without providing the locked CPU's stack.
61159

62-
As explained above, a kernel knob is provided that allows
63-
administrators to configure the period of the hrtimer and the perf
64-
event. The right value for a particular environment is a trade-off
65-
between fast response to lockups and detection overhead.
160+
Watchdog Core Exclusion
161+
=======================
66162

67163
By default, the watchdog runs on all online cores. However, on a
68164
kernel configured with NO_HZ_FULL, by default the watchdog runs only

Documentation/admin-guide/sysctl/kernel.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ hung_task_detect_count
418418
======================
419419

420420
Indicates the total number of tasks that have been detected as hung since
421-
the system boot.
421+
the system boot or since the counter was reset. The counter is zeroed when
422+
a value of 0 is written.
422423

423424
This file shows up if ``CONFIG_DETECT_HUNG_TASK`` is enabled.
424425

Documentation/devicetree/bindings/timer/xlnx,xps-timer.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
77
title: Xilinx LogiCORE IP AXI Timer
88

99
maintainers:
10-
- Sean Anderson <sean.anderson@seco.com>
10+
- Sean Anderson <sean.anderson@linux.dev>
1111

1212
properties:
1313
compatible:

MAINTAINERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Descriptions of section entries and preferred order
3535
F: drivers/net/ all files in and below drivers/net
3636
F: drivers/net/* all files in drivers/net, but not below
3737
F: */net/* all files in "any top level directory"/net
38+
F: fs/**/*foo*.c all *foo*.c files in any subdirectory of fs
3839
One pattern per line. Multiple F: lines acceptable.
3940
X: *Excluded* files and directories that are NOT maintained, same
4041
rules as F:. Files exclusions are tested before file matches.
@@ -10308,7 +10309,7 @@ F: drivers/net/ethernet/freescale/dpaa
1030810309

1030910310
FREESCALE QORIQ DPAA FMAN DRIVER
1031010311
M: Madalin Bucur <madalin.bucur@nxp.com>
10311-
R: Sean Anderson <sean.anderson@seco.com>
10312+
R: Sean Anderson <sean.anderson@linux.dev>
1031210313
L: netdev@vger.kernel.org
1031310314
S: Maintained
1031410315
F: Documentation/devicetree/bindings/net/fsl,fman*.yaml
@@ -29109,7 +29110,7 @@ S: Orphan
2910929110
F: drivers/net/ethernet/xilinx/ll_temac*
2911029111

2911129112
XILINX PWM DRIVER
29112-
M: Sean Anderson <sean.anderson@seco.com>
29113+
M: Sean Anderson <sean.anderson@linux.dev>
2911329114
S: Maintained
2911429115
F: drivers/pwm/pwm-xilinx.c
2911529116
F: include/clocksource/timer-xilinx.h

arch/arm/lib/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,4 @@ endif
3939
$(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S
4040
$(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
4141

42-
ifeq ($(CONFIG_KERNEL_MODE_NEON),y)
43-
CFLAGS_xor-neon.o += $(CC_FLAGS_FPU)
44-
obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o
45-
endif
46-
4742
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o

arch/arm64/include/asm/xor.h

Lines changed: 0 additions & 73 deletions
This file was deleted.

arch/arm64/kernel/machine_kexec_file.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ int load_other_segments(struct kimage *image,
134134

135135
kexec_dprintk("Loaded elf core header at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
136136
image->elf_load_addr, kbuf.bufsz, kbuf.memsz);
137+
138+
ret = crash_load_dm_crypt_keys(image);
139+
if (ret)
140+
goto out_err;
137141
}
138142
#endif
139143

arch/arm64/lib/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ lib-y := clear_user.o delay.o copy_from_user.o \
55
memset.o memcmp.o strcmp.o strncmp.o strlen.o \
66
strnlen.o strchr.o strrchr.o tishift.o
77

8-
ifeq ($(CONFIG_KERNEL_MODE_NEON), y)
9-
obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o
10-
CFLAGS_xor-neon.o += $(CC_FLAGS_FPU)
11-
CFLAGS_REMOVE_xor-neon.o += $(CC_FLAGS_NO_FPU)
12-
endif
13-
148
lib-$(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) += uaccess_flushcache.o
159

1610
obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o

0 commit comments

Comments
 (0)