From: kernel test robot <lkp@intel.com>
To: david.laight.linux@gmail.com,
Nathan Chancellor <nathan@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
Yury Norov <yury.norov@gmail.com>,
Jani Nikula <jani.nikula@intel.com>,
Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Kees Cook <keescook@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
David Laight <david.laight.linux@gmail.com>
Subject: Re: [PATCH next 11/14] bit: Strengthen compile-time tests in GENMASK() and BIT()
Date: Thu, 22 Jan 2026 09:11:53 +0800 [thread overview]
Message-ID: <202601220829.MgTMeqqN-lkp@intel.com> (raw)
In-Reply-To: <20260121145731.3623-12-david.laight.linux@gmail.com>
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on next-20260120]
url: https://github.com/intel-lab-lkp/linux/commits/david-laight-linux-gmail-com/overflow-Reduce-expansion-of-__type_max/20260122-013456
base: next-20260120
patch link: https://lore.kernel.org/r/20260121145731.3623-12-david.laight.linux%40gmail.com
patch subject: [PATCH next 11/14] bit: Strengthen compile-time tests in GENMASK() and BIT()
config: s390-randconfig-001-20260122 (https://download.01.org/0day-ci/archive/20260122/202601220829.MgTMeqqN-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260122/202601220829.MgTMeqqN-lkp@intel.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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601220829.MgTMeqqN-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from arch/s390/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from arch/s390/include/asm/cmpxchg.h:11,
from arch/s390/include/asm/atomic.h:16,
from include/linux/atomic.h:7,
from include/asm-generic/bitops/atomic.h:5,
from arch/s390/include/asm/bitops.h:75,
from include/linux/bitops.h:67,
from include/linux/kernel.h:23,
from net/core/page_pool.c:10:
In function 'netmem_clear_pp_magic',
inlined from 'page_pool_clear_pp_info' at net/core/page_pool.c:721:2:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:120:25: note: in definition of macro 'WARN_ON_ONCE'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
net/core/netmem_priv.h:18:52: note: in expansion of macro 'PP_DMA_INDEX_MASK'
WARN_ON_ONCE(netmem_to_nmdesc(netmem)->pp_magic & PP_DMA_INDEX_MASK);
^~~~~~~~~~~~~~~~~
--
In file included from include/linux/bitops.h:6,
from arch/s390/include/asm/machine.h:25,
from arch/s390/include/asm/lowcore.h:13,
from arch/s390/include/asm/current.h:13,
from arch/s390/include/asm/preempt.h:5,
from include/linux/preempt.h:79,
from arch/s390/include/asm/timex.h:13,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from net/core/skbuff.c:37:
In function 'netmem_get_pp_magic',
inlined from 'netmem_is_pp' at net/core/netmem_priv.h:25:10,
inlined from 'napi_pp_put_page' at net/core/skbuff.c:1027:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
net/core/netmem_priv.h:8:47: note: in expansion of macro 'PP_DMA_INDEX_MASK'
return netmem_to_nmdesc(netmem)->pp_magic & ~PP_DMA_INDEX_MASK;
^~~~~~~~~~~~~~~~~
In function 'netmem_is_pp',
inlined from 'napi_pp_put_page' at net/core/skbuff.c:1027:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
include/linux/mm.h:4650:25: note: in expansion of macro 'PP_DMA_INDEX_MASK'
#define PP_MAGIC_MASK ~(PP_DMA_INDEX_MASK | 0x3UL)
^~~~~~~~~~~~~~~~~
net/core/netmem_priv.h:25:40: note: in expansion of macro 'PP_MAGIC_MASK'
return (netmem_get_pp_magic(netmem) & PP_MAGIC_MASK) == PP_SIGNATURE;
^~~~~~~~~~~~~
In function 'netmem_get_pp_magic',
inlined from 'netmem_is_pp' at net/core/netmem_priv.h:25:10,
inlined from 'napi_pp_put_page' at net/core/skbuff.c:1027:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
net/core/netmem_priv.h:8:47: note: in expansion of macro 'PP_DMA_INDEX_MASK'
return netmem_to_nmdesc(netmem)->pp_magic & ~PP_DMA_INDEX_MASK;
^~~~~~~~~~~~~~~~~
In function 'netmem_is_pp',
inlined from 'napi_pp_put_page' at net/core/skbuff.c:1027:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
include/linux/mm.h:4650:25: note: in expansion of macro 'PP_DMA_INDEX_MASK'
#define PP_MAGIC_MASK ~(PP_DMA_INDEX_MASK | 0x3UL)
^~~~~~~~~~~~~~~~~
net/core/netmem_priv.h:25:40: note: in expansion of macro 'PP_MAGIC_MASK'
return (netmem_get_pp_magic(netmem) & PP_MAGIC_MASK) == PP_SIGNATURE;
^~~~~~~~~~~~~
In function 'netmem_get_pp_magic',
inlined from 'netmem_is_pp' at net/core/netmem_priv.h:25:10,
inlined from 'skb_pp_frag_ref' at net/core/skbuff.c:1067:7,
inlined from 'skb_try_coalesce' at net/core/skbuff.c:6203:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
net/core/netmem_priv.h:8:47: note: in expansion of macro 'PP_DMA_INDEX_MASK'
return netmem_to_nmdesc(netmem)->pp_magic & ~PP_DMA_INDEX_MASK;
^~~~~~~~~~~~~~~~~
In function 'netmem_is_pp',
inlined from 'skb_pp_frag_ref' at net/core/skbuff.c:1067:7,
inlined from 'skb_try_coalesce' at net/core/skbuff.c:6203:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
include/linux/mm.h:4650:25: note: in expansion of macro 'PP_DMA_INDEX_MASK'
#define PP_MAGIC_MASK ~(PP_DMA_INDEX_MASK | 0x3UL)
^~~~~~~~~~~~~~~~~
net/core/netmem_priv.h:25:40: note: in expansion of macro 'PP_MAGIC_MASK'
return (netmem_get_pp_magic(netmem) & PP_MAGIC_MASK) == PP_SIGNATURE;
^~~~~~~~~~~~~
In function 'netmem_get_pp_magic',
inlined from 'netmem_is_pp' at net/core/netmem_priv.h:25:10,
inlined from 'skb_pp_frag_ref' at net/core/skbuff.c:1067:7,
inlined from 'skb_try_coalesce' at net/core/skbuff.c:6203:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
net/core/netmem_priv.h:8:47: note: in expansion of macro 'PP_DMA_INDEX_MASK'
return netmem_to_nmdesc(netmem)->pp_magic & ~PP_DMA_INDEX_MASK;
^~~~~~~~~~~~~~~~~
In function 'netmem_is_pp',
inlined from 'skb_pp_frag_ref' at net/core/skbuff.c:1067:7,
inlined from 'skb_try_coalesce' at net/core/skbuff.c:6203:6:
>> include/linux/bits.h:35:4: error: call to 'GENMASK_INPUT_CHECK_FAIL' declared with attribute error: Invalid bit numbers
GENMASK_INPUT_CHECK_FAIL()))
^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/bits.h:54:17: note: in expansion of macro 'GENMASK_INPUT_CHECK'
((unsigned int)GENMASK_INPUT_CHECK(h, l, BITS_PER_TYPE(t)) + \
^~~~~~~~~~~~~~~~~~~
include/linux/bits.h:58:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
include/linux/mm.h:4641:27: note: in expansion of macro 'GENMASK'
#define PP_DMA_INDEX_MASK GENMASK(PP_DMA_INDEX_BITS + PP_DMA_INDEX_SHIFT - 1, \
^~~~~~~
include/linux/mm.h:4650:25: note: in expansion of macro 'PP_DMA_INDEX_MASK'
#define PP_MAGIC_MASK ~(PP_DMA_INDEX_MASK | 0x3UL)
^~~~~~~~~~~~~~~~~
net/core/netmem_priv.h:25:40: note: in expansion of macro 'PP_MAGIC_MASK'
return (netmem_get_pp_magic(netmem) & PP_MAGIC_MASK) == PP_SIGNATURE;
^~~~~~~~~~~~~
vim +/GENMASK_INPUT_CHECK_FAIL +35 include/linux/bits.h
25
26 #ifndef KBUILD_EXTRA_WARNc
27 #define GENMASK_INPUT_CHECK(h, l, width) 0
28 #else
29 int GENMASK_INPUT_CHECK_FAIL(void) __compiletime_error("Invalid bit numbers");
30 #define GENMASK_INPUT_CHECK(h, l, width) \
31 (__builtin_choose_expr(__is_constexpr((l) > (h)), \
32 sizeof(struct { char low_bit_greater_than_high[-((l) > (h))];}), \
33 __builtin_constant_p((l) | (h)) && \
34 ((l) < 0 || (l) > (h) || (h) >= width) && \
> 35 GENMASK_INPUT_CHECK_FAIL()))
36 #endif
37
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2026-01-22 1:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260121145731.3623-12-david.laight.linux@gmail.com>
2026-01-22 1:11 ` kernel test robot [this message]
2026-01-22 10:25 ` David Laight
2026-01-22 20:10 ` David Laight
2026-01-22 4:41 ` kernel test robot
2026-01-22 10:33 ` David Laight
2026-01-22 14:26 ` Andy Shevchenko
2026-01-22 14:55 ` David Laight
2026-01-23 1:25 ` Philip Li
2026-01-23 8:01 ` Vincent Mailhol
2026-01-23 8:11 ` Andy Shevchenko
2026-01-23 8:20 ` Al Viro
2026-01-23 8:24 ` Andy Shevchenko
2026-01-23 8:32 ` Vincent Mailhol
2026-01-23 8:46 ` Andy Shevchenko
2026-01-23 1:24 ` Philip Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202601220829.MgTMeqqN-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=david.laight.linux@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jani.nikula@intel.com \
--cc=keescook@chromium.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=nathan@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox