[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3b69fcd666e498da74c12f332c3a2a0@AcuMS.aculab.com>
Date: Thu, 25 Jul 2024 16:39:44 +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@...uxfoundation.org>
CC: "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
"oe-kbuild-all@...ts.linux.dev" <oe-kbuild-all@...ts.linux.dev>, "'Matthew
Wilcox (Oracle)'" <willy@...radead.org>, 'Christoph Hellwig'
<hch@...radead.org>, 'Andrew Morton' <akpm@...ux-foundation.org>, "Linux
Memory Management List" <linux-mm@...ck.org>, 'Andy Shevchenko'
<andriy.shevchenko@...ux.intel.com>, 'Dan Carpenter'
<dan.carpenter@...aro.org>, 'Arnd Bergmann' <arnd@...nel.org>,
"'Jason@...c4.com'" <Jason@...c4.com>, "'pedro.falcato@...il.com'"
<pedro.falcato@...il.com>, 'Mateusz Guzik' <mjguzik@...il.com>
Subject: RE: [PATCH 4/7] minmax: Simplify signedness check
From: kernel test robot <lkp@...el.com>
> Sent: 25 July 2024 14:24
>
> Hi David,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on linux/master]
> [also build test ERROR on linus/master v6.10 next-20240725]
> [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/20240724-224832
> base: linux/master
> patch link: https://lore.kernel.org/r/03601661326c4efba4e618ead15fa0e2%40AcuMS.aculab.com
> patch subject: [PATCH 4/7] minmax: Simplify signedness check
> config: mips-loongson1b_defconfig (https://download.01.org/0day-
> ci/archive/20240725/202407252100.fDFchC5O-lkp@...el.com/config)
> compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project
> 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> reproduce (this is a W=1 build): (https://download.01.org/0day-
> ci/archive/20240725/202407252100.fDFchC5O-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/202407252100.fDFchC5O-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
...
> b286d8b1a690667 Herbert Xu 2016-11-22 75
> b286d8b1a690667 Herbert Xu 2016-11-22 76 /* Get a spot of the specified length that does not straddle a page.
> b286d8b1a690667 Herbert Xu 2016-11-22 77 * The caller needs to ensure that there is enough space for this operation.
> b286d8b1a690667 Herbert Xu 2016-11-22 78 */
> b286d8b1a690667 Herbert Xu 2016-11-22 79 static inline u8 *skcipher_get_spot(u8 *start, unsigned int len)
> b286d8b1a690667 Herbert Xu 2016-11-22 80 {
> b286d8b1a690667 Herbert Xu 2016-11-22 81 u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
> b286d8b1a690667 Herbert Xu 2016-11-22 82
> b286d8b1a690667 Herbert Xu 2016-11-22 @83 return max(start, end_page);
> b286d8b1a690667 Herbert Xu 2016-11-22 84 }
> b286d8b1a690667 Herbert Xu 2016-11-22 85
I thought this version supported that :-(
Certainly I've hit and fixed this before.
Using min/max() on pointers just makes it all more horrid.
The problem is that is_signed_type() isn't 'constant enough' for pointers.
Supporting pointers may require yet another (bloating) _is_constexpr() call.
Or add a simpler min_ptr() that includes a 'pointer' check.
But this might only be reported by clang with W=1.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists