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: <CAHk-=wg_e8=SasMy7j3oHpkWXSE1gDsUoXC8p=+N=9zd5VE1Jg@mail.gmail.com>
Date: Sun, 26 Jan 2025 16:08:26 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Uros Bizjak <ubizjak@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org, 
	mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.14-rc1

On Sun, 26 Jan 2025 at 15:27, Uros Bizjak <ubizjak@...il.com> wrote:
>
> The detection is put in include/linux/compiler.h where we can
> consolidate checks for both compilers:

No. Please. We have compiler-specific header files for a reason.
Exactly so that we do *not* need to have disgusting tests like

  #if ((defined(__GNUC__) && __GNUC__ >= 14) ||        \
       (defined(__clang__) && __clang_major__ >= 19)) &&    \
      !defined(__CHECKER__)

and instead it should just be

  #define CC_HAS_TYPEOF_UNQUAL (__clang_major__ >= 19)

in compiler-clang.h, and

  #define CC_HAS_TYPEOF_UNQUAL (__GNUC__ >= 14)

in compiler-gcc.h.

And then in the actual compiler.h, we could do

  #define USE_TYPEOF_UNQUAL (CC_HAS_TYPEOF_UNQUAL && !defined(__CHECKER__))

and now the places that then want to use __typeof_unqual__ have a very
straightforward way to check if they should do so.

             Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ