[PATCH] riscv: signal: fix sigaltstack frame size checking
Palmer Dabbelt
palmer at dabbelt.com
Wed Sep 27 07:46:43 PDT 2023
On Mon, 25 Sep 2023 03:07:47 PDT (-0700), regressions at leemhuis.info wrote:
> On 31.08.23 23:58, Palmer Dabbelt wrote:
>>
>> 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
>
> Just wondering: what happened to this patch, which afaics is currently
> in neither mainline nor next? Because according to
> https://bugzilla.kernel.org/show_bug.cgi?id=217923 it fixes rustc
> userspace crashes with 6.5. Was a different approach found?
We talked about this in the patchwork meeting. I think I just dropped
the ball somewhere -- we moved offices and then I was at the cauldron,
so things are a bit more hectic than usual.
I got back last night and I'm still a bit out of it. I'm going to try
and dig whatever computer I was using out of a moving box and find the
actual commit, as I'm kind of worried I might have lost something else
as well. Might not be super fast, though, as I've got stuff all over
the place and I'm pretty much falling asleep already...
>
> Ciao, Thorsten
More information about the linux-riscv
mailing list