All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/10] x86/fpu: Clean up error handling in sigframe related code
@ 2021-08-30 16:27 Thomas Gleixner
  2021-08-30 16:27 ` [patch 01/10] x86/fpu/signal: Clarify exception handling in restore_fpregs_from_user() Thomas Gleixner
                   ` (10 more replies)
  0 siblings, 11 replies; 38+ messages in thread
From: Thomas Gleixner @ 2021-08-30 16:27 UTC (permalink / raw)
  To: LKML; +Cc: x86, Al Viro, Linus Torvalds

A recent discussion [1] about hardware poisoning unearthed some short
comings in the error handling of the sigframe related FPU code:

  - The error exit for exceptions other than #PF is obfuscated

  - The error code return values of the various functions are pointless
    because all callers just care about success or failure and the error
    codes are never propagated to user space.

  - Some of the buffer clearing happens needlessly inside of page fault
    disabled regions.

The following series cleans this up. As a side effect the resulting text
size of fpu/signal.o shrinks by about 150 bytes.

It's also available in git:

    git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/fpu

Thanks,

	tglx

[1] https://lore.kernel.org/r/87r1edgs2w.ffs@tglx

---
 ia32/ia32_signal.c         |   14 ++--
 include/asm/fpu/internal.h |   21 ++----
 kernel/fpu/signal.c        |  145 +++++++++++++++++++++++----------------------
 kernel/signal.c            |   18 ++---
 4 files changed, 98 insertions(+), 100 deletions(-)

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2021-09-03  6:05 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 16:27 [patch 00/10] x86/fpu: Clean up error handling in sigframe related code Thomas Gleixner
2021-08-30 16:27 ` [patch 01/10] x86/fpu/signal: Clarify exception handling in restore_fpregs_from_user() Thomas Gleixner
2021-08-30 19:33   ` Borislav Petkov
2021-08-30 20:07     ` Borislav Petkov
2021-08-30 20:09     ` Thomas Gleixner
2021-08-30 21:02       ` Al Viro
2021-08-30 21:26         ` Linus Torvalds
2021-08-30 21:30           ` Al Viro
2021-08-30 22:00             ` Linus Torvalds
2021-08-30 22:12               ` Thomas Gleixner
2021-08-30 22:26                 ` Linus Torvalds
2021-08-31  0:06               ` Al Viro
2021-08-31  0:34               ` Thomas Gleixner
2021-08-31  7:39                 ` Borislav Petkov
2021-08-31 18:39                   ` Luck, Tony
2021-09-01  7:27                     ` Borislav Petkov
2021-08-30 22:01           ` Thomas Gleixner
2021-08-30 22:11             ` Linus Torvalds
2021-09-01 12:00           ` Thomas Gleixner
2021-09-01 15:52             ` Thomas Gleixner
2021-09-01 16:47               ` Sean Christopherson
2021-09-01 19:22                 ` Thomas Gleixner
2021-09-01 19:22                 ` Dave Hansen
2021-09-02 13:08                 ` Jarkko Sakkinen
2021-09-02 14:08                   ` Thomas Gleixner
2021-09-03  6:00                     ` Jarkko Sakkinen
2021-09-03  6:05                       ` Jarkko Sakkinen
2021-08-30 16:27 ` [patch 02/10] x86/fpu/signal: Move header zeroing out of xsave_to_user_sigframe() Thomas Gleixner
2021-08-30 16:27 ` [patch 03/10] x86/fpu/signal: Move xstate clearing out of copy_fpregs_to_sigframe() Thomas Gleixner
2021-08-30 16:27 ` [patch 04/10] x86/fpu/signal: Change return type of copy_fpstate_to_sigframe() to boolean Thomas Gleixner
2021-08-30 16:27 ` [patch 05/10] x86/fpu/signal: Change return type of copy_fpregs_to_sigframe() helpers " Thomas Gleixner
2021-08-30 16:27 ` [patch 06/10] x86/signal: Change return type of restore_sigcontext() " Thomas Gleixner
2021-08-30 16:27 ` [patch 07/10] x86/fpu/signal: Change return type of fpu__restore_sig() " Thomas Gleixner
2021-08-30 16:27 ` [patch 08/10] x86/fpu/signal: Change return type of __fpu_restore_sig() " Thomas Gleixner
2021-08-30 16:27 ` [patch 09/10] x86/fpu/signal: Change return code of check_xstate_in_sigframe() " Thomas Gleixner
2021-08-30 16:27 ` [patch 10/10] x86/fpu/signal: Change return code of restore_fpregs_from_user() " Thomas Gleixner
2021-08-30 17:39 ` [patch 00/10] x86/fpu: Clean up error handling in sigframe related code Linus Torvalds
2021-08-30 18:51   ` Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.