Skip to content

Commit d7557aa

Browse files
author
CKI KWF Bot
committed
Merge: [RHEL-9.8]Rebase kexec/kdump to the upstream kernel v6.15
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7486 ``` JIRA: https://issues.redhat.com/browse/RHEL-114163 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git This is to sync the rhel9.8 kernel to the latest upstream kernel 6.15, mainly bug fixes and small cleanup, will skip big features. Signed-off-by: Baoquan He <bhe@redhat.com> ``` Approved-by: Steve Best <sbest@redhat.com> Approved-by: Lianbo Jiang <lijiang@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 9745a34 + f0439b8 commit d7557aa

File tree

9 files changed

+32
-4
lines changed

9 files changed

+32
-4
lines changed

arch/arm64/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,9 @@ config ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG
15651565
config ARCH_SUPPORTS_CRASH_DUMP
15661566
def_bool y
15671567

1568+
config ARCH_DEFAULT_CRASH_DUMP
1569+
def_bool y
1570+
15681571
config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
15691572
def_bool CRASH_RESERVE
15701573

arch/mips/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3059,6 +3059,9 @@ config ARCH_SUPPORTS_KEXEC
30593059
config ARCH_SUPPORTS_CRASH_DUMP
30603060
def_bool y
30613061

3062+
config ARCH_DEFAULT_CRASH_DUMP
3063+
def_bool y
3064+
30623065
config PHYSICAL_START
30633066
hex "Physical address where the kernel is loaded"
30643067
default "0xffffffff84000000"

arch/powerpc/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,10 @@ config CRASH_DUMP
591591
config ARCH_SUPPORTS_CRASH_DUMP
592592
def_bool PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
593593

594+
config ARCH_DEFAULT_CRASH_DUMP
595+
bool
596+
default y if !PPC_BOOK3S_32
597+
594598
config ARCH_SELECTS_CRASH_DUMP
595599
def_bool y
596600
depends on CRASH_DUMP

arch/s390/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ config ARCH_SUPPORTS_CRASH_DUMP
277277
This option also enables s390 zfcpdump.
278278
See also <file:Documentation/s390/zfcpdump.rst>
279279

280+
config ARCH_DEFAULT_CRASH_DUMP
281+
def_bool y
282+
280283
menu "Processor type and features"
281284

282285
config HAVE_MARCH_Z10_FEATURES

arch/x86/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,9 @@ config ARCH_SUPPORTS_KEXEC_JUMP
20982098
config ARCH_SUPPORTS_CRASH_DUMP
20992099
def_bool X86_64 || (X86_32 && HIGHMEM)
21002100

2101+
config ARCH_DEFAULT_CRASH_DUMP
2102+
def_bool y
2103+
21012104
config ARCH_SUPPORTS_CRASH_HOTPLUG
21022105
def_bool y
21032106

kernel/Kconfig.kexec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ config KEXEC_JUMP
9797

9898
config CRASH_DUMP
9999
bool "kernel crash dumps"
100-
default y
100+
default ARCH_DEFAULT_CRASH_DUMP
101101
depends on ARCH_SUPPORTS_CRASH_DUMP
102102
depends on KEXEC_CORE
103103
select VMCORE_INFO

kernel/crash_core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,8 @@ int crash_check_hotplug_support(void)
503503
crash_hotplug_lock();
504504
/* Obtain lock while reading crash information */
505505
if (!kexec_trylock()) {
506-
pr_info("kexec_trylock() failed, kdump image may be inaccurate\n");
506+
if (!kexec_in_progress)
507+
pr_info("kexec_trylock() failed, kdump image may be inaccurate\n");
507508
crash_hotplug_unlock();
508509
return 0;
509510
}
@@ -545,7 +546,8 @@ static void crash_handle_hotplug_event(unsigned int hp_action, unsigned int cpu,
545546
crash_hotplug_lock();
546547
/* Obtain lock while changing crash information */
547548
if (!kexec_trylock()) {
548-
pr_info("kexec_trylock() failed, kdump image may be inaccurate\n");
549+
if (!kexec_in_progress)
550+
pr_info("kexec_trylock() failed, kdump image may be inaccurate\n");
549551
crash_hotplug_unlock();
550552
return;
551553
}

kernel/crash_reserve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
132132
cur++;
133133
*crash_base = memparse(cur, &tmp);
134134
if (cur == tmp) {
135-
pr_warn("crahskernel: Memory value expected after '@'\n");
135+
pr_warn("crashkernel: Memory value expected after '@'\n");
136136
return -EINVAL;
137137
}
138138
}

kernel/kexec_core.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@ int sanity_check_segment_list(struct kimage *image)
210210
}
211211
#endif
212212

213+
/*
214+
* The destination addresses are searched from system RAM rather than
215+
* being allocated from the buddy allocator, so they are not guaranteed
216+
* to be accepted by the current kernel. Accept the destination
217+
* addresses before kexec swaps their content with the segments' source
218+
* pages to avoid accessing memory before it is accepted.
219+
*/
220+
for (i = 0; i < nr_segments; i++)
221+
accept_memory(image->segment[i].mem, image->segment[i].memsz);
222+
213223
return 0;
214224
}
215225

0 commit comments

Comments
 (0)