]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
um: Store full CSGSFS and SS register from mcontext
authorBenjamin Berg <benjamin@sipsolutions.net>
Mon, 24 Feb 2025 18:18:19 +0000 (19:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:41:57 +0000 (14:41 +0200)
commit7638182277867d64e092b769a2784ac32d099e70
treeda2bca32710cd23c7ecaf552aa4be389973ff36f
parent61225b3395c21b6bf264bd790a805179eb4683c7
um: Store full CSGSFS and SS register from mcontext

[ Upstream commit cef721e0d53d2b64f2ba177c63a0dfdd7c0daf17 ]

Doing this allows using registers as retrieved from an mcontext to be
pushed to a process using PTRACE_SETREGS.

It is not entirely clear to me why CSGSFS was masked. Doing so creates
issues when using the mcontext as process state in seccomp and simply
copying the register appears to work perfectly fine for ptrace.

Signed-off-by: Benjamin Berg <benjamin@sipsolutions.net>
Link: https://patch.msgid.link/20250224181827.647129-2-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/um/os-Linux/mcontext.c