lkml.org 
[lkml]   [2020]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch/x86: reset MXCSR to default in kernel_fpu_begin()
Hi,

On Tue, Jun 02, 2020 at 01:29:51PM +0300, Petteri Aimonen wrote:
> The kernel module is not actually x86-specific, even though it is
> currently only enabled for x86. amdgpu driver already does kernel mode
> floating point operations on PPC64 also, and the same module could be
> used to test the same thing there.

Then make it generic please and put the user portion in, say,
tools/testing/selftests/fpu/ and we can ask ppc people to test it too.
People might wanna add more stuff to it in the future, which would be
good.

> To deterministically trigger the bug, the syscall has to come from the
> same thread that has modified MXCSR. Going through /usr/sbin/modprobe
> won't work, and manually doing the necessary syscalls for module loading
> seems too complicated.

Ok, fair enough. But put that file in debugfs pls.

> The fesetround() and feenableexcept() are the portable ways to modify
> MXCSR. The test module does cause Precision Exception and Denormal
> Exception if those exceptions are unmasked.

Ok.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-06-02 12:59    [W:0.074 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site