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]
Date:   Sun, 30 Jul 2023 14:55:50 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'kernel test robot' <lkp@...el.com>,
        "'linux-kernel@...r.kernel.org'" <linux-kernel@...r.kernel.org>,
        'Andy Shevchenko' <andriy.shevchenko@...ux.intel.com>,
        'Andrew Morton' <akpm@...ux-foundation.org>,
        "'Matthew Wilcox (Oracle)'" <willy@...radead.org>,
        'Christoph Hellwig' <hch@...radead.org>,
        "'Jason A. Donenfeld'" <Jason@...c4.com>
CC:     "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        "oe-kbuild-all@...ts.linux.dev" <oe-kbuild-all@...ts.linux.dev>
Subject: RE: [PATCH next v2 2/5] minmax: Allow min()/max()/clamp() if the
 arguments have the same signedness.

From: kernel test robot
> Sent: 29 July 2023 03:01
> 
> kernel test robot noticed the following build errors:
> 
...)
> compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git
> 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290943.ODVeyeK6-
> lkp@...el.com/reproduce)
> 
...
> >> mm/percpu.c:3102:10: error: static assertion expression is not an integral constant expression
>                    base = min(ptr, base);
>                           ^~~~~~~~~~~~~~
...                    ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
>    include/linux/minmax.h:23:2: note: expanded from macro '__types_ok'
>            (is_signed_type(typeof(x)) == is_signed_type(typeof(y)))
>            ^
...
>    mm/percpu.c:3102:10: note: cast that performs the conversions of a reinterpret_cast is not allowed
> in a constant expression

That is a C++ error that seems to have crept into C.
The relevant definition is:

#define is_signed_type(type)  (((type)(-1)) < (type)1)

This seems to have been fixed in clang 16.0.0.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ