um: Add helper functions to get/set state for SECCOMP
authorBenjamin Berg <benjamin@sipsolutions.net>
Mon, 2 Jun 2025 13:00:48 +0000 (15:00 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 2 Jun 2025 13:17:19 +0000 (15:17 +0200)
commitb1e1bd2e69430445021394536740352be1b41cd0
tree74c3375d21082418fa4dedd5ce0cf851ba90c0cc
parentdac494bf54f764a114f16621ef04f534dd754ac1
um: Add helper functions to get/set state for SECCOMP

When not using ptrace, we need to both save and restore registers
through the mcontext as provided by the host kernel to our signal
handlers.

Add corresponding functions to store the state to an mcontext and
helpers to access the mcontext of the subprocess through the stub data.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20250602130052.545733-4-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/x86/um/os-Linux/mcontext.c
arch/x86/um/ptrace.c
arch/x86/um/shared/sysdep/mcontext.h