]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: signal: fix signal_minsigstksz
authorYong-Xuan Wang <yongxuan.wang@sifive.com>
Fri, 20 Dec 2024 08:39:24 +0000 (16:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2025 17:25:45 +0000 (18:25 +0100)
commit45233962ea51aed6cfb540277e80bfd9c13dc0e6
treee4bbe113e490a27a005f38ea03c9ed2908b6af96
parentfa19f64d6329da2c0389749a17faa2180b0876aa
riscv: signal: fix signal_minsigstksz

commit 564fc8eb6f78e01292ff10801f318feae6153fdd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/kernel/setup.c