]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu: Preserve supervisor states in sanitize_restored_user_xstate()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 18 Jun 2021 14:18:24 +0000 (16:18 +0200)
committerBorislav Petkov <bp@suse.de>
Tue, 22 Jun 2021 08:51:23 +0000 (10:51 +0200)
commit1d594bed22ad27705c6820668c63de1bf05f9284
treef96f40f5010ecdb6218364ddaff74f24b2f0852e
parent2a7e5e96f3d2bd3974a6a4d3721da1f29f4b1349
x86/fpu: Preserve supervisor states in sanitize_restored_user_xstate()

sanitize_restored_user_xstate() preserves the supervisor states only
when the fx_only argument is zero, which allows unprivileged user space
to put supervisor states back into init state.

Preserve them unconditionally.

 [ bp: Fix a typo or two in the text. ]

Fixes: 80d59ce70925 ("x86/fpu/xstate: Update sanitize_restored_xstate() for supervisor xstates")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20210618143444.438635017@linutronix.de
arch/x86/kernel/fpu/signal.c