[PATCH] riscv: signal: fix sigaltstack frame size checking
Palmer Dabbelt
palmer at rivosinc.com
Thu Aug 31 14:58:26 PDT 2023
On Tue, 22 Aug 2023 16:49:03 +0000, Andy Chiu wrote:
> The alternative stack checking in get_sigframe introduced by the Vector
> support is not needed and has a problem. It is not needed as we have
> already validate it at the beginning of the function if we are already
> on an altstack. If not, the size of an altstack is always validated at
> its allocation stage with sigaltstack_size_valid().
>
> Besides, we must only regard the size of an altstack if the handler of a
> signal is registered with SA_ONSTACK. So, blindly checking overflow of
> an altstack if sas_ss_size not equals to zero will check against wrong
> signal handlers if only a subset of signals are registered with
> SA_ONSTACK.
>
> [...]
Applied, thanks!
[1/1] riscv: signal: fix sigaltstack frame size checking
https://git.kernel.org/palmer/c/d77303a57c95
Best regards,
--
Palmer Dabbelt <palmer at rivosinc.com>
More information about the linux-riscv
mailing list