lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1805161151490.1627@nanos.tec.linutronix.de>
Date:   Wed, 16 May 2018 11:52:42 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
cc:     Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, Hugh Dickins <hughd@...gle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 1/2] x86/boot/compressed/64: Set up GOT for paging_prepare()
 and cleanup_trampoline()

On Wed, 16 May 2018, Kirill A. Shutemov wrote:

> Eric and Hugh have reported instant reboot due to my recent changes in
> decompression code.
> 
> The root cause is that I didn't realize that we need to adjust GOT to be
> able to run C code that early.
> 
> The problem is only visible with an older toolchain. Binutils >= 2.24 is
> able to eliminate GOT references by replacing them with RIP-relative
> address loads[1].
> 
> We need to adjust GOT two times:
>  - before calling paging_prepare() using the initial load address
>  - before calling C code from the relocated kernel
> 
> [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=80d873266dec
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Fixes: 194a9749c73d ("x86/boot/compressed/64: Handle 5-level paging boot if kernel is above 4G")
> Reported-by: Eric Dumazet <eric.dumazet@...il.com>
> Reported-by: Hugh Dickins <hughd@...gle.com>

Very nice and well done!

Reviewed-by: Thomas Gleixner <tglx@...utronix.de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ