Patch "powerpc/powernv: Get L1D flush requirements from device-tree" has been added to the 5.18-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

    powerpc/powernv: Get L1D flush requirements from device-tree

to the 5.18-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:
     powerpc-powernv-get-l1d-flush-requirements-from-devi.patch
and it can be found in the queue-5.18 subdirectory.

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



commit d44e938eb67db8f59e1d8f6ca5192ec970a5f67f
Author: Russell Currey <ruscur@xxxxxxxxxx>
Date:   Mon Apr 4 20:15:35 2022 +1000

    powerpc/powernv: Get L1D flush requirements from device-tree
    
    [ Upstream commit 2efee6adb56159288bce9d1ab51fc9056d7007d4 ]
    
    The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and
    no-need-l1d-flush-kernel-on-user-access are the equivalents of
    H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS
    from the H_GET_CPU_CHARACTERISTICS hcall on pseries respectively.
    
    In commit d02fa40d759f ("powerpc/powernv: Remove POWER9 PVR version
    check for entry and uaccess flushes") the condition for disabling the
    L1D flush on kernel entry and user access was changed from any non-P9
    CPU to only checking P7 and P8.  Without the appropriate device-tree
    checks for newer processors on powernv, these flushes are unnecessarily
    enabled on those systems.  This patch corrects this.
    
    Fixes: d02fa40d759f ("powerpc/powernv: Remove POWER9 PVR version check for entry and uaccess flushes")
    Reported-by: Joel Stanley <joel@xxxxxxxxx>
    Signed-off-by: Russell Currey <ruscur@xxxxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220404101536.104794-1-ruscur@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 105d889abd51..378f7e5f18d2 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -96,6 +96,12 @@ static void __init init_fw_feat_flags(struct device_node *np)
 
 	if (fw_feature_is("disabled", "needs-spec-barrier-for-bound-checks", np))
 		security_ftr_clear(SEC_FTR_BNDS_CHK_SPEC_BAR);
+
+	if (fw_feature_is("enabled", "no-need-l1d-flush-msr-pr-1-to-0", np))
+		security_ftr_clear(SEC_FTR_L1D_FLUSH_ENTRY);
+
+	if (fw_feature_is("enabled", "no-need-l1d-flush-kernel-on-user-access", np))
+		security_ftr_clear(SEC_FTR_L1D_FLUSH_UACCESS);
 }
 
 static void __init pnv_setup_security_mitigations(void)



[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