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-next>] [day] [month] [year] [list]
Date:   Sat,  8 Dec 2018 13:38:16 +0100
From:   Kirill Marinushkin <k.marinushkin@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>
Cc:     Kirill Marinushkin <k.marinushkin@...il.com>,
        Zhenzhong Duan <zhenzhong.duan@...cle.com>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: [PATCH] x86/retpoline: Fix forcing me to update my compiler

First problem: I cannot compile the kernel with my version of compiler

~~~~
$ make defconfig
*** Default configuration is based on 'i386_defconfig'
\#
\# configuration written to .config
\#
$ grep CONFIG_RETPOLINE .config
CONFIG_RETPOLINE=y
$ make
arch/x86/Makefile:224: *** You are building kernel with non-retpoline
compiler, please update your compiler..  Stop.
~~~~

Second problem: when I disable the feature - it cannot take effect,
because the parse-time error happens before `syncconfig`

~~~~
$ scripts/config -d RETPOLINE
$ grep CONFIG_RETPOLINE .config
\# CONFIG_RETPOLINE is not set
$ make
arch/x86/Makefile:224: *** You are building kernel with non-retpoline
compiler, please update your compiler..  Stop.
~~~~

Fixes: 4cd24de3a098 ("x86/retpoline: Make CONFIG_RETPOLINE depend on compiler support")

Signed-off-by: Kirill Marinushkin <k.marinushkin@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Zhenzhong Duan <zhenzhong.duan@...cle.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: x86@...nel.org
Cc: linux-kernel@...r.kernel.org
Cc: stable@...r.kernel.org
---
 arch/x86/Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index f5d7f4134524..26a2198c59b3 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -220,9 +220,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
 
 # Avoid indirect branches in kernel to deal with Spectre
 ifdef CONFIG_RETPOLINE
-ifeq ($(RETPOLINE_CFLAGS),)
-  $(error You are building kernel with non-retpoline compiler, please update your compiler.)
-endif
   KBUILD_CFLAGS += $(RETPOLINE_CFLAGS)
 endif
 
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ