]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu: Remove pointless memset in fpu_clone()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Oct 2021 01:16:02 +0000 (03:16 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 20 Oct 2021 13:27:26 +0000 (15:27 +0200)
commitd17fca7f9d06d1959eb0a80591ec8232e3152b21
treef5334391c0d71d0b0a56f99f469aeb0e35cecad7
parent07f5e1343cda983a3fcadb9a5098a11d455f8925
x86/fpu: Remove pointless memset in fpu_clone()

Zeroing the forked task's FPU registers buffer to avoid leaking init
optimized stale data into the clone is a pointless exercise for the case
where the current task has TIF_NEED_FPU_LOAD set. In that case, the FPU
registers state is copied from current's FPU register buffer which can
contain stale init optimized data as well.

The alledged information leak is non-existant because this stale init
optimized data is used nowhere and cannot leak anywhere.

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