lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 01 Sep 2021 21:22:07 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Dan Williams <dan.j.williams@...el.com>,
        Borislav Petkov <bp@...en8.de>,
        LKML <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [patch 01/10] x86/fpu/signal: Clarify exception handling in
 restore_fpregs_from_user()

Sean,

On Wed, Sep 01 2021 at 16:47, Sean Christopherson wrote:
> On Wed, Sep 01, 2021, Thomas Gleixner wrote:
>> Though while for the FPU use case we really want to handle the #MC case,
>> it's not clear to me whether this is actually correct for SGX.
>> 
>> Jarkko, Sean, Dave?
>
> Are you asking about #MC specifically, or about SGX consuming the trap number in
> general?

#MC

> For #MC, it's probably a moot point because #MC on ENCLS is not recoverable for
> current hardware.  If #MC somehow occurs on ENCLS and doesn't kill the platform,
> "handling" the #MC in SGX is probably wrong.  Note, Tony is working on a series to
> support recoverable #MC on SGX stuff on future hardware[*], but I'm not sure that's
> relevant to this discussion.

Probably not.

> As for SGX consuming the trap number in general, it's correct.  For non-KVM usage,
> it's nice to have but not strictly necessary.  Any fault except #PF on ENCLS is
> guaranteed to be a kernel or hardware bug; SGX uses the trap number to WARN on a
> !#PF exception, e.g. on #GP or #UD.  Not having the trap number would mean losing
> those sanity checks, which have been useful in the past.
>
> For virtualizing SGX, KVM needs the trap number so that it can inject the correct
> exception into the guest, e.g. if the guest violates the ENCLS concurrency rules
> it should get a #GP, whereas a EPCM violation should #PF.

Yes, I understood that part, but I was confused about the #MC part.

Thanks for clarifying!

       tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ