2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/arch/um/os-Linux
Benjamin Berg 942349413a um: fix SECCOMP 32bit xstate register restore
There was a typo that caused the extended FP state to be copied into the
wrong location on 32 bit. On 32 bit we only store the xstate internally
as that already contains everything. However, for compatibility, the
mcontext on 32 bit first contains the legacy FP state and then the
xstate.

The code copied the xstate on top of the legacy FP state instead of
using the correct offset. This offset was already calculated in the
xstate_* variables, so simply switch to those to fix the problem.

With this SECCOMP mode works on 32 bit, so lift the restriction.

Fixes: b1e1bd2e69 ("um: Add helper functions to get/set state for SECCOMP")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250604081705.934112-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-06-04 11:40:36 +02:00
..
skas um: pass FD for memory operations when needed 2025-06-02 16:20:10 +02:00
elf_aux.c um: Add an internal header shared among the user code 2024-04-30 14:16:44 +02:00
execvp.c um: Allow builds with Clang 2022-03-21 08:13:03 -07:00
file.c um: Remove obsolete legacy network transports 2025-05-05 10:26:59 +02:00
helper.c um: Prohibit the VM_CLONE flag in run_helper_thread() 2025-03-20 09:26:38 +01:00
internal.h um: Implement kernel side of SECCOMP based process handling 2025-06-02 15:17:19 +02:00
irq.c um: Remove the unneeded result variable 2023-02-01 22:11:24 +01:00
main.c um: Remove unused THREAD_NAME_LEN macro 2025-01-10 13:49:57 +01:00
Makefile um: Remove obsolete legacy network transports 2025-05-05 10:26:59 +02:00
mem.c um: set DONTDUMP and DONTFORK flags on KASAN shadow memory 2024-11-07 17:36:30 +01:00
process.c um: Track userspace children dying in SECCOMP mode 2025-06-02 15:17:19 +02:00
registers.c um: Add SECCOMP support detection and initialization 2025-06-02 16:20:01 +02:00
sigio.c um: Fix tgkill compile error on old host OSes 2025-06-02 11:22:55 +02:00
signal.c um: Track userspace children dying in SECCOMP mode 2025-06-02 15:17:19 +02:00
start_up.c um: fix SECCOMP 32bit xstate register restore 2025-06-04 11:40:36 +02:00
time.c um: Remove unused timeval_to_ns() function 2022-03-11 10:49:50 +01:00
tty.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
umid.c um: Do not propagate uml_dir parameter to kernel 2024-10-23 09:52:48 +02:00
user_syms.c Revert "[PATCH] uml: export symbols added by GCC hardened" 2023-06-15 04:47:04 +09:00
util.c um: always include kconfig.h and compiler-version.h 2024-11-07 17:36:30 +01:00