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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-7c21383f3429dd70da39c0c7f1efa12377a47ab6@git.kernel.org>
Date:   Fri, 5 Apr 2019 03:40:18 -0700
From:   tip-bot for Kees Cook <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...hat.com, keescook@...omium.org, tglx@...utronix.de,
        linux-kernel@...r.kernel.org, x86@...nel.org, mingo@...nel.org,
        hpa@...or.com, bp@...e.de, ndesaulniers@...gle.com
Subject: [tip:x86/build] x86/build: Keep local relocations with ld.lld

Commit-ID:  7c21383f3429dd70da39c0c7f1efa12377a47ab6
Gitweb:     https://git.kernel.org/tip/7c21383f3429dd70da39c0c7f1efa12377a47ab6
Author:     Kees Cook <keescook@...omium.org>
AuthorDate: Thu, 4 Apr 2019 14:40:27 -0700
Committer:  Borislav Petkov <bp@...e.de>
CommitDate: Fri, 5 Apr 2019 12:34:35 +0200

x86/build: Keep local relocations with ld.lld

The LLVM linker (ld.lld) defaults to removing local relocations, which
causes KASLR boot failures. ld.bfd and ld.gold already handle this
correctly. This adds the explicit instruction "--discard-none" during
the link phase. There is no change in output for ld.bfd and ld.gold,
but ld.lld now produces an image with all the needed relocations.

Signed-off-by: Kees Cook <keescook@...omium.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: "H. Peter Anvin" <hpa@...or.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: clang-built-linux@...glegroups.com
Cc: x86-ml <x86@...nel.org>
Link: https://lkml.kernel.org/r/20190404214027.GA7324@beast
Link: https://github.com/ClangBuiltLinux/linux/issues/404
---
 arch/x86/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index a587805c6687..56e748a7679f 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -47,7 +47,7 @@ export REALMODE_CFLAGS
 export BITS
 
 ifdef CONFIG_X86_NEED_RELOCS
-        LDFLAGS_vmlinux := --emit-relocs
+        LDFLAGS_vmlinux := --emit-relocs --discard-none
 endif
 
 #

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ