linux-stable/arch/arm/kernel
Baoquan He dccf78d39f kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP
Ignat Korchagin complained that a potential config regression was
introduced by commit 89cde45591 ("kexec: consolidate kexec and crash
options into kernel/Kconfig.kexec").  Before the commit, CONFIG_CRASH_DUMP
has no dependency on CONFIG_KEXEC.  After the commit, CRASH_DUMP selects
KEXEC.  That enforces system to have CONFIG_KEXEC=y as long as
CONFIG_CRASH_DUMP=Y which people may not want.

In Ignat's case, he sets CONFIG_CRASH_DUMP=y, CONFIG_KEXEC_FILE=y and
CONFIG_KEXEC=n because kexec_load interface could have security issue if
kernel/initrd has no chance to be signed and verified.

CRASH_DUMP has select of KEXEC because Eric, author of above commit, met a
LKP report of build failure when posting patch of earlier version.  Please
see below link to get detail of the LKP report:

    https://lore.kernel.org/all/3e8eecd1-a277-2cfb-690e-5de2eb7b988e@oracle.com/T/#u

In fact, that LKP report is triggered because arm's <asm/kexec.h> is
wrapped in CONFIG_KEXEC ifdeffery scope.  That is wrong.  CONFIG_KEXEC
controls the enabling/disabling of kexec_load interface, but not kexec
feature.  Removing the wrongly added CONFIG_KEXEC ifdeffery scope in
<asm/kexec.h> of arm allows us to drop the select KEXEC for CRASH_DUMP. 
Meanwhile, change arch/arm/kernel/Makefile to let machine_kexec.o
relocate_kernel.o depend on KEXEC_CORE.

Link: https://lkml.kernel.org/r/20231128054457.659452-1-bhe@redhat.com
Fixes: 89cde45591 ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec")
Signed-off-by: Baoquan He <bhe@redhat.com>
Reported-by: Ignat Korchagin <ignat@cloudflare.com>
Tested-by: Ignat Korchagin <ignat@cloudflare.com>	[compile-time only]
Tested-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Eric DeVolder <eric_devolder@yahoo.com>
Tested-by: Eric DeVolder <eric_devolder@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-12-06 16:12:48 -08:00
..
.gitignore
arch_timer.c
armksyms.c
asm-offsets.c Merge branch 'devel-stable' into for-next 2023-08-14 12:18:06 +01:00
atags.h
atags_compat.c
atags_parse.c vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
atags_proc.c
bios32.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
bugs.c ARM: cpu: Switch to arch_cpu_finalize_init() 2023-06-16 10:15:59 +02:00
cpuidle.c ARM: cpuidle: Drop of_device.h include 2023-04-13 17:46:34 -05:00
crash_dump.c
debug.S
devtree.c ARM: 9322/1: Explicitly include correct DT includes 2023-10-05 16:15:42 +01:00
dma.c
early_printk.c
efi.c vgacon: clean up global screen_info instances 2023-10-17 10:17:02 +02:00
elf.c
entry-armv.S Merge branch 'devel-stable' into for-next 2023-08-14 12:18:06 +01:00
entry-common.S ARM: ptrace: Restore syscall restart tracing 2023-08-16 13:58:49 -07:00
entry-ftrace.S
entry-header.S context_tracking: Split user tracking Kconfig 2022-06-29 17:04:09 -07:00
entry-v7m.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
fiq.c ARM: 9315/1: fiq: include asm/mach/irq.h for prototypes 2023-06-19 09:36:00 +01:00
fiqasm.S
ftrace.c
head-common.S
head-inflate-data.c ARM: 9310/1: xip-kernel: add __inflate_kernel_data prototype 2023-06-19 09:35:56 +01:00
head-nommu.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
head.h ARM: 9310/1: xip-kernel: add __inflate_kernel_data prototype 2023-06-19 09:35:56 +01:00
head.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
hibernate.c ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
hw_breakpoint.c hw_breakpoint: fix single-stepping when using bpf_overflow_handler 2023-08-18 17:04:09 +01:00
hyp-stub.S ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
insn.c
io.c
irq.c asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00
isa.c arm: Remove now superfluous sentinel elem from ctl_table arrays 2023-10-10 15:22:02 -07:00
iwmmxt.h
iwmmxt.S ARM: iwmmxt: Use undef hook to enable coprocessor for task 2023-05-17 15:08:22 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kgdb.c
machine_kexec.c ARM: 9317/1: kexec: Make smp stop calls asynchronous 2023-08-14 12:16:59 +01:00
Makefile kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP 2023-12-06 16:12:48 -08:00
module-plts.c ARM: module: Use module_init_layout_section() to spot init sections 2023-08-03 13:42:02 -07:00
module.c ARM: 9299/1: module: use sign_extend32() to extend the signedness 2023-06-19 09:35:48 +01:00
opcodes.c
paravirt.c
patch.c
perf_callchain.c ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code 2022-11-08 18:36:18 +00:00
perf_event_v6.c
perf_event_v7.c
perf_event_xscale.c
perf_regs.c
phys2virt.S
pj4-cp0.c ARM: iwmmxt: Use undef hook to enable coprocessor for task 2023-05-17 15:08:22 +02:00
process.c ARM: kernel: Get rid of thread_info::used_cp[] array 2023-05-17 15:08:22 +02:00
psci_smp.c
ptrace.c ARM updates for v6.6-rc1 2023-08-31 12:49:10 -07:00
reboot.c ARM: 9219/1: fix undeclared soft_restart 2022-07-28 15:09:17 +01:00
reboot.h
relocate_kernel.S
return_address.c ARM: 9258/1: stacktrace: Make stack walk callback consistent with generic code 2022-11-08 18:36:18 +00:00
setup.c TTY/Serial changes for 6.7-rc1 2023-11-03 15:44:25 -10:00
signal.c x86/shstk: Add user control-protection fault handler 2023-08-02 15:01:50 -07:00
signal.h
sigreturn_codes.S
sleep.S
smccc-call.S
smp.c nmi_backtrace: allow excluding an arbitrary CPU 2023-08-18 10:19:00 -07:00
smp_scu.c
smp_tlb.c
smp_twd.c
spectre.c
stacktrace.c ARM: 9259/1: stacktrace: Convert stacktrace to generic ARCH_STACKWALK 2022-11-14 12:00:57 +00:00
suspend.c ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
swp_emulate.c ARM: 9263/1: use .arch directives instead of assembler command line flags 2022-11-08 18:36:17 +00:00
sys_arm.c ARM: 9309/1: add missing syscall prototypes 2023-06-19 09:35:55 +01:00
sys_oabi-compat.c ARM: 9309/1: add missing syscall prototypes 2023-06-19 09:35:55 +01:00
tcm.c ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
thumbee.c
time.c
topology.c
traps.c ARM: 9302/1: traps: hide unused functions on NOMMU 2023-06-19 09:35:50 +01:00
unwind.c ARM: 9295/1: unwind:fix unwind abort for uleb128 case 2023-05-05 10:16:40 +01:00
v7m.c
vdso.c ARM: 9300/1: Replace all non-returning strlcpy with strscpy 2023-06-19 09:35:49 +01:00
vmlinux-xip.lds.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
vmlinux.lds.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00
xscale-cp0.c ARM: iwmmxt: Use undef hook to enable coprocessor for task 2023-05-17 15:08:22 +02:00