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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <291975e1412548daa70abfe747dfd893@AcuMS.aculab.com>
Date: Tue, 27 Feb 2024 09:10:09 +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>, 'Linus Torvalds'
	<torvalds@...ux-foundation.org>, 'Netdev' <netdev@...r.kernel.org>,
	"'dri-devel@...ts.freedesktop.org'" <dri-devel@...ts.freedesktop.org>
CC: "oe-kbuild-all@...ts.linux.dev" <oe-kbuild-all@...ts.linux.dev>, "'Jens
 Axboe'" <axboe@...nel.dk>, "'Matthew Wilcox (Oracle)'" <willy@...radead.org>,
	'Christoph Hellwig' <hch@...radead.org>, "'linux-btrfs@...r.kernel.org'"
	<linux-btrfs@...r.kernel.org>, 'Andrew Morton' <akpm@...ux-foundation.org>,
	Linux Memory Management List <linux-mm@...ck.org>, 'Andy Shevchenko'
	<andriy.shevchenko@...ux.intel.com>, "'David S . Miller'"
	<davem@...emloft.net>, 'Dan Carpenter' <dan.carpenter@...aro.org>, "'Jani
 Nikula'" <jani.nikula@...ux.intel.com>
Subject: RE: [PATCH next v2 03/11] minmax: Simplify signedness check

From: kernel test robot
> Sent: 27 February 2024 01:34
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on drm-misc/drm-misc-next]
> [also build test WARNING on linux/master mkl-can-next/testing kdave/for-next akpm-mm/mm-nonmm-unstable
> axboe-block/for-next linus/master v6.8-rc6 next-20240226]
> [cannot apply to next-20240223 dtor-input/next dtor-input/for-linus horms-ipvs/master]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch#_base_tree_information]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/David-Laight/minmax-Put-all-the-clamp-
> definitions-together/20240226-005902
> base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
> patch link:    https://lore.kernel.org/r/8657dd5c2264456f8a005520a3b90e2b%40AcuMS.aculab.com
> patch subject: [PATCH next v2 03/11] minmax: Simplify signedness check
> config: alpha-defconfig (https://download.01.org/0day-ci/archive/20240227/202402270937.9kmO5PFt-
> lkp@...el.com/config)
> compiler: alpha-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-
> ci/archive/20240227/202402270937.9kmO5PFt-lkp@...el.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202402270937.9kmO5PFt-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/kernel.h:28,
>                     from include/linux/cpumask.h:10,
>                     from include/linux/smp.h:13,
>                     from include/linux/lockdep.h:14,
>                     from include/linux/spinlock.h:63,
>                     from include/linux/swait.h:7,
>                     from include/linux/completion.h:12,
>                     from include/linux/crypto.h:15,
>                     from include/crypto/aead.h:13,
>                     from include/crypto/internal/aead.h:11,
>                     from crypto/skcipher.c:12:
>    crypto/skcipher.c: In function 'skcipher_get_spot':
> >> include/linux/minmax.h:31:70: warning: ordered comparison of pointer with integer zero [-Wextra]
>       31 |         (is_unsigned_type(typeof(x)) || (__is_constexpr(x) ? (x) + 0 >= 0 : 0))

Hmmm -Wextra isn't normally set.
But I do wish the compiler would do dead code elimination before
these warnings.

Apart from stopping code using min()/max() for pointer types
(all the type checking is pointless) I think that __is_constextr()
can be implemented using _Generic (instead of sizeof(type)) and then the
true/false return values can be specified and need not be the same types.
That test can then be:
	(__if_constexpr(x, x, -1) >= 0)
(The '+ 0' is there to convert bool to int and won't be needed
for non-constant bool.)

I may drop the last few patches until MIN/MAX have been removed
from everywhere else to free up the names.

	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