]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: signal: fix signal_minsigstksz
authorYong-Xuan Wang <yongxuan.wang@sifive.com>
Fri, 20 Dec 2024 08:39:24 +0000 (16:39 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 14 Feb 2025 21:06:50 +0000 (13:06 -0800)
The init_rt_signal_env() funciton is called before the alternative patch
is applied, so using the alternative-related API to check the availability
of an extension within this function doesn't have the intended effect.
This patch reorders the init_rt_signal_env() and apply_boot_alternatives()
to get the correct signal_minsigstksz.

Fixes: e92f469b0771 ("riscv: signal: Report signal frame size to userspace via auxv")
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Reviewed-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Andy Chiu <andybnac@gmail.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20241220083926.19453-3-yongxuan.wang@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/setup.c

index f1793630fc518061d340af81de373049c05f129b..4fe45daa6281e98f5f1ceff26d01c57ec7fd53cd 100644 (file)
@@ -322,8 +322,8 @@ void __init setup_arch(char **cmdline_p)
 
        riscv_init_cbo_blocksizes();
        riscv_fill_hwcap();
-       init_rt_signal_env();
        apply_boot_alternatives();
+       init_rt_signal_env();
 
        if (IS_ENABLED(CONFIG_RISCV_ISA_ZICBOM) &&
            riscv_isa_extension_available(NULL, ZICBOM))