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 16:55:52 +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:     "oe-kbuild-all@...ts.linux.dev" <oe-kbuild-all@...ts.linux.dev>,
        "Linux Memory Management List" <linux-mm@...ck.org>
Subject: RE: [PATCH next v2 5/5] minmax: Relax check to allow comparison
 between int and small unsigned constants.

From: kernel test robot
> Sent: 28 July 2023 22:43
> 
> kernel test robot noticed the following build warnings:
> 
> [auto build test WARNING on akpm-mm/mm-everything]
> [also build test WARNING on linus/master crng-random/master v6.5-rc3 next-20230728]
> [cannot apply to next-20230728]
> [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-Add-min_unsigned-a-b-and-
> max_unsigned-a-b/20230728-225439
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
> patch link:    https://lore.kernel.org/r/b4ce9dad748e489f9314a2dc95615033%40AcuMS.aculab.com
> patch subject: [PATCH next v2 5/5] minmax: Relax check to allow comparison between int and small
> unsigned constants.
> config: alpha-randconfig-r024-20230727 (https://download.01.org/0day-
> ci/archive/20230729/202307290538.EtRKfGgC-lkp@...el.com/config)
> compiler: alpha-linux-gcc (GCC) 12.3.0
> reproduce: (https://download.01.org/0day-ci/archive/20230729/202307290538.EtRKfGgC-
> 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/202307290538.EtRKfGgC-lkp@intel.com/
> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from include/linux/kernel.h:27,
>                     from include/linux/cpumask.h:10,
>                     from include/linux/mm_types_task.h:14,
>                     from include/linux/mm_types.h:5,
>                     from include/linux/buildid.h:5,
>                     from include/linux/module.h:14,
>                     from net/ceph/osdmap.c:5:
>    net/ceph/osdmap.c: In function 'osdmap_decode':
> >> include/linux/minmax.h:26:22: warning: ordered comparison of pointer with null pointer [-Wextra]
>       26 |                 ((x) >= (typeof(x))0 && (x) <= (typeof((x) + 0))(long)__INT_MAX__))

I have a cunning plan to fix this (and warnings about testing 'unsigned >= 0').
Basically replace the first test with:
	__builtin_choose_expr(is_signed(x), x, 1) >= 0

(Also fixes the build with clang < 16.)

Hopefully that v3 will keep the build robert happy :-)

	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