Skip to content

Commit d68b4b6

Browse files
committed
Merge tag 'mm-nonmm-stable-2023-08-28-22-48' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull non-MM updates from Andrew Morton: - An extensive rework of kexec and crash Kconfig from Eric DeVolder ("refactor Kconfig to consolidate KEXEC and CRASH options") - kernel.h slimming work from Andy Shevchenko ("kernel.h: Split out a couple of macros to args.h") - gdb feature work from Kuan-Ying Lee ("Add GDB memory helper commands") - vsprintf inclusion rationalization from Andy Shevchenko ("lib/vsprintf: Rework header inclusions") - Switch the handling of kdump from a udev scheme to in-kernel handling, by Eric DeVolder ("crash: Kernel handling of CPU and memory hot un/plug") - Many singleton patches to various parts of the tree * tag 'mm-nonmm-stable-2023-08-28-22-48' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (81 commits) document while_each_thread(), change first_tid() to use for_each_thread() drivers/char/mem.c: shrink character device's devlist[] array x86/crash: optimize CPU changes crash: change crash_prepare_elf64_headers() to for_each_possible_cpu() crash: hotplug support for kexec_load() x86/crash: add x86 crash hotplug support crash: memory and CPU hotplug sysfs attributes kexec: exclude elfcorehdr from the segment digest crash: add generic infrastructure for crash hotplug support crash: move a few code bits to setup support of crash hotplug kstrtox: consistently use _tolower() kill do_each_thread() nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse scripts/bloat-o-meter: count weak symbol sizes treewide: drop CONFIG_EMBEDDED lockdep: fix static memory detection even more lib/vsprintf: declare no_hash_pointers in sprintf.h lib/vsprintf: split out sprintf() and friends kernel/fork: stop playing lockless games for exe_file replacement adfs: delete unused "union adfs_dirtail" definition ...
2 parents b96a3e9 + dce8f8e commit d68b4b6

File tree

205 files changed

+2853
-1392
lines changed

Some content is hidden

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

205 files changed

+2853
-1392
lines changed

Documentation/ABI/testing/sysfs-devices-memory

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,11 @@ Description:
110110
link is created for memory section 9 on node0.
111111

112112
/sys/devices/system/node/node0/memory9 -> ../../memory/memory9
113+
114+
What: /sys/devices/system/memory/crash_hotplug
115+
Date: Aug 2023
116+
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
117+
Description:
118+
(RO) indicates whether or not the kernel directly supports
119+
modifying the crash elfcorehdr for memory hot un/plug and/or
120+
on/offline changes.

Documentation/ABI/testing/sysfs-devices-system-cpu

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,3 +688,11 @@ Description:
688688
(RO) the list of CPUs that are isolated and don't
689689
participate in load balancing. These CPUs are set by
690690
boot parameter "isolcpus=".
691+
692+
What: /sys/devices/system/cpu/crash_hotplug
693+
Date: Aug 2023
694+
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
695+
Description:
696+
(RO) indicates whether or not the kernel directly supports
697+
modifying the crash elfcorehdr for CPU hot un/plug and/or
698+
on/offline changes.

Documentation/admin-guide/mm/memory-hotplug.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,14 @@ The following files are currently defined:
291291
Availability depends on the CONFIG_ARCH_MEMORY_PROBE
292292
kernel configuration option.
293293
``uevent`` read-write: generic udev file for device subsystems.
294+
``crash_hotplug`` read-only: when changes to the system memory map
295+
occur due to hot un/plug of memory, this file contains
296+
'1' if the kernel updates the kdump capture kernel memory
297+
map itself (via elfcorehdr), or '0' if userspace must update
298+
the kdump capture kernel memory map.
299+
300+
Availability depends on the CONFIG_MEMORY_HOTPLUG kernel
301+
configuration option.
294302
====================== =========================================================
295303

296304
.. note::

Documentation/core-api/cpu_hotplug.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,24 @@ will receive all events. A script like::
741741

742742
can process the event further.
743743

744+
When changes to the CPUs in the system occur, the sysfs file
745+
/sys/devices/system/cpu/crash_hotplug contains '1' if the kernel
746+
updates the kdump capture kernel list of CPUs itself (via elfcorehdr),
747+
or '0' if userspace must update the kdump capture kernel list of CPUs.
748+
749+
The availability depends on the CONFIG_HOTPLUG_CPU kernel configuration
750+
option.
751+
752+
To skip userspace processing of CPU hot un/plug events for kdump
753+
(i.e. the unload-then-reload to obtain a current list of CPUs), this sysfs
754+
file can be used in a udev rule as follows:
755+
756+
SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_reload_end"
757+
758+
For a CPU hot un/plug event, if the architecture supports kernel updates
759+
of the elfcorehdr (which contains the list of CPUs), then the rule skips
760+
the unload-then-reload of the kdump capture kernel.
761+
744762
Kernel Inline Documentations Reference
745763
======================================
746764

arch/Kconfig

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@ source "arch/$(SRCARCH)/Kconfig"
1111

1212
menu "General architecture-dependent options"
1313

14-
config CRASH_CORE
15-
bool
16-
17-
config KEXEC_CORE
18-
select CRASH_CORE
19-
bool
20-
21-
config KEXEC_ELF
22-
bool
23-
24-
config HAVE_IMA_KEXEC
25-
bool
26-
2714
config ARCH_HAS_SUBPAGE_FAULTS
2815
bool
2916
help
@@ -748,7 +735,9 @@ config HAS_LTO_CLANG
748735
depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
749736
depends on ARCH_SUPPORTS_LTO_CLANG
750737
depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
751-
depends on !KASAN || KASAN_HW_TAGS
738+
# https://github.com/ClangBuiltLinux/linux/issues/1721
739+
depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >= 170000) || !DEBUG_INFO
740+
depends on (!KCOV || CLANG_VERSION >= 170000) || !DEBUG_INFO
752741
depends on !GCOV_KERNEL
753742
help
754743
The compiler and Kconfig options support building with Clang's

arch/arc/configs/axs101_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONFIG_NAMESPACES=y
99
# CONFIG_UTS_NS is not set
1010
# CONFIG_PID_NS is not set
1111
CONFIG_BLK_DEV_INITRD=y
12-
CONFIG_EMBEDDED=y
12+
CONFIG_EXPERT=y
1313
CONFIG_PERF_EVENTS=y
1414
# CONFIG_VM_EVENT_COUNTERS is not set
1515
# CONFIG_SLUB_DEBUG is not set

arch/arc/configs/axs103_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONFIG_NAMESPACES=y
99
# CONFIG_UTS_NS is not set
1010
# CONFIG_PID_NS is not set
1111
CONFIG_BLK_DEV_INITRD=y
12-
CONFIG_EMBEDDED=y
12+
CONFIG_EXPERT=y
1313
CONFIG_PERF_EVENTS=y
1414
# CONFIG_VM_EVENT_COUNTERS is not set
1515
# CONFIG_SLUB_DEBUG is not set

arch/arc/configs/axs103_smp_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONFIG_NAMESPACES=y
99
# CONFIG_UTS_NS is not set
1010
# CONFIG_PID_NS is not set
1111
CONFIG_BLK_DEV_INITRD=y
12-
CONFIG_EMBEDDED=y
12+
CONFIG_EXPERT=y
1313
CONFIG_PERF_EVENTS=y
1414
# CONFIG_VM_EVENT_COUNTERS is not set
1515
# CONFIG_COMPAT_BRK is not set

arch/arc/configs/haps_hs_smp_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CONFIG_NAMESPACES=y
1111
# CONFIG_UTS_NS is not set
1212
# CONFIG_PID_NS is not set
1313
CONFIG_BLK_DEV_INITRD=y
14-
CONFIG_EMBEDDED=y
14+
CONFIG_EXPERT=y
1515
CONFIG_PERF_EVENTS=y
1616
# CONFIG_VM_EVENT_COUNTERS is not set
1717
# CONFIG_COMPAT_BRK is not set

arch/arc/configs/hsdk_defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONFIG_NAMESPACES=y
99
# CONFIG_PID_NS is not set
1010
CONFIG_BLK_DEV_INITRD=y
1111
CONFIG_BLK_DEV_RAM=y
12-
CONFIG_EMBEDDED=y
12+
CONFIG_EXPERT=y
1313
CONFIG_PERF_EVENTS=y
1414
# CONFIG_VM_EVENT_COUNTERS is not set
1515
# CONFIG_COMPAT_BRK is not set

0 commit comments

Comments
 (0)