Skip to contentSkip to conversation

6.6.70-rc1 review

PATCH In review Greg Kroah-Hartman 19 participants 257 messages Jan 6, 2025 – Jan 10, 2025 Page 3 of 3

Subsystems (4)
lore
Share & tools
lore
#86 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

In reply to Greg Kroah-Hartman

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

# end of Kexec and crash features
# end of General setup
Quoted 265 lines

------------------

From: Baoquan He <[email protected]>

[ Upstream commit a4eeb2176d89fdf2785851521577b94b31690a60 ]

Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on x86 with some adjustments.

Here, also change some ifdefs or IS_ENABLED() check to more appropriate ones, e,g
- #ifdef CONFIG_KEXEC_CORE -> #ifdef CONFIG_CRASH_DUMP
- (!IS_ENABLED(CONFIG_KEXEC_CORE)) - > (!IS_ENABLED(CONFIG_CRASH_RESERVE))

[[email protected]: don't nest CONFIG_CRASH_DUMP ifdef inside CONFIG_KEXEC_CODE ifdef scope]
Cc Al Viro <[email protected]>
Cc Eric W. Biederman <[email protected]>
Cc Hari Bathini <[email protected]>
Cc Pingfan Liu <[email protected]>
Cc Klara Modin <[email protected]>
Cc Michael Kelley <[email protected]>
Cc Nathan Chancellor <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Yang Li <[email protected]>

Stable-dep-of: bcc80dec91ee ("x86/hyperv: Fix hv tsc page based sched_clock for hibernation")

---

arch/x86/kernel/Makefile           |  4 ++--
arch/x86/kernel/cpu/mshyperv.c     | 10 ++++++++--
arch/x86/kernel/kexec-bzimage64.c  |  4 ++++
arch/x86/kernel/kvm.c              |  4 ++--
arch/x86/kernel/machine_kexec_64.c |  3 +++
arch/x86/kernel/reboot.c           |  4 ++--
arch/x86/kernel/setup.c            |  2 +-
arch/x86/kernel/smp.c              |  2 +-
arch/x86/xen/enlighten_hvm.c       |  4 ++++
arch/x86/xen/mmu_pv.c              |  2 +-
10 files changed, 28 insertions(+), 11 deletions(-)
arch/x86/kernel/Makefile +0 -0
index 3269a0e23d3a..15fc9fc3dcf0 100644
@@ -99,9 +99,9 @@ obj-$(CONFIG_TRACING) += trace.o

obj-$(CONFIG_RETHOOK) += rethook.o obj-$(CONFIG_CRASH_CORE) += crash_core_$(BITS).o obj-$(CONFIG_KEXEC_CORE) += machine_kexec_$(BITS).o

arch/x86/kernel/Makefile +1 -1
-obj-$(CONFIG_KEXEC_CORE) += relocate_kernel_$(BITS).o crash.o
+obj-$(CONFIG_KEXEC_CORE) += relocate_kernel_$(BITS).o

obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o

arch/x86/kernel/Makefile +1 -1
-obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o
+obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o crash.o

obj-y += kprobes/
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_X86_32) += doublefault_32.o

arch/x86/kernel/cpu/mshyperv.c +8 -2
index bcb2d640a0cd..93e1cb4f7ff1 100644
@@ -209,7 +209,9 @@ static void hv_machine_shutdown(void)
 if (kexec_in_progress)
 hyperv_cleanup();
 }
+#endif /* CONFIG_KEXEC_CORE */
 
+#ifdef CONFIG_CRASH_DUMP
 static void hv_machine_crash_shutdown(struct pt_regs *regs)
 {
 if (hv_crash_handler)
@@ -221,7 +223,7 @@ static void hv_machine_crash_shutdown(struct pt_regs *regs)
 /* Disable the hypercall page when there is only 1 active CPU. */
 hyperv_cleanup();
 }
-#endif /* CONFIG_KEXEC_CORE */
+#endif /* CONFIG_CRASH_DUMP */
 #endif /* CONFIG_HYPERV */
 
 static uint32_t  __init ms_hyperv_platform(void)
@@ -493,9 +495,13 @@ static void __init ms_hyperv_init_platform(void)
 no_timer_check = 1;
 #endif
 
-#if IS_ENABLED(CONFIG_HYPERV) && defined(CONFIG_KEXEC_CORE)
+#if IS_ENABLED(CONFIG_HYPERV)
+#if defined(CONFIG_KEXEC_CORE)
 machine_ops.shutdown = hv_machine_shutdown;
+#endif
+#if defined(CONFIG_CRASH_DUMP)
 machine_ops.crash_shutdown = hv_machine_crash_shutdown;
+#endif
 #endif
 if (ms_hyperv.features & HV_ACCESS_TSC_INVARIANT) {
 /*
arch/x86/kernel/kexec-bzimage64.c +4 -0
index a61c12c01270..0de509c02d18 100644
@@ -263,11 +263,13 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params,
 memset(&params->hd0_info, 0, sizeof(params->hd0_info));
 memset(&params->hd1_info, 0, sizeof(params->hd1_info));
 
+#ifdef CONFIG_CRASH_DUMP
 if (image->type == KEXEC_TYPE_CRASH) {
 ret = crash_setup_memmap_entries(image, params);
 if (ret)
 return ret;
 } else
+#endif
 setup_e820_entries(params);
 
 nr_e820_entries = params->e820_entries;
@@ -428,12 +430,14 @@ static void *bzImage64_load(struct kimage *image, char *kernel,
 return ERR_PTR(-EINVAL);
 }
 
+#ifdef CONFIG_CRASH_DUMP
 /* Allocate and load backup region */
 if (image->type == KEXEC_TYPE_CRASH) {
 ret = crash_load_segments(image);
 if (ret)
 return ERR_PTR(ret);
 }
+#endif
 
 /*
 * Load purgatory. For 64bit entry point, purgatory  code can be
arch/x86/kernel/kvm.c +2 -2
index b8ab9ee5896c..38d88c8b56ec 100644
@@ -769,7 +769,7 @@ static struct notifier_block kvm_pv_reboot_nb = {
 * won't be valid. In cases like kexec, in which you install a new kernel, this
 * means a random memory location will be kept being written.
 */
-#ifdef CONFIG_KEXEC_CORE
+#ifdef CONFIG_CRASH_DUMP
 static void kvm_crash_shutdown(struct pt_regs *regs)
 {
 kvm_guest_cpu_offline(true);
@@ -852,7 +852,7 @@ static void __init kvm_guest_init(void)
 kvm_guest_cpu_init();
 #endif
 
-#ifdef CONFIG_KEXEC_CORE
+#ifdef CONFIG_CRASH_DUMP
 machine_ops.crash_shutdown = kvm_crash_shutdown;
 #endif
 
arch/x86/kernel/machine_kexec_64.c +2 -0
index 2fa12d1dc676..aaeac2deb85d 100644
@@ -545,6 +545,8 @@ int arch_kimage_file_post_load_cleanup(struct kimage *image)
 }
 #endif /* CONFIG_KEXEC_FILE */
 
+#ifdef CONFIG_CRASH_DUMP
+

static int
kexec_mark_range(unsigned long start, unsigned long end, bool protect) {

arch/x86/kernel/machine_kexec_64.c +1 -0
@@ -589,6 +591,7 @@ void arch_kexec_unprotect_crashkres(void)
 {
 kexec_mark_crashkres(false);
 }
+#endif
 
 /*
 * During a traditional boot under SME, SME will encrypt the kernel,
arch/x86/kernel/reboot.c +2 -2
index 830425e6d38e..f3130f762784 100644
@@ -796,7 +796,7 @@ struct machine_ops machine_ops __ro_after_init = {
 .emergency_restart = native_machine_emergency_restart,
 .restart = native_machine_restart,
 .halt = native_machine_halt,
-#ifdef CONFIG_KEXEC_CORE
+#ifdef CONFIG_CRASH_DUMP
 .crash_shutdown = native_machine_crash_shutdown,
 #endif
 };
@@ -826,7 +826,7 @@ void machine_halt(void)
 machine_ops.halt();
 }
 
-#ifdef CONFIG_KEXEC_CORE
+#ifdef CONFIG_CRASH_DUMP
 void machine_crash_shutdown(struct pt_regs *regs)
 {
 machine_ops.crash_shutdown(regs);
arch/x86/kernel/setup.c +1 -1
index eb129277dcdd..8bcecabd475b 100644
@@ -547,7 +547,7 @@ static void __init reserve_crashkernel(void)
 bool high = false;
 int ret;
 
- if (!IS_ENABLED(CONFIG_KEXEC_CORE))
+ if (!IS_ENABLED(CONFIG_CRASH_RESERVE))
 return;
 
 total_mem = memblock_phys_mem_size();
arch/x86/kernel/smp.c +1 -1
index 96a771f9f930..52c3823b7211 100644
@@ -282,7 +282,7 @@ struct smp_ops smp_ops = {
 .smp_cpus_done = native_smp_cpus_done,
 
 .stop_other_cpus = native_stop_other_cpus,
-#if defined(CONFIG_KEXEC_CORE)
+#if defined(CONFIG_CRASH_DUMP)
 .crash_stop_other_cpus = kdump_nmi_shootdown_cpus,
 #endif
 .smp_send_reschedule = native_smp_send_reschedule,
arch/x86/xen/enlighten_hvm.c +4 -0
index 70be57e8f51c..ade22feee7ae 100644
@@ -141,7 +141,9 @@ static void xen_hvm_shutdown(void)
 if (kexec_in_progress)
 xen_reboot(SHUTDOWN_soft_reset);
 }
+#endif
 
+#ifdef CONFIG_CRASH_DUMP
 static void xen_hvm_crash_shutdown(struct pt_regs *regs)
 {
 native_machine_crash_shutdown(regs);
@@ -229,6 +231,8 @@ static void __init xen_hvm_guest_init(void)
 
 #ifdef CONFIG_KEXEC_CORE
 machine_ops.shutdown = xen_hvm_shutdown;
+#endif
+#ifdef CONFIG_CRASH_DUMP
 machine_ops.crash_shutdown = xen_hvm_crash_shutdown;
 #endif
 }
arch/x86/xen/mmu_pv.c +1 -1
index 6b201e64d8ab..bfd57d07f4b5 100644
@@ -2517,7 +2517,7 @@ int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
 }
 EXPORT_SYMBOL_GPL(xen_remap_pfn);
 
-#ifdef CONFIG_KEXEC_CORE
+#ifdef CONFIG_VMCORE_INFO
 phys_addr_t paddr_vmcoreinfo_note(void)
 {
 if (xen_pv_domain())
Signature · 1 line
2.39.5
author maintainer
#87 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

Quoted 32 lines · Ignat Korchagin

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

Quoted 2 lines
# end of Kexec and crash features
# end of General setup

Odd, why has no one see this on mainline? Are we missing a change somewhere or should this just be reverted for now?

thanks,

greg k-h

#88 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

Quoted 37 lines · Greg Kroah-Hartman
Quoted 32 lines · Ignat Korchagin

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

Quoted 2 lines
# end of Kexec and crash features
# end of General setup
Quoted 2 lines

Odd, why has no one see this on mainline? Are we missing a change somewhere or should this just be reverted for now?

I actually tested the mainline with this config and it works, so I think we're missing a change

Ignat

Quoted 3 lines

thanks,

greg k-h

#89 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

Quoted 40 lines · Ignat Korchagin
Quoted 37 lines · Greg Kroah-Hartman
Quoted 34 lines · Ignat Korchagin

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

# end of Kexec and crash features
# end of General setup
Quoted 7 lines
Quoted 2 lines

Odd, why has no one see this on mainline? Are we missing a change somewhere or should this just be reverted for now?

I actually tested the mainline with this config and it works, so I think we're missing a change

Ignat

From the looks of it it is missing 02aff8480533 ("crash: split crash dumping code out from kexec_core.c")

Ignat

Quoted 3 lines
Quoted 3 lines

thanks,

greg k-h

author maintainer
#90 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

Quoted 44 lines · Ignat Korchagin
Quoted 43 lines · Ignat Korchagin
Quoted 39 lines · Greg Kroah-Hartman
Quoted 32 lines · Ignat Korchagin

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

Quoted 2 lines
# end of Kexec and crash features
# end of General setup

Odd, why has no one see this on mainline? Are we missing a change somewhere or should this just be reverted for now?

Quoted 7 lines
Quoted 6 lines

I actually tested the mainline with this config and it works, so I think we're missing a change

Ignat

From the looks of it it is missing 02aff8480533 ("crash: split crash

dumping code out from kexec_core.c")

Ok, I can duplicate this here now, but wow, backporting that commit is not going to work. Let me see if I can just revert a few things instead...

thanks for the .config section, that helped out a lot!

greg k-h

#91 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

Quoted 49 lines · Greg Kroah-Hartman
Quoted 47 lines · Ignat Korchagin
Quoted 46 lines · Ignat Korchagin
Quoted 37 lines · Greg Kroah-Hartman
Quoted 32 lines · Ignat Korchagin

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

Quoted 2 lines
# end of Kexec and crash features
# end of General setup
Quoted 2 lines

Odd, why has no one see this on mainline? Are we missing a change somewhere or should this just be reverted for now?

I actually tested the mainline with this config and it works, so I think we're missing a change

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

Ignat

From the looks of it it is missing 02aff8480533 ("crash: split crash

dumping code out from kexec_core.c")

Ok, I can duplicate this here now, but wow, backporting that commit is not going to work. Let me see if I can just revert a few things instead...

Yeah, I tried that yesterday, but saw it is not that trivial. Thank you!

Quoted 3 lines

thanks for the .config section, that helped out a lot!

greg k-h

author maintainer
#92 lore raw

Re: [PATCH 6.6 079/222] x86, crash: wrap crash dumping code into crash related ifdefs

Quoted 53 lines · Ignat Korchagin
Quoted 51 lines · Greg Kroah-Hartman
Quoted 49 lines · Ignat Korchagin
Quoted 47 lines · Ignat Korchagin
Quoted 37 lines · Greg Kroah-Hartman
Quoted 32 lines · Ignat Korchagin

Hi,

Quoted 3 lines · Greg Kroah-Hartman

6.6-stable review patch. If anyone has any objections, please let me know.

I think this back port breaks 6.6 build (namely vmlinux.o link stage):

  LD [M]  net/netfilter/xt_nat.ko
  LD [M]  net/netfilter/xt_addrtype.ko
  LD [M]  net/ipv4/netfilter/iptable_nat.ko
  UPD     include/generated/utsversion.h
  CC      init/version-timestamp.o
  LD      .tmp_vmlinux.kallsyms1

ld: vmlinux.o: in function `__crash_kexec':
(.text+0x15a93a): undefined reference to `machine_crash_shutdown'
ld: vmlinux.o: in function `__do_sys_kexec_file_load':
kexec_file.c:(.text+0x15cef1): undefined reference to `arch_kexec_protect_crashkres'
ld: kexec_file.c:(.text+0x15cf28): undefined reference to `arch_kexec_unprotect_crashkres' make[2]: *** [scripts/Makefile.vmlinux:37: vmlinux] Error 1
make[1]: *** [/home/ignat/git/test/mainline/linux-6.6.70/Makefile:1164: vmlinux] Error 2
make: *** [Makefile:234: __sub-make] Error 2

The KEXEC config setup, which triggers above:

# Kexec and crash features
#
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
# CONFIG_KEXEC is not set
CONFIG_KEXEC_FILE=y
# CONFIG_KEXEC_SIG is not set
# CONFIG_CRASH_DUMP is not set

Quoted 2 lines
# end of Kexec and crash features
# end of General setup
Quoted 2 lines

Odd, why has no one see this on mainline? Are we missing a change somewhere or should this just be reverted for now?

I actually tested the mainline with this config and it works, so I think we're missing a change

Ignat

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line

From the looks of it it is missing 02aff8480533 ("crash: split crash

dumping code out from kexec_core.c")

Ok, I can duplicate this here now, but wow, backporting that commit is not going to work. Let me see if I can just revert a few things instead...

Yeah, I tried that yesterday, but saw it is not that trivial. Thank you!

Should be fixed in the 6.6.71 release now, if not, please let me know.

thanks,

greg k-h