[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181101193107.GE5150@brightrain.aerifal.cx>
Date: Thu, 1 Nov 2018 15:31:07 -0400
From: Rich Felker <dalias@...c.org>
To: Linus Torvalds <torvalds@...ux-foundation.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 01, 2018 at 12:10:35PM -0700, Linus Torvalds wrote:
> On Thu, Nov 1, 2018 at 11:52 AM Rich Felker <dalias@...c.org> wrote:
> >
> > There's no need to chain if the handler is specific to the context
> > where the fault happens. You just replace the handler with the one
> > relevant to the code you're about to run before you run it.
>
> That's much too expensive to do as a system call.
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.
Rich
Powered by blists - more mailing lists