lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v5 1/2] selftests/x86: add xsave test during and after signal handling
From
Date
On 12/9/21 8:47 PM, Pengfei Xu wrote:
> How about the following changes:
> Will remove set_avx2_ymm() and will only check XSAVE_MASK_FP, XSAVE_MASK_OPMASK
> and XSAVE_MASK_PKRU xstates after signal handling and process switch,

First and foremost, the whole point of these tests is to ensure that the
kernel is properly maintaining register state. Removing registers from
the test moves *away* from the primary goal of this test.

Second, you just listed three states there. Have you considered looking
at whether those have the same problem as the XMM/YMM registers? Please do.

Third (and I've also suggested this before), we should explicitly tell
the compiler not to use the FPU registers. This is what the kernel
does, and it's what allows us to, for instance, make function calls in
the kernel without clobbering userspace content in XSAVE-managed registers.

If we did that, then we would only have to worry about calls to things
*outside* of the test program, like libc.

\
 
 \ /
  Last update: 2021-12-10 17:49    [W:1.556 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site