Skip to content

Commit 5739ae2

Browse files
committed
Merge: Rebase kexec/kdump to upstream kernel v6.5
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4053 ``` JIRA: https://issues.redhat.com/browse/RHEL-32199 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git This rebase kexec/kdump of rhel9 kernel to v6.5 of mainline kernel. This is for rhel9.5. Last time rebase was done in rhel9.2 and synchronized to v6.0. Signed-off-by: Baoquan He <bhe@redhat.com> ``` Approved-by: Vladis Dronov <vdronov@redhat.com> Approved-by: Rafael Aquini <aquini@redhat.com> Approved-by: Lenny Szubowicz <lszubowi@redhat.com> Approved-by: Lichen Liu <lichliu@redhat.com> Approved-by: Tao Liu <ltao@redhat.com> Approved-by: Pingfan Liu <piliu@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 3f3da21 + 44a51c6 commit 5739ae2

Some content is hidden

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

58 files changed

+348
-153
lines changed

Documentation/admin-guide/kdump/vmcoreinfo.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,14 @@ architecture which is used to lookup the page-tables for the Virtual
494494
addresses in the higher VA range (refer to ARMv8 ARM document for
495495
more details).
496496

497+
MODULES_VADDR|MODULES_END|VMALLOC_START|VMALLOC_END|VMEMMAP_START|VMEMMAP_END
498+
-----------------------------------------------------------------------------
499+
500+
Used to get the correct ranges:
501+
MODULES_VADDR ~ MODULES_END-1 : Kernel module space.
502+
VMALLOC_START ~ VMALLOC_END-1 : vmalloc() / ioremap() space.
503+
VMEMMAP_START ~ VMEMMAP_END-1 : vmemmap region, used for struct page array.
504+
497505
arm
498506
===
499507

Documentation/admin-guide/sysctl/kernel.rst

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,16 +473,35 @@ io_uring instances.
473473
kexec_load_disabled
474474
===================
475475

476-
A toggle indicating if the ``kexec_load`` syscall has been disabled.
477-
This value defaults to 0 (false: ``kexec_load`` enabled), but can be
478-
set to 1 (true: ``kexec_load`` disabled).
476+
A toggle indicating if the syscalls ``kexec_load`` and
477+
``kexec_file_load`` have been disabled.
478+
This value defaults to 0 (false: ``kexec_*load`` enabled), but can be
479+
set to 1 (true: ``kexec_*load`` disabled).
479480
Once true, kexec can no longer be used, and the toggle cannot be set
480481
back to false.
481482
This allows a kexec image to be loaded before disabling the syscall,
482483
allowing a system to set up (and later use) an image without it being
483484
altered.
484485
Generally used together with the `modules_disabled`_ sysctl.
485486

487+
kexec_load_limit_panic
488+
======================
489+
490+
This parameter specifies a limit to the number of times the syscalls
491+
``kexec_load`` and ``kexec_file_load`` can be called with a crash
492+
image. It can only be set with a more restrictive value than the
493+
current one.
494+
495+
== ======================================================
496+
-1 Unlimited calls to kexec. This is the default setting.
497+
N Number of calls left.
498+
== ======================================================
499+
500+
kexec_load_limit_reboot
501+
=======================
502+
503+
Similar functionality as ``kexec_load_limit_panic``, but for a normal
504+
image.
486505

487506
kptr_restrict
488507
=============

arch/arm/kernel/machine_kexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void machine_kexec_cleanup(struct kimage *image)
7373
{
7474
}
7575

76-
void machine_crash_nonpanic_core(void *unused)
76+
static void machine_crash_nonpanic_core(void *unused)
7777
{
7878
struct pt_regs regs;
7979

arch/arm64/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ config ARM64_TAGGED_ADDR_ABI
15861586
When this option is enabled, user applications can opt in to a
15871587
relaxed ABI via prctl() allowing tagged addresses to be passed
15881588
to system calls as pointer arguments. For details, see
1589-
Documentation/arm64/tagged-address-abi.rst.
1589+
Documentation/arch/arm64/tagged-address-abi.rst.
15901590

15911591
menuconfig COMPAT
15921592
bool "Kernel support for 32-bit EL0"
@@ -2047,7 +2047,7 @@ config ARM64_MTE
20472047
explicitly opt in. The mechanism for the userspace is
20482048
described in:
20492049

2050-
Documentation/arm64/memory-tagging-extension.rst.
2050+
Documentation/arch/arm64/memory-tagging-extension.rst.
20512051

20522052
endmenu # "ARMv8.5 architectural features"
20532053

arch/arm64/include/asm/efi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ efi_status_t __efi_rt_asm_wrapper(void *, const char *, ...);
8888
* guaranteed to cover the kernel Image.
8989
*
9090
* Since the EFI stub is part of the kernel Image, we can relax the
91-
* usual requirements in Documentation/arm64/booting.rst, which still
91+
* usual requirements in Documentation/arch/arm64/booting.rst, which still
9292
* apply to other bootloaders, and are required for some kernel
9393
* configurations.
9494
*/

arch/arm64/include/asm/image.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/*
2929
* struct arm64_image_header - arm64 kernel image header
30-
* See Documentation/arm64/booting.rst for details
30+
* See Documentation/arch/arm64/booting.rst for details
3131
*
3232
* @code0: Executable code, or
3333
* @mz_header alternatively used for part of MZ header

arch/arm64/include/uapi/asm/sigcontext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct zt_context {
173173
* vector length beyond its initial architectural limit of 2048 bits
174174
* (16 quadwords).
175175
*
176-
* See linux/Documentation/arm64/sve.rst for a description of the VL/VQ
176+
* See linux/Documentation/arch/arm64/sve.rst for a description of the VL/VQ
177177
* terminology.
178178
*/
179179
#define SVE_VQ_BYTES __SVE_VQ_BYTES /* bytes per quadword */

arch/arm64/kernel/crash_core.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ void arch_crash_save_vmcoreinfo(void)
2121
{
2222
VMCOREINFO_NUMBER(VA_BITS);
2323
/* Please note VMCOREINFO_NUMBER() uses "%d", not "%x" */
24+
vmcoreinfo_append_str("NUMBER(MODULES_VADDR)=0x%lx\n", MODULES_VADDR);
25+
vmcoreinfo_append_str("NUMBER(MODULES_END)=0x%lx\n", MODULES_END);
26+
vmcoreinfo_append_str("NUMBER(VMALLOC_START)=0x%lx\n", VMALLOC_START);
27+
vmcoreinfo_append_str("NUMBER(VMALLOC_END)=0x%lx\n", VMALLOC_END);
28+
vmcoreinfo_append_str("NUMBER(VMEMMAP_START)=0x%lx\n", VMEMMAP_START);
29+
vmcoreinfo_append_str("NUMBER(VMEMMAP_END)=0x%lx\n", VMEMMAP_END);
2430
vmcoreinfo_append_str("NUMBER(kimage_voffset)=0x%llx\n",
2531
kimage_voffset);
2632
vmcoreinfo_append_str("NUMBER(PHYS_OFFSET)=0x%llx\n",

arch/arm64/kernel/kexec_image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static void *image_load(struct kimage *image,
4848

4949
/*
5050
* We require a kernel with an unambiguous Image header. Per
51-
* Documentation/arm64/booting.rst, this is the case when image_size
51+
* Documentation/arch/arm64/booting.rst, this is the case when image_size
5252
* is non-zero (practically speaking, since v3.17).
5353
*/
5454
h = (struct arm64_image_header *)kernel;

arch/powerpc/kexec/file_load_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct umem_info {
3838

3939
/* usable memory ranges to look up */
4040
unsigned int nr_ranges;
41-
const struct crash_mem_range *ranges;
41+
const struct range *ranges;
4242
};
4343

4444
const struct kexec_file_ops * const kexec_file_loaders[] = {

0 commit comments

Comments
 (0)