android_kernel_xiaomi_sm8450/arch
Sami Tolvanen a45ee4c98d KVM: arm64: Don't use cbz/adr with external symbols
commit dbaee836d60a8e1b03e7d53a37893235662ba124 upstream.

allmodconfig + CONFIG_LTO_CLANG_THIN=y fails to build due to following
linker errors:

  ld.lld: error: irqbypass.c:(function __guest_enter: .text+0x21CC):
  relocation R_AARCH64_CONDBR19 out of range: 2031220 is not in
  [-1048576, 1048575]; references hyp_panic
  >>> defined in vmlinux.o

  ld.lld: error: irqbypass.c:(function __guest_enter: .text+0x21E0):
  relocation R_AARCH64_ADR_PREL_LO21 out of range: 2031200 is not in
  [-1048576, 1048575]; references hyp_panic
  >>> defined in vmlinux.o

This is because with LTO, the compiler ends up placing hyp_panic()
more than 1MB away from __guest_enter(). Use an unconditional branch
and adr_l instead to fix the issue.

Link: https://github.com/ClangBuiltLinux/linux/issues/1317
Reported-by: Nathan Chancellor <nathan@kernel.org>
Suggested-by: Marc Zyngier <maz@kernel.org>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Will Deacon <will@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210305202124.3768527-1-samitolvanen@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-04 13:17:44 +02:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:21:03 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:23:41 +02:00
arm ARM: dts: imx6qdl-kontron-samx6i: fix phy-mode 2024-08-19 05:41:24 +02:00
arm64 KVM: arm64: Don't use cbz/adr with external symbols 2024-09-04 13:17:44 +02:00
c6x c6x: add support for TIF_NOTIFY_SIGNAL 2023-01-04 11:39:21 +01:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:12:54 +02:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:23:19 +01:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:12:54 +02:00
ia64 efi: ia64: move IA64-only declarations to new asm/efi.h header 2024-07-18 13:05:50 +02:00
m68k m68k: amiga: Turn off Warp1260 interrupts during boot 2024-08-19 05:40:57 +02:00
microblaze microblaze: Remove early printk call from cpuinfo-static.c 2024-06-16 13:32:19 +02:00
mips MIPS: Loongson64: Set timer mode in cpu-probe 2024-09-04 13:17:42 +02:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:23:19 +01:00
nios2 nios2: dts: Fix tse_mac "max-frame-size" property 2023-06-21 15:45:37 +02:00
openrisc openrisc: Call setup_memory() earlier in the init sequence 2024-09-04 13:17:38 +02:00
parisc parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367 2024-09-04 13:17:36 +02:00
powerpc powerpc/boot: Only free if realloc() succeeds 2024-09-04 13:17:36 +02:00
riscv riscv/mm: Add handling for VM_FAULT_SIGSEGV in mm_fault_error() 2024-08-19 05:41:09 +02:00
s390 s390/smp,mcck: fix early IPI handling 2024-09-04 13:17:33 +02:00
sh Revert "sh: Handle calling csum_partial with misaligned data" 2024-06-16 13:32:07 +02:00
sparc sparc64: Fix incorrect function signature and add prototype for prom_cif_init 2024-08-19 05:40:51 +02:00
um um: time-travel: fix time-travel-start option 2024-08-19 05:41:03 +02:00
x86 x86: Increase brk randomness entropy for 64-bit systems 2024-09-04 13:17:36 +02:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-10 21:53:31 +02:00
.gitignore
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:23:44 +02:00