:You can check the stack frame for the RIP and if it is alreday in the
:kernel, you can skip the swapgs. Given that you have to do more work for
:traps from userland anyway, that's a relatively cheap change.
:
:Joerg

    You can't, because not all traps to the system disable interrupts.
    This means that another interrupt can occur after the stack frame has
    been pushed, but before swapgs has been run the first time.

    It really is a lot easier to just load a pointer from a fixed address.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>

Reply via email to