Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288212

Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path

From Brian Gerst <brgerst@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path
Date 2015-12-10 06:50 +0100
Message-ID <qE2h5-1SS-9@gated-at.bofh.it> (permalink)
References (1 earlier) <qDMFk-nF-13@gated-at.bofh.it> <qDS82-3Fq-17@gated-at.bofh.it> <qDU9R-5bQ-19@gated-at.bofh.it> <qDUjx-5eV-19@gated-at.bofh.it> <qDWOm-6Hc-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Dec 9, 2015 at 6:50 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> On Wed, Dec 9, 2015 at 1:15 PM, Andy Lutomirski <luto@amacapital.net> wrote:
>> On Wed, Dec 9, 2015 at 1:08 PM, Brian Gerst <brgerst@gmail.com> wrote:
>>> Simplified version:
>>> ENTRY(stub_ptregs_64)
>>>     cmpl $fast_path_return, (%rsp)
>>
>> Does that instruction actually work the way you want it to?  (Does it
>> link?)  I think you might need to use leaq the way I did in my patch.

It should have been cmpq.  leaq isn't necessary, since immediates are
sign-extended to 64-bit.

>>>     jne 1f
>>>     SAVE_EXTRA_REGS offset=8
>>>     call *%rax
>>>     RESTORE_EXTRA_REGS offset=8
>>>     ret
>>> 1:
>>>     jmp *%rax
>>> END(stub_ptregs_64)
>>
>> This'll work, I think, but I still think I prefer keeping as much
>> complexity as possible in the slow path.  I could be convinced
>> otherwise, though -- this variant is reasonably clean.
>
> On further reflection, there's at least one functional difference.
> With my variant, modifying pt_regs from sys_foo/ptregs is safe.  In
> your variant, it's unsafe unless force_iret() is called.  I don't know
> whether we care.

I can go either way at this point.  My main concern was getting rid of
the duplicate table.

--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on the slow path Andy Lutomirski <luto@kernel.org> - 2015-12-07 23:00 +0100
  Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Brian Gerst <brgerst@gmail.com> - 2015-12-08 02:00 +0100
    Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Andy Lutomirski <luto@amacapital.net> - 2015-12-08 02:20 +0100
      Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Brian Gerst <brgerst@gmail.com> - 2015-12-08 14:10 +0100
        Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Ingo Molnar <mingo@kernel.org> - 2015-12-08 20:00 +0100
          Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Andy Lutomirski <luto@amacapital.net> - 2015-12-08 23:00 +0100
  Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Brian Gerst <brgerst@gmail.com> - 2015-12-08 02:00 +0100
  Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Brian Gerst <brgerst@gmail.com> - 2015-12-09 05:50 +0100
    Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Andy Lutomirski <luto@amacapital.net> - 2015-12-09 06:50 +0100
      Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Andy Lutomirski <luto@amacapital.net> - 2015-12-09 07:30 +0100
        Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on  the slow path Brian Gerst <brgerst@gmail.com> - 2015-12-09 14:00 +0100
        [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Brian Gerst <brgerst@gmail.com> - 2015-12-09 14:10 +0100
          Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Andy Lutomirski <luto@amacapital.net> - 2015-12-09 20:00 +0100
            Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Brian Gerst <brgerst@gmail.com> - 2015-12-09 22:10 +0100
              Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Andy Lutomirski <luto@amacapital.net> - 2015-12-09 22:20 +0100
                Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Andy Lutomirski <luto@amacapital.net> - 2015-12-10 01:00 +0100
                Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Brian Gerst <brgerst@gmail.com> - 2015-12-10 06:50 +0100
                Re: [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Andy Lutomirski <luto@amacapital.net> - 2015-12-10 07:00 +0100
          [PATCH] x86/entry/64: Remove duplicate syscall table for fast path Andy Lutomirski <luto@kernel.org> - 2015-12-09 20:40 +0100

csiph-web