mirror_ubuntu-kernels/arch/x86/um/shared/sysdep
Benjamin Berg 3f17fed214 um: switch to regset API and depend on XSTATE
The PTRACE_GETREGSET API has now existed since Linux 2.6.33. The XSAVE
CPU feature should also be sufficiently common to be able to rely on it.

With this, define our internal FP state to be the hosts XSAVE data. Add
discovery for the hosts XSAVE size and place the FP registers at the end
of task_struct so that we can adjust the size at runtime.

Next we can implement the regset API on top and update the signal
handling as well as ptrace APIs to use them. Also switch coredump
creation to use the regset API and finally set HAVE_ARCH_TRACEHOOK.

This considerably improves the signal frames. Previously they might not
have contained all the registers (i386) and also did not have the
sizes and magic values set to the correct values to permit userspace to
decode the frame.

As a side effect, this will permit UML to run on hosts with newer CPU
extensions (such as AMX) that need even more register state.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20241023094120.4083426-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2024-10-23 12:13:16 +02:00
..
archsetjmp_32.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
archsetjmp_64.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
archsetjmp.h um: Fix the -Wmissing-prototypes warning for get_thread_reg 2024-04-30 14:15:17 +02:00
faultinfo_32.h um: Remove SKAS3/4 support 2015-04-13 21:00:53 +02:00
faultinfo_64.h um: Remove SKAS3/4 support 2015-04-13 21:00:53 +02:00
faultinfo.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kernel-offsets.h um: Fix -Wmissing-prototypes warnings for __warp_* and foo 2024-04-22 21:58:48 +02:00
mcontext.h
ptrace_32.h um: switch to regset API and depend on XSTATE 2024-10-23 12:13:16 +02:00
ptrace_64.h um: switch to regset API and depend on XSTATE 2024-10-23 12:13:16 +02:00
ptrace_user.h um: switch to regset API and depend on XSTATE 2024-10-23 12:13:16 +02:00
ptrace.h um: switch to regset API and depend on XSTATE 2024-10-23 12:13:16 +02:00
stub_32.h um: make stub_exe _start() pure inline asm 2024-10-23 09:04:59 +02:00
stub_64.h um: make stub_exe _start() pure inline asm 2024-10-23 09:04:59 +02:00
stub.h um: remove copy_context_skas0 2024-07-03 17:09:49 +02:00
syscalls_32.h um: Cleanup syscall_handler_t cast in syscalls_32.h 2022-09-19 21:58:53 +02:00
syscalls_64.h um: Cleanup syscall_handler_t definition/cast, fix warning 2022-03-11 10:48:03 +01:00
syscalls.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tls.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00