[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] x86: PIE support and option to extend KASLR randomization
- To: "H. Peter Anvin" <hpa@xxxxxxxxx>,Kees Cook <keescook@xxxxxxxxxxxx>
- From: hjl.tools@xxxxxxxxx
- Date: Sat, 23 Sep 2017 06:19:05 +0800
- Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>, Pavel Machek <pavel@xxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, Matthias Kaehlcke <mka@xxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxx>, Len Brown <len.brown@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Brian Gerst <brgerst@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Chris, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "Rafael J . Wysocki" <rjw@xxxxxxxxxxxxx>, "David S . Miller" <davem@xxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>, Thomas Garnier <thgarnie@xxxxxxxxxx>, "Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
- Delivery-date: Sat, 23 Sep 2017 06:21:47 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On September 23, 2017 3:06:16 AM GMT+08:00, "H. Peter Anvin" <hpa@xxxxxxxxx> wrote:
On 09/22/17 11:57, Kees Cook wrote:
On Fri, Sep 22, 2017 at 11:38 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
We lose EBX on 32 bits, but we don't lose RBX on 64 bits - since x86-64 has RIP-relative addressing there is no need for a dedicated PIC register.
FWIW, since gcc 5, the PIC register isn't totally lost. It is now reusable, and that seems to have improved performance: https://gcc.gnu.org/gcc-5/changes.html
It still talks about a PIC register on x86-64, which confuses me. Perhaps older gcc's would allocate a PIC register under certain circumstances, and then lose it for the entire function?
For i386, the PIC register is required by the ABI to be %ebx at the point any PLT entry is called. Not an issue with -mno-plt which goes straight to the GOT, although in most cases there needs to be a PIC register to find the GOT unless load-time relocation is permitted.
-hpa
We need a static PIE option so that compiler can optimize it
without using hidden visibility.
H.J.
Sent from my Android device with K-9 Mail. Please excuse my brevity._______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|