Skip to content

Commit d6b0219

Browse files
committed
Merge tag 'mm-nonmm-stable-2025-03-30-18-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton: - The series "powerpc/crash: use generic crashkernel reservation" from Sourabh Jain changes powerpc's kexec code to use more of the generic layers. - The series "get_maintainer: report subsystem status separately" from Vlastimil Babka makes some long-requested improvements to the get_maintainer output. - The series "ucount: Simplify refcounting with rcuref_t" from Sebastian Siewior cleans up and optimizing the refcounting in the ucount code. - The series "reboot: support runtime configuration of emergency hw_protection action" from Ahmad Fatoum improves the ability for a driver to perform an emergency system shutdown or reboot. - The series "Converge on using secs_to_jiffies() part two" from Easwar Hariharan performs further migrations from msecs_to_jiffies() to secs_to_jiffies(). - The series "lib/interval_tree: add some test cases and cleanup" from Wei Yang permits more userspace testing of kernel library code, adds some more tests and performs some cleanups. - The series "hung_task: Dump the blocking task stacktrace" from Masami Hiramatsu arranges for the hung_task detector to dump the stack of the blocking task and not just that of the blocked task. - The series "resource: Split and use DEFINE_RES*() macros" from Andy Shevchenko provides some cleanups to the resource definition macros. - Plus the usual shower of singleton patches - please see the individual changelogs for details. * tag 'mm-nonmm-stable-2025-03-30-18-23' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (77 commits) mailmap: consolidate email addresses of Alexander Sverdlin fs/procfs: fix the comment above proc_pid_wchan() relay: use kasprintf() instead of fixed buffer formatting resource: replace open coded variant of DEFINE_RES() resource: replace open coded variants of DEFINE_RES_*_NAMED() resource: replace open coded variant of DEFINE_RES_NAMED_DESC() resource: split DEFINE_RES_NAMED_DESC() out of DEFINE_RES_NAMED() samples: add hung_task detector mutex blocking sample hung_task: show the blocker task if the task is hung on mutex kexec_core: accept unaccepted kexec segments' destination addresses watchdog/perf: optimize bytes copied and remove manual NUL-termination lib/interval_tree: fix the comment of interval_tree_span_iter_next_gap() lib/interval_tree: skip the check before go to the right subtree lib/interval_tree: add test case for span iteration lib/interval_tree: add test case for interval_tree_iter_xxx() helpers lib/rbtree: add random seed lib/rbtree: split tests lib/rbtree: enable userland test suite for rbtree related data structure checkpatch: describe --min-conf-desc-length scripts/gdb/symbols: determine KASLR offset on s390 ...
2 parents eb0ece1 + 434333d commit d6b0219

File tree

107 files changed

+1388
-623
lines changed

Some content is hidden

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

107 files changed

+1388
-623
lines changed

.mailmap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ Alexander Lobakin <alobakin@pm.me> <alobakin@marvell.com>
3131
Alexander Lobakin <alobakin@pm.me> <bloodyreaper@yandex.ru>
3232
Alexander Mikhalitsyn <alexander@mihalicyn.com> <alexander.mikhalitsyn@virtuozzo.com>
3333
Alexander Mikhalitsyn <alexander@mihalicyn.com> <aleksandr.mikhalitsyn@canonical.com>
34+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <alexander.sverdlin.ext@nsn.com>
35+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <alexander.sverdlin@gmx.de>
36+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <alexander.sverdlin@nokia.com>
37+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <alexander.sverdlin@nsn.com>
38+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <alexander.sverdlin@siemens.com>
39+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <alexander.sverdlin@sysgo.com>
40+
Alexander Sverdlin <alexander.sverdlin@gmail.com> <subaparts@yandex.ru>
3441
Alexandre Belloni <alexandre.belloni@bootlin.com> <alexandre.belloni@free-electrons.com>
3542
Alexandre Ghiti <alex@ghiti.fr> <alexandre.ghiti@canonical.com>
3643
Alexei Avshalom Lazar <quic_ailizaro@quicinc.com> <ailizaro@codeaurora.org>
@@ -153,7 +160,6 @@ Carlos Bilbao <carlos.bilbao@kernel.org> <carlos.bilbao@amd.com>
153160
Carlos Bilbao <carlos.bilbao@kernel.org> <carlos.bilbao.osdev@gmail.com>
154161
Carlos Bilbao <carlos.bilbao@kernel.org> <bilbao@vt.edu>
155162
Changbin Du <changbin.du@intel.com> <changbin.du@gmail.com>
156-
Changbin Du <changbin.du@intel.com> <changbin.du@intel.com>
157163
Chao Yu <chao@kernel.org> <chao2.yu@samsung.com>
158164
Chao Yu <chao@kernel.org> <yuchao0@huawei.com>
159165
Chester Lin <chester62515@gmail.com> <clin@suse.com>
@@ -271,6 +277,7 @@ Hamza Mahfooz <hamzamahfooz@linux.microsoft.com> <hamza.mahfooz@amd.com>
271277
Hanjun Guo <guohanjun@huawei.com> <hanjun.guo@linaro.org>
272278
Hans Verkuil <hverkuil@xs4all.nl> <hansverk@cisco.com>
273279
Hans Verkuil <hverkuil@xs4all.nl> <hverkuil-cisco@xs4all.nl>
280+
Harry Yoo <harry.yoo@oracle.com> <42.hyeyoo@gmail.com>
274281
Heiko Carstens <hca@linux.ibm.com> <h.carstens@de.ibm.com>
275282
Heiko Carstens <hca@linux.ibm.com> <heiko.carstens@de.ibm.com>
276283
Heiko Stuebner <heiko@sntech.de> <heiko.stuebner@bqreaders.com>
@@ -305,7 +312,6 @@ Jan Glauber <jan.glauber@gmail.com> <jglauber@cavium.com>
305312
Jan Kuliga <jtkuliga.kdev@gmail.com> <jankul@alatek.krakow.pl>
306313
Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@linux.intel.com>
307314
Jarkko Sakkinen <jarkko@kernel.org> <jarkko@profian.com>
308-
Jarkko Sakkinen <jarkko@kernel.org> <jarkko.sakkinen@parity.io>
309315
Jason Gunthorpe <jgg@ziepe.ca> <jgg@mellanox.com>
310316
Jason Gunthorpe <jgg@ziepe.ca> <jgg@nvidia.com>
311317
Jason Gunthorpe <jgg@ziepe.ca> <jgunthorpe@obsidianresearch.com>
@@ -762,7 +768,6 @@ Vinod Koul <vkoul@kernel.org> <vkoul@infradead.org>
762768
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
763769
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
764770
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
765-
Viresh Kumar <viresh.kumar@linaro.org> <viresh.kumar@linaro.org>
766771
Viresh Kumar <viresh.kumar@linaro.org> <viresh.kumar@linaro.com>
767772
Vishnu Dasa <vishnu.dasa@broadcom.com> <vdasa@vmware.com>
768773
Vivek Aknurwar <quic_viveka@quicinc.com> <viveka@codeaurora.org>

Documentation/ABI/testing/sysfs-kernel-reboot

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ KernelVersion: 5.11
3030
Contact: Matteo Croce <mcroce@microsoft.com>
3131
Description: Don't wait for any other CPUs on reboot and
3232
avoid anything that could hang.
33+
34+
What: /sys/kernel/reboot/hw_protection
35+
Date: April 2025
36+
KernelVersion: 6.15
37+
Contact: Ahmad Fatoum <a.fatoum@pengutronix.de>
38+
Description: Hardware protection action taken on critical events like
39+
overtemperature or imminent voltage loss.
40+
Valid values are: reboot shutdown

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,6 +1954,12 @@
19541954
which allow the hypervisor to 'idle' the guest
19551955
on lock contention.
19561956

1957+
hw_protection= [HW]
1958+
Format: reboot | shutdown
1959+
1960+
Hardware protection action taken on critical events like
1961+
overtemperature or imminent voltage loss.
1962+
19571963
i2c_bus= [HW] Override the default board specific I2C bus speed
19581964
or register an additional I2C bus that is not
19591965
registered from board initialization code.

Documentation/devicetree/bindings/thermal/thermal-zones.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ patternProperties:
8282
$ref: /schemas/types.yaml#/definitions/string
8383
description: |
8484
The action the OS should perform after the critical temperature is reached.
85-
By default the system will shutdown as a safe action to prevent damage
86-
to the hardware, if the property is not set.
87-
The shutdown action should be always the default and preferred one.
85+
If the property is not set, it is up to the system to select the correct
86+
action. The recommended and preferred default is shutdown.
8887
Choose 'reboot' with care, as the hardware may be in thermal stress,
8988
thus leading to infinite reboots that may cause damage to the hardware.
9089
Make sure the firmware/bootloader will act as the last resort and take

Documentation/driver-api/thermal/sysfs-api.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -413,18 +413,21 @@ This function serves as an arbitrator to set the state of a cooling
413413
device. It sets the cooling device to the deepest cooling state if
414414
possible.
415415

416-
5. thermal_emergency_poweroff
417-
=============================
416+
5. Critical Events
417+
==================
418+
419+
On an event of critical trip temperature crossing, the thermal framework
420+
will trigger a hardware protection power-off (shutdown) or reboot,
421+
depending on configuration.
418422

419-
On an event of critical trip temperature crossing the thermal framework
420-
shuts down the system by calling hw_protection_shutdown(). The
421-
hw_protection_shutdown() first attempts to perform an orderly shutdown
422-
but accepts a delay after which it proceeds doing a forced power-off
423-
or as last resort an emergency_restart.
423+
At first, the kernel will attempt an orderly power-off or reboot, but
424+
accepts a delay after which it proceeds to do a forced power-off or
425+
reboot, respectively. If this fails, ``emergency_restart()`` is invoked
426+
as last resort.
424427

425428
The delay should be carefully profiled so as to give adequate time for
426-
orderly poweroff.
429+
orderly power-off or reboot.
427430

428-
If the delay is set to 0 emergency poweroff will not be supported. So a
429-
carefully profiled non-zero positive value is a must for emergency
430-
poweroff to be triggered.
431+
If the delay is set to 0, the emergency action will not be supported. So a
432+
carefully profiled non-zero positive value is a must for the emergency
433+
action to be triggered.

Documentation/filesystems/proc.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,16 @@ process running on the system, which is named after the process ID (PID).
128128
The link 'self' points to the process reading the file system. Each process
129129
subdirectory has the entries listed in Table 1-1.
130130

131+
A process can read its own information from /proc/PID/* with no extra
132+
permissions. When reading /proc/PID/* information for other processes, reading
133+
process is required to have either CAP_SYS_PTRACE capability with
134+
PTRACE_MODE_READ access permissions, or, alternatively, CAP_PERFMON
135+
capability. This applies to all read-only information like `maps`, `environ`,
136+
`pagemap`, etc. The only exception is `mem` file due to its read-write nature,
137+
which requires CAP_SYS_PTRACE capabilities with more elevated
138+
PTRACE_MODE_ATTACH permissions; CAP_PERFMON capability does not grant access
139+
to /proc/PID/mem for other processes.
140+
131141
Note that an open file descriptor to /proc/<pid> or to any of its
132142
contained files or subdirectories does not prevent <pid> being reused
133143
for some other process in the event that <pid> exits. Operations on

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18802,6 +18802,7 @@ F: mm/percpu*.c
1880218802

1880318803
PER-TASK DELAY ACCOUNTING
1880418804
M: Balbir Singh <bsingharora@gmail.com>
18805+
M: Yang Yang <yang.yang29@zte.com.cn>
1880518806
S: Maintained
1880618807
F: include/linux/delayacct.h
1880718808
F: kernel/delayacct.c
@@ -22153,7 +22154,7 @@ M: Joonsoo Kim <iamjoonsoo.kim@lge.com>
2215322154
M: Andrew Morton <akpm@linux-foundation.org>
2215422155
M: Vlastimil Babka <vbabka@suse.cz>
2215522156
R: Roman Gushchin <roman.gushchin@linux.dev>
22156-
R: Hyeonggon Yoo <42.hyeyoo@gmail.com>
22157+
R: Harry Yoo <harry.yoo@oracle.com>
2215722158
L: linux-mm@kvack.org
2215822159
S: Maintained
2215922160
T: git git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git

arch/arm64/mm/init.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,19 @@ static void __init arch_reserve_crashkernel(void)
9898
{
9999
unsigned long long low_size = 0;
100100
unsigned long long crash_base, crash_size;
101-
char *cmdline = boot_command_line;
102101
bool high = false;
103102
int ret;
104103

105104
if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
106105
return;
107106

108-
ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
107+
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
109108
&crash_size, &crash_base,
110109
&low_size, &high);
111110
if (ret)
112111
return;
113112

114-
reserve_crashkernel_generic(cmdline, crash_size, crash_base,
115-
low_size, high);
113+
reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
116114
}
117115

118116
static phys_addr_t __init max_zone_phys(phys_addr_t zone_limit)

arch/loongarch/kernel/setup.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,18 +259,17 @@ static void __init arch_reserve_crashkernel(void)
259259
int ret;
260260
unsigned long long low_size = 0;
261261
unsigned long long crash_base, crash_size;
262-
char *cmdline = boot_command_line;
263262
bool high = false;
264263

265264
if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
266265
return;
267266

268-
ret = parse_crashkernel(cmdline, memblock_phys_mem_size(),
267+
ret = parse_crashkernel(boot_command_line, memblock_phys_mem_size(),
269268
&crash_size, &crash_base, &low_size, &high);
270269
if (ret)
271270
return;
272271

273-
reserve_crashkernel_generic(cmdline, crash_size, crash_base, low_size, high);
272+
reserve_crashkernel_generic(crash_size, crash_base, low_size, high);
274273
}
275274

276275
static void __init fdt_setup(void)

arch/powerpc/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,9 @@ config ARCH_SUPPORTS_CRASH_HOTPLUG
716716
def_bool y
717717
depends on PPC64
718718

719+
config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
720+
def_bool CRASH_RESERVE
721+
719722
config FA_DUMP
720723
bool "Firmware-assisted dump"
721724
depends on CRASH_DUMP && PPC64 && (PPC_RTAS || PPC_POWERNV)

0 commit comments

Comments
 (0)