[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v4 14/27] x86/percpu: Adapt percpu for PIE support
- To: Thomas Garnier <thgarnie@xxxxxxxxxx>
- From: Christopher Lameter <cl@xxxxxxxxx>
- Date: Tue, 29 May 2018 22:46:00 +0000
- Cc: Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>, kernel-hardening@xxxxxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Skip Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>, Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, x86@xxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Borislav Petkov <bp@xxxxxxx>, Alexey Dobriyan <adobriyan@xxxxxxxxx>, Skip Tom Lendacky <thomas.lendacky@xxxxxxx>, Skip Kees Cook <keescook@xxxxxxxxxxxx>, Skip Frederic Weisbecker <frederic@xxxxxxxxxx>, Skip Nicholas Piggin <npiggin@xxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Cao jin <caoj.fnst@xxxxxxxxxxxxxx>, Skip Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Francis Deslauriers <francis.deslauriers@xxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Philippe Ombredanne <pombredanne@xxxxxxxx>, Dennis Zhou <dennisszhou@xxxxxxxxx>, Skip Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>, "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
- Delivery-date: Tue, 29 May 2018 22:54:39 +0000
- Feedback-id: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, 29 May 2018, Thomas Garnier wrote:
> Perpcu uses a clever design where the .percu ELF section has a virtual
> address of zero and the relocation code avoid relocating specific
> symbols. It makes the code simple and easily adaptable with or without
> SMP support.
>
> This design is incompatible with PIE because generated code always try to
> access the zero virtual address relative to the default mapping address.
We always access relative to the "segment register".
You can already change the segment register to relocate the per cpu
sections arbitrarily since all per cpu "addresses" are offsets relative to
the segment register. I am not sure what exactly you are trying to
accomplish here?
Maybe you need to explain it better?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|