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: <edccc580-5dac-a747-4326-53f401c8fab9@zytor.com>
Date:   Thu, 24 May 2018 14:56:31 -0700
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Alistair Strachan <astrachan@...gle.com>,
        Manoj Gupta <manojgupta@...gle.com>,
        Matthias Kaehlcke <mka@...gle.com>,
        Greg Hackmann <ghackmann@...gle.com>, sedat.dilek@...il.com,
        tstellar@...hat.com, LKML <linux-kernel@...r.kernel.org>,
        Kees Cook <keescook@...gle.com>
Subject: Re: [clang] stack protector and f1f029c7bf

On 05/24/18 14:27, Nick Desaulniers wrote:
> https://godbolt.org/g/oku8ux
> 
> Is there a more canonical way the kernel does feature detection that looks
> better than:
> 

Hm. I though we had, but it doesn't seem so. For cc we only seem to be
able to detect flags. For as we have rules that can detect new
instructions; something similar in Kbuild would be good.

> diff --git a/arch/x86/include/asm/irqflags.h
> b/arch/x86/include/asm/irqflags.h
> index 89f08955fff7..90974b5d023c 100644
> --- a/arch/x86/include/asm/irqflags.h
> +++ b/arch/x86/include/asm/irqflags.h
> @@ -13,6 +13,8 @@
>    * Interrupt control:
>    */
> 
> +#ifdef GCC_VERSION
> +#if GCC_VERSION < 40900

We don't actually test if GCC_VERSION is defined anywhere in the kernel.
We probably should explicitly define it to either 0 or some baseline
version if it is undefined.  (Clang defines __GNUC__ so it will define
GCC_VERSION.)

	-hpa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ