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: <20210520134112.ee15f156f1b7dbd3d8f16471@linux-foundation.org>
Date:   Thu, 20 May 2021 13:41:12 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Yury Norov <yury.norov@...il.com>,
        linux-kernel@...r.kernel.org, Ard Biesheuvel <ardb@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Subject: Re: [PATCH] linux/bits.h: Fix compilation error with GENMASK

On Tue, 11 May 2021 22:37:15 +0200 Rikard Falkeborn <rikard.falkeborn@...il.com> wrote:

> --- a/include/linux/const.h
> +++ b/include/linux/const.h
> @@ -3,4 +3,12 @@
>  
>  #include <vdso/const.h>
>  
> +/*
> + * This returns a constant expression while determining if an argument is
> + * a constant expression, most importantly without evaluating the argument.
> + * Glory to Martin Uecker <Martin.Uecker@....uni-goettingen.de>
> + */
> +#define __is_constexpr(x) \
> +	(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

Boggle.

Could someone please sometime enhance that comment a bit?  What need
does this thing satisfy and how on earth does it work?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ