Patch "ARM: 9434/1: cfi: Fix compilation corner case" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ARM: 9434/1: cfi: Fix compilation corner case

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm-9434-1-cfi-fix-compilation-corner-case.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit df95e936756de1af86649eb568f549ba38b52a37
Author: Linus Walleij <linus.walleij@xxxxxxxxxx>
Date:   Mon Nov 11 00:17:03 2024 +0100

    ARM: 9434/1: cfi: Fix compilation corner case
    
    [ Upstream commit 4aea16b7cfb76bd3361858ceee6893ef5c9b5570 ]
    
    When enabling expert mode CONFIG_EXPERT and using that power
    user mode to disable the branch prediction hardening
    !CONFIG_HARDEN_BRANCH_PREDICTOR, the assembly linker
    in CLANG notices that some assembly in proc-v7.S does
    not have corresponding C call sites, i.e. the prototypes
    in proc-v7-bugs.c are enclosed in ifdef
    CONFIG_HARDEN_BRANCH_PREDICTOR so this assembly:
    
    SYM_TYPED_FUNC_START(cpu_v7_smc_switch_mm)
    SYM_TYPED_FUNC_START(cpu_v7_hvc_switch_mm)
    
    Results in:
    
    ld.lld: error: undefined symbol: __kcfi_typeid_cpu_v7_smc_switch_mm
    >>> referenced by proc-v7.S:94 (.../arch/arm/mm/proc-v7.S:94)
    >>> arch/arm/mm/proc-v7.o:(.text+0x108) in archive vmlinux.a
    
    ld.lld: error: undefined symbol: __kcfi_typeid_cpu_v7_hvc_switch_mm
    >>> referenced by proc-v7.S:105 (.../arch/arm/mm/proc-v7.S:105)
    >>> arch/arm/mm/proc-v7.o:(.text+0x124) in archive vmlinux.a
    
    Fix this by adding an additional requirement that
    CONFIG_HARDEN_BRANCH_PREDICTOR has to be enabled to compile
    these assembly calls.
    
    Closes: https://lore.kernel.org/oe-kbuild-all/202411041456.ZsoEiD7T-lkp@xxxxxxxxx/
    
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
    Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Signed-off-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 5fb9a6aecb001..2cd9333426794 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -94,7 +94,7 @@ SYM_TYPED_FUNC_START(cpu_v7_dcache_clean_area)
 	ret	lr
 SYM_FUNC_END(cpu_v7_dcache_clean_area)
 
-#ifdef CONFIG_ARM_PSCI
+#if defined(CONFIG_ARM_PSCI) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
 	.arch_extension sec
 SYM_TYPED_FUNC_START(cpu_v7_smc_switch_mm)
 	stmfd	sp!, {r0 - r3}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux