x86/fpu: Do not inherit FPU context for kernel and IO worker threads
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Oct 2021 01:16:06 +0000 (03:16 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 20 Oct 2021 13:27:26 +0000 (15:27 +0200)
commit509e7a30cd0a9f38abac4114832d9f69ff0d73b4
treecfb0831d84c0415ac9fe81dff5589f1c43937631
parent2d16a1876f20218f8970ea4b7f679cead1cdb510
x86/fpu: Do not inherit FPU context for kernel and IO worker threads

There is no reason why kernel and IO worker threads need a full clone of
the parent's FPU state. Both are kernel threads which are not supposed to
use FPU. So copying a large state or doing XSAVE() is pointless. Just clean
out the minimally required state for those tasks.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211015011538.839822981@linutronix.de
arch/x86/kernel/fpu/core.c