Patch "riscv: cpufeature: Fix extension subset checking" has been added to the 6.8-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

    riscv: cpufeature: Fix extension subset checking

to the 6.8-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:
     riscv-cpufeature-fix-extension-subset-checking.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 345858fa9d5f3e493b45671e27b1a5af0336c42a
Author: Charlie Jenkins <charlie@xxxxxxxxxxxx>
Date:   Thu May 2 21:50:51 2024 -0700

    riscv: cpufeature: Fix extension subset checking
    
    [ Upstream commit e67e98ee8952c7d5ce986d1dc6f8221ab8674afa ]
    
    This loop is supposed to check if ext->subset_ext_ids[j] is valid, rather
    than if ext->subset_ext_ids[i] is valid, before setting the extension
    id ext->subset_ext_ids[j] in isainfo->isa.
    
    Signed-off-by: Charlie Jenkins <charlie@xxxxxxxxxxxx>
    Reviewed-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
    Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
    Reviewed-by: Andrew Jones <ajones@xxxxxxxxxxxxxxxx>
    Fixes: 0d8295ed975b ("riscv: add ISA extension parsing for scalar crypto")
    Link: https://lore.kernel.org/r/20240502-cpufeature_fixes-v4-2-b3d1a088722d@xxxxxxxxxxxx
    Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 3242193541471..ec1852f47b280 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -616,7 +616,7 @@ static int __init riscv_fill_hwcap_from_ext_list(unsigned long *isa2hwcap)
 
 			if (ext->subset_ext_size) {
 				for (int j = 0; j < ext->subset_ext_size; j++) {
-					if (riscv_isa_extension_check(ext->subset_ext_ids[i]))
+					if (riscv_isa_extension_check(ext->subset_ext_ids[j]))
 						set_bit(ext->subset_ext_ids[j], isainfo->isa);
 				}
 			}




[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