linux/arch/x86/include/asm/fpu
Thomas Gleixner b2681e791d x86/fpu: Rename and sanitize fpu__save/copy()
Both function names are a misnomer.

fpu__save() is actually about synchronizing the hardware register state
into the task's memory state so that either coredump or a math exception
handler can inspect the state at the time where the problem happens.

The function guarantees to preserve the register state, while "save" is a
common terminology for saving the current state so it can be modified and
restored later. This is clearly not the case here.

Rename it to fpu_sync_fpstate().

fpu__copy() is used to clone the current task's FPU state when duplicating
task_struct. While the register state is a copy the rest of the FPU state
is not.

Name it accordingly and remove the really pointless @src argument along
with the warning which comes along with it.

Nothing can ever copy the FPU state of a non-current task. It's clearly
just a consequence of arch_dup_task_struct(), but it makes no sense to
proliferate that further.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210623121455.196727450@linutronix.de
2021-06-23 18:55:56 +02:00
..
api.h x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid() 2021-06-03 16:33:09 +02:00
internal.h x86/fpu: Rename and sanitize fpu__save/copy() 2021-06-23 18:55:56 +02:00
regset.h x86: switch to ->regset_get() 2020-07-27 14:31:07 -04:00
signal.h x86/signal: Introduce helpers to get the maximum signal frame size 2021-05-19 11:46:27 +02:00
types.h x86/fpu/xstate: Add supervisor PASID state for ENQCMD 2020-09-17 20:22:10 +02:00
xcr.h x86/fpu: Move xgetbv()/xsetbv() into a separate header 2020-09-07 19:54:20 +02:00
xstate.h x86/pkeys: Move read_pkru() and write_pkru() 2021-06-23 18:52:57 +02:00