diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-09-08 16:29:30 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-09-14 22:10:03 +0300 |
commit | fcfb7163329ce832aafef31f26345ef5e8642a17 (patch) | |
tree | de788ae378a3a9a4df8b876ed82201f5784b4fab /arch/x86/include/asm/fpu/internal.h | |
parent | 4164a482a5d92c29eaf53d01755103f6bbce38f2 (diff) | |
download | linux-fcfb7163329ce832aafef31f26345ef5e8642a17.tar.xz |
x86/fpu/signal: Move xstate clearing out of copy_fpregs_to_sigframe()
When the direct saving of the FPU registers to the user space sigframe
fails, copy_fpregs_to_sigframe() attempts to clear the user buffer.
The most likely reason for such a fail is a page fault. As
copy_fpregs_to_sigframe() is invoked with pagefaults disabled the chance
that __clear_user() succeeds is minuscule.
Move the clearing out into the caller which replaces the
fault_in_pages_writeable() in that error handling path.
The return value confusion will be cleaned up separately.
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210908132525.679356300@linutronix.de
Diffstat (limited to 'arch/x86/include/asm/fpu/internal.h')
0 files changed, 0 insertions, 0 deletions