lkml.org 
[lkml]   [2021]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v4 14/22] x86/fpu/xstate: Expand the xstate buffer on the first use of dynamic user state
    Date

    > On Mar 24, 2021, at 2:30 PM, Dave Hansen <dave.hansen@intel.com> wrote:
    >
    > On 3/24/21 2:26 PM, Andy Lutomirski wrote:
    >>> 3. user space always uses fully uncompacted XSAVE buffers.
    >>>
    >> There is no reason we have to do this for new states. Arguably we
    >> shouldn’t for AMX to avoid yet another altstack explosion.
    >
    > The thing that's worried me is that the list of OS-enabled states is
    > visible to apps via XGETBV. It doesn't seem too much of a stretch to
    > think that apps will see AMX enabled with XGETBV and them assume that
    > it's on the signal stack.
    >
    > Please tell me I'm being too paranoid. If we can break this assumption,
    > it would get rid of a lot of future pain.

    There are no AMX apps. I sure hope that there are no apps that enumerate xfeatures with CPUID and try to decode the mess in the signal stack.

    I do think we need to save AMX state *somewhere* if a signal happens unless userspace opts out, but I don’t think it needs to be in the nominally expected spot.
    \
     
     \ /
      Last update: 2021-03-24 22:44    [W:3.741 / U:0.416 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site