]> 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:37:56 +0000 (14:37 +0200)
commit3eac35c34a985e379272f63d4d8ed4432c44a5ea
tree03db8470c3d369608f02305cf23cd0eba8db4ec2
parentfdcd142d310ce827ebeac0cee169b35f272fdd23
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