Skip to content
Snippets Groups Projects
Commit dceaafd6 authored by Stafford Horne's avatar Stafford Horne
Browse files

openrisc: Union fpcsr and oldmask in sigcontext to unbreak userspace ABI


With commit 27267655 ("openrisc: Support floating point user api") I
added an entry to the struct sigcontext which caused an unwanted change
to the userspace ABI.

To fix this we use the previously unused oldmask field space for the
floating point fpcsr state.  We do this with a union to restore the ABI
back to the pre kernel v6.4 ABI and keep API compatibility.

This does mean if there is some code somewhere that is setting oldmask
in an OpenRISC specific userspace sighandler it would end up setting the
floating point register status, but I think it's unlikely as oldmask was
never functional before.

Fixes: 27267655 ("openrisc: Support floating point user api")
Reported-by: default avatarSzabolcs Nagy <nsz@port70.net>
Closes: https://lore.kernel.org/openrisc/20230626213840.GA1236108@port70.net/


Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
parent 45a3e24f
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment