> On Aug 18, 2020, at 10:31 AM, Sean Christopherson <sean.j.christopherson@xxxxxxxxx> wrote: > > On Tue, Aug 18, 2020 at 10:15:49AM -0700, Andy Lutomirski wrote: >>> On Mon, Aug 17, 2020 at 9:24 PM Sean Christopherson >>> <sean.j.christopherson@xxxxxxxxx> wrote: >>> >>> Allow userspace to exit the vDSO on interrupts that are acknowledged >>> while the enclave is active. This allows the user's runtime to switch >>> contexts at opportune times without additional overhead, e.g. when using >>> an M:N threading model (where M user threads run N TCSs, with N > M). >> >> This is IMO rather odd. We don't support this type of notification on >> interrupts for normal user code. The fact user code can detect >> interrupts during enclave execution is IMO an oddity of SGX, and I >> have asked Intel to consider replacing the AEX mechanism with >> something more transparent to user mode. If this ever happens, this >> mechanism is toast. >> >> Even without architecture changes, building a *reliable* M:N threading >> mechanism on top of this will be difficult or impossible, as there is >> no particular guarantee that a thread will get timing interrupts at >> all or that these interrupts will get lucky and hit enclave code, thus >> triggering an AEX. We certainly don't, and probably never will, >> support any corresponding feature for non-enclave code. >> >> So this seems like an odd, and possibly unsupportable, feature to add. > > I 100% agree that allowing the user to act on interrupts is weird/fragile. > I'll happily kill this off if there's an "official" NAK, but I wanted to > force the issue so that we're not stuck in limbo wondering whether or not > this should be supported. If you would like an official NAK, here you go: NAK! If users want M:N and SIGALRM isn’t good enough, add something better. Please don’t rely on an architectural wart as an alternative.