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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1336988f46fb7ffda925ab86a6e4d5437cfdb275.camel@perches.com>
Date:   Tue, 25 Jun 2019 15:29:27 -0700
From:   Joe Perches <joe@...ches.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>
Cc:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Kan Liang <kan.liang@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...omium.org>,
        Shawn Landden <shawn@....icu>,
        Nathan Chancellor <natechancellor@...il.com>,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        Chandler Carruth <chandlerc@...gle.com>
Subject: Re: [PATCH] perf/x86/intel: Mark expected switch fall-throughs

On Tue, 2019-06-25 at 11:15 -0700, Nick Desaulniers wrote:
> Unreleased versions of Clang built from source can; the latest release
> of Clang-8 doesn't have asm goto support required for
> CONFIG_JUMP_LABEL.  Things can get complicated based on which kernel
> tree/branch (mainline, -next, stable), arch, and configs, but I think
> we just have a few long tail bugs left.

At some point, when clang generically compiles the kernel,
I believe it'd be good to remove the various bits that
are unusual like CONFIG_CC_HAS_ASM_GOTO in Makefile
and the scripts/clang-version.sh and the like.

This could help when compiling a specific .config on
different systems.

Maybe add the equivalent compiler-gcc.h #define below
even before the removals

(whatever minor/patchlevel appropriate)
---
 include/linux/compiler-clang.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h
index 333a6695a918..b46aece0f9ca 100644
--- a/include/linux/compiler-clang.h
+++ b/include/linux/compiler-clang.h
@@ -5,6 +5,14 @@
 
 /* Compiler specific definitions for Clang compiler */
 
+#define CLANG_VERSION (__clang_major__ * 10000	\
+		       + __clang_minor__ * 100	\
+		       + __clang_patchlevel__)
+
+#if CLANG_VERSION < 90000
+# error Sorry, your compiler is too old - please upgrade it.
+#endif
+
 #define uninitialized_var(x) x = *(&(x))
 
 /* same as gcc, this was present in clang-2.6 so we can assume it works




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ