[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v1 06/27] x86/entry/64: Adapt assembly for PIE support
- To: Ingo Molnar <mingo@xxxxxxxxxx>
- From: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
- Date: Fri, 20 Oct 2017 19:52:17 +0200
- Cc: Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Radim Krčmář <rkrcmar@xxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, Daniel Micay <danielmicay@xxxxxxxxx>, Len Brown <len.brown@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Christopher Li <sparse@xxxxxxxxxxx>, " Jan H . Schönherr " <jschoenh@xxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, David Howells <dhowells@xxxxxxxxxx>, Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>, Waiman Long <longman@xxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>, "H . Peter Anvin" <hpa@xxxxxxxxx>, Kernel Hardening <kernel-hardening@xxxxxxxxxxxxxxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Peter Foley <pefoley2@xxxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, "Rafael J . Wysocki" <rafael.j.wysocki@xxxxxxxxx>, Kyle Huey <me@xxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Sparse Mailing-list <linux-sparse@xxxxxxxxxxxxxxx>, Matthias Kaehlcke <mka@xxxxxxxxxxxx>, linux-arch <linux-arch@xxxxxxxxxxxxxxx>, Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxx>, Alexey Dobriyan <adobriyan@xxxxxxxxx>, Markus Trippelsdorf <markus@xxxxxxxxxxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Rik van Riel <riel@xxxxxxxxxx>, Kees Cook <keescook@xxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Linux PM list <linux-pm@xxxxxxxxxxxxxxx>, "H . J . Lu" <hjl.tools@xxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Chris Wright <chrisw@xxxxxxxxxxxx>, Jason Baron <jbaron@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Alok Kataria <akataria@xxxxxxxxxx>, Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dou Liyang <douly.fnst@xxxxxxxxxxxxxx>, Paul Bolle <pebolle@xxxxxxxxxx>, "Paul E . McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>, Baoquan He <bhe@xxxxxxxxxx>, Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, kvm list <kvm@xxxxxxxxxxxxxxx>, Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>, "Rafael J . Wysocki" <rjw@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, "David S . Miller" <davem@xxxxxxxxxxxxx>, "Luis R . Rodriguez" <mcgrof@xxxxxxxxxx>, Lukas Wunner <lukas@xxxxxxxxx>, Linux Crypto Mailing List <linux-crypto@xxxxxxxxxxxxxxx>, Rob Landley <rob@xxxxxxxxxxx>, Jiri Kosina <jkosina@xxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Thomas Garnier <thgarnie@xxxxxxxxxx>, "Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>
- Delivery-date: Fri, 20 Oct 2017 17:52:34 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
> On Oct 20, 2017, at 5:20 PM, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
>
> * Thomas Garnier <thgarnie@xxxxxxxxxx> wrote:
>
>>>> */
>>>> - cmpq $.Lentry_SYSCALL_64_after_fastpath_call, (%rsp)
>>>> + leaq .Lentry_SYSCALL_64_after_fastpath_call(%rip), %r11
>>>> + cmpq %r11, (%rsp)
>>>> jne 1f
>
>>> This patch seems to add extra overhead to the syscall fast-path even when
>>> PIE is
>>> disabled, right?
>>
>> It does add extra instructions when one is not possible, I preferred
>> that over ifdefing but I can change it.
>
> So my problem is, this pattern repeats in many other places as well, but
> sprinking
> various pieces of assembly code with #ifdefs would be very bad as well.
>
> I have no good idea how to solve this.
>
> Thanks,
Ugh, brain was off. This is a bit messy. We could use a macro for this, too, I
suppose.
>
> Ingo
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|