This is a note to let you know that I've just added the patch titled riscv: signal: fix signal_minsigstksz to the 6.6-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-signal-fix-signal_minsigstksz.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 6173dfaba0bf31bccb417c749342119655314f76 Author: Yong-Xuan Wang <yongxuan.wang@xxxxxxxxxx> Date: Fri Dec 20 16:39:24 2024 +0800 riscv: signal: fix signal_minsigstksz [ Upstream commit 564fc8eb6f78e01292ff10801f318feae6153fdd ] 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@xxxxxxxxxx> Reviewed-by: Zong Li <zong.li@xxxxxxxxxx> Reviewed-by: Andy Chiu <andybnac@xxxxxxxxx> Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Link: https://lore.kernel.org/r/20241220083926.19453-3-yongxuan.wang@xxxxxxxxxx Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index 89ff6395dadbc..175184b059264 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -306,8 +306,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))