lkml.org 
[lkml]   [2018]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 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@libc.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

    \
     
     \ /
      Last update: 2018-11-01 20:34    [W:5.010 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site