linux-stable/arch/openrisc
Stafford Horne ed60a9c421 openrisc: Union fpcsr and oldmask in sigcontext to unbreak userspace ABI
[ Upstream commit dceaafd668 ]

With commit 27267655c5 ("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: 27267655c5 ("openrisc: Support floating point user api")
Reported-by: Szabolcs Nagy <nsz@port70.net>
Closes: https://lore.kernel.org/openrisc/20230626213840.GA1236108@port70.net/
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-23 13:53:45 +02:00
..
boot kbuild: do not quote string values in include/config/auto.conf 2022-01-08 18:03:57 +09:00
configs mm, slob: rename CONFIG_SLOB to CONFIG_SLOB_DEPRECATED 2022-12-01 00:09:20 +01:00
include openrisc: Union fpcsr and oldmask in sigcontext to unbreak userspace ABI 2023-07-23 13:53:45 +02:00
kernel openrisc: Union fpcsr and oldmask in sigcontext to unbreak userspace ABI 2023-07-23 13:53:45 +02:00
lib openrisc/delay: Add include to fix symbol not declared warning 2022-05-23 17:15:49 +09:00
mm mm: always expand the stack with the mmap write lock held 2023-07-01 13:12:40 +02:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig openrisc: Add pci bus support 2022-07-30 05:50:15 +09:00
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile kbuild: remove head-y syntax 2022-10-02 18:06:03 +09:00