linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] x86/FPU: FPU sanitization for in-kernel use
@ 2020-06-19 17:41 Borislav Petkov
  2020-06-19 17:41 ` [PATCH 1/2] x86/fpu: Reset MXCSR to default in kernel_fpu_begin() Borislav Petkov
  2020-06-19 17:41 ` [PATCH 2/2] selftests/fpu: Add an FPU selftest Borislav Petkov
  0 siblings, 2 replies; 24+ messages in thread
From: Borislav Petkov @ 2020-06-19 17:41 UTC (permalink / raw)
  To: X86 ML; +Cc: jpa, Dave Hansen, LKML

From: Borislav Petkov <bp@suse.de>

Hi all,

here's a proper submission of the work started by Petteri. I think I've
addressed all the feedback so far. I've added the preparation work for
the test to run, to a script run_test_fpu.sh which does some basic
checks, loads the module and runs the test for 1000 times on all CPUs,
by default. Thought this is a sane default, feel free to prove me wrong
and I'll change it.

Thx.

Petteri Aimonen (2):
  x86/fpu: Reset MXCSR to default in kernel_fpu_begin()
  selftests/fpu: Add an FPU selftest

 arch/x86/include/asm/fpu/internal.h         |  5 ++
 arch/x86/kernel/fpu/core.c                  |  6 ++
 lib/Kconfig.debug                           | 11 +++
 lib/Makefile                                | 20 +++++
 lib/test_fpu.c                              | 89 +++++++++++++++++++++
 tools/testing/selftests/Makefile            |  1 +
 tools/testing/selftests/fpu/.gitignore      |  2 +
 tools/testing/selftests/fpu/Makefile        |  9 +++
 tools/testing/selftests/fpu/run_test_fpu.sh | 46 +++++++++++
 tools/testing/selftests/fpu/test_fpu.c      | 61 ++++++++++++++
 10 files changed, 250 insertions(+)
 create mode 100644 lib/test_fpu.c
 create mode 100644 tools/testing/selftests/fpu/.gitignore
 create mode 100644 tools/testing/selftests/fpu/Makefile
 create mode 100755 tools/testing/selftests/fpu/run_test_fpu.sh
 create mode 100644 tools/testing/selftests/fpu/test_fpu.c

-- 
2.21.0


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

end of thread, other threads:[~2020-06-23 21:32 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19 17:41 [PATCH 0/2] x86/FPU: FPU sanitization for in-kernel use Borislav Petkov
2020-06-19 17:41 ` [PATCH 1/2] x86/fpu: Reset MXCSR to default in kernel_fpu_begin() Borislav Petkov
2020-06-19 18:01   ` Andy Lutomirski
2020-06-22 17:09     ` Borislav Petkov
2020-06-22 18:33       ` Andy Lutomirski
2020-06-22 18:36         ` Petteri Aimonen
2020-06-22 18:38         ` Dave Hansen
2020-06-22 18:40           ` Andy Lutomirski
2020-06-22 18:59             ` Borislav Petkov
2020-06-19 17:41 ` [PATCH 2/2] selftests/fpu: Add an FPU selftest Borislav Petkov
2020-06-19 18:00   ` Andy Lutomirski
2020-06-22 17:12     ` Borislav Petkov
2020-06-22 18:26       ` Andy Lutomirski
2020-06-22 19:01         ` Borislav Petkov
     [not found]           ` <B4D00859-000A-4F8C-8CFB-45B9BBCCA16D@amacapital.net>
2020-06-23 10:28             ` Borislav Petkov
2020-06-23 18:22               ` Andy Lutomirski
2020-06-23 18:47                 ` Borislav Petkov
2020-06-23 19:07                   ` Nick Desaulniers
2020-06-23 19:13                     ` Borislav Petkov
2020-06-23 20:58                       ` Nick Desaulniers
2020-06-23 21:32                         ` Borislav Petkov
2020-06-20 19:55   ` kernel test robot
2020-06-22 17:04     ` Borislav Petkov
2020-06-22 18:15       ` Nick Desaulniers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).