Skip to content

Commit 727c2a5

Browse files
Marc Zyngierwilldeacon
authored andcommitted
arm64: Unconditionally select CONFIG_JUMP_LABEL
Aneesh reports that his kernel fails to boot in nVHE mode with KVM's protected mode enabled. Further investigation by Mostafa reveals that this fails because CONFIG_JUMP_LABEL=n and that we have static keys shared between EL1 and EL2. While this can be worked around, it is obvious that we have long relied on having CONFIG_JUMP_LABEL enabled at all times, as all supported compilers now have 'asm goto' (which is the basic block for jump labels). Let's simplify our lives once and for all by mandating jump labels. It's not like anyone else is testing anything without them, and we already rely on them for other things (kfence, xfs, preempt). Link: https://lore.kernel.org/r/[email protected] Reported-by: Aneesh Kumar K.V <[email protected]> Reported-by: Mostafa Saleh <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Cc: Will Deacon <[email protected]> Cc: Catalin marinas <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Ard Biesheuvel <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent ef8923e commit 727c2a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ config ARM64
256256
select HOTPLUG_SMT if HOTPLUG_CPU
257257
select IRQ_DOMAIN
258258
select IRQ_FORCED_THREADING
259+
select JUMP_LABEL
259260
select KASAN_VMALLOC if KASAN
260261
select LOCK_MM_AND_FIND_VMA
261262
select MODULES_USE_ELF_RELA

arch/arm64/kernel/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ obj-y := debug-monitors.o entry.o irq.o fpsimd.o \
3434
cpufeature.o alternative.o cacheinfo.o \
3535
smp.o smp_spin_table.o topology.o smccc-call.o \
3636
syscall.o proton-pack.o idle.o patching.o pi/ \
37-
rsi.o
37+
rsi.o jump_label.o
3838

3939
obj-$(CONFIG_COMPAT) += sys32.o signal32.o \
4040
sys_compat.o
@@ -47,7 +47,6 @@ obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
4747
obj-$(CONFIG_HARDLOCKUP_DETECTOR_PERF) += watchdog_hld.o
4848
obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
4949
obj-$(CONFIG_CPU_PM) += sleep.o suspend.o
50-
obj-$(CONFIG_JUMP_LABEL) += jump_label.o
5150
obj-$(CONFIG_KGDB) += kgdb.o
5251
obj-$(CONFIG_EFI) += efi.o efi-rt-wrapper.o
5352
obj-$(CONFIG_PCI) += pci.o

0 commit comments

Comments
 (0)