[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiYSpmDOfpi9n7ETsxK2UrUKfT4kM=Y3yqRSaZuFFPY1A@mail.gmail.com>
Date: Thu, 1 Nov 2018 14:24:26 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: dalias@...c.org
Cc: Jann Horn <jannh@...gle.com>, luto@...nel.org,
dave.hansen@...ux.intel.com, sean.j.christopherson@...el.com,
jethro@...tanix.com, jarkko.sakkinen@...ux.intel.com,
fweimer@...hat.com, linux-api@...r.kernel.org, x86@...nel.org,
linux-arch@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>, nhorman@...hat.com,
npmccallum@...hat.com, serge.ayoun@...el.com,
shay.katz-zamir@...el.com, linux-sgx@...r.kernel.org,
andriy.shevchenko@...ux.intel.com, tglx@...utronix.de,
Ingo Molnar <mingo@...hat.com>, bp@...en8.de,
carlos@...hat.com, adhemerval.zanella@...aro.org
Subject: Re: RFC: userspace exception fixups
On Thu, Nov 1, 2018 at 12:31 PM Rich Felker <dalias@...c.org> wrote:
>
> See my other emails in this thread. You would register the *address*
> (in TLS) of a function pointer object pointing to the handler, rather
> than the function address of the handler. Then switching handler is
> just a single store in userspace, no syscalls involved.
Yes.
And for just EENTER, maybe that's the right model.
If we want to generalize it to other thread-synchronous faults, it
needs way more information and a list of handlers, but if we limit the
thing to _only_ EENTER getting an SGX fault, then a single "this is
the fault handler" address is probably the right thing to do.
Linus
Powered by blists - more mailing lists