Skip to contentSkip to conversation

linux-next: build warning after merge of the tip tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Jul 8, 2025 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_allmodconfig) produced this warning:

In file included from include/vdso/datapage.h:8,
from lib/vdso/gettimeofday.c:6,
from <command-line>:
lib/vdso/gettimeofday.c: In function '__cvdso_clock_gettime_common':
include/uapi/linux/bits.h:7:56: warning: right shift count >= width of type [-Wshift-count-overflow]

    7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
      |                                                        ^~
include/vdso/datapage.h:50:25: note: in expansion of macro '__GENMASK'
   50 | #define VDSO_AUX        __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
      |                         ^~~~~~~~~
lib/vdso/gettimeofday.c:335:24: note: in expansion of macro 'VDSO_AUX'
  335 |         else if (msk & VDSO_AUX)
      |                        ^~~~~~~~
lib/vdso/gettimeofday.c: In function '__cvdso_clock_getres_common':
include/uapi/linux/bits.h:7:56: warning: right shift count >= width of type [-Wshift-count-overflow]
    7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
      |                                                        ^~
include/vdso/datapage.h:50:25: note: in expansion of macro '__GENMASK'
   50 | #define VDSO_AUX        __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
      |                         ^~~~~~~~~
lib/vdso/gettimeofday.c:481:26: note: in expansion of macro 'VDSO_AUX'
  481 |         } else if (msk & VDSO_AUX) {
      |                          ^~~~~~~~

Introduced by commit

7893ea1006fc ("vdso/gettimeofday: Add support for auxiliary clocks")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen,

Quoted 27 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_allmodconfig) produced this warning:

In file included from include/vdso/datapage.h:8,
from lib/vdso/gettimeofday.c:6,
from <command-line>:
lib/vdso/gettimeofday.c: In function '__cvdso_clock_gettime_common':
include/uapi/linux/bits.h:7:56: warning: right shift count >= width of type [-Wshift-count-overflow]

    7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
      |                                                        ^~
include/vdso/datapage.h:50:25: note: in expansion of macro '__GENMASK'
   50 | #define VDSO_AUX        __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
      |                         ^~~~~~~~~
lib/vdso/gettimeofday.c:335:24: note: in expansion of macro 'VDSO_AUX'
  335 |         else if (msk & VDSO_AUX)
      |                        ^~~~~~~~
lib/vdso/gettimeofday.c: In function '__cvdso_clock_getres_common':
include/uapi/linux/bits.h:7:56: warning: right shift count >= width of type [-Wshift-count-overflow]
    7 | #define __GENMASK(h, l) (((~_UL(0)) << (l)) & (~_UL(0) >> (BITS_PER_LONG - 1 - (h))))
      |                                                        ^~
include/vdso/datapage.h:50:25: note: in expansion of macro '__GENMASK'
   50 | #define VDSO_AUX        __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)
      |                         ^~~~~~~~~
lib/vdso/gettimeofday.c:481:26: note: in expansion of macro 'VDSO_AUX'
  481 |         } else if (msk & VDSO_AUX) {
      |                          ^~~~~~~~
Quoted 3 lines

Introduced by commit

7893ea1006fc ("vdso/gettimeofday: Add support for auxiliary clocks")

thanks for the report. I am aware of this issue and working on resolving it. Is this warning a blocking issue for -next at the moment?

Background, from [0]:

This [commit] depends on v6.16-rc2 *exactly*.
The specific dependency is commit 11fcf368506d ("uapi: bitops: use UAPI-safe variant of BITS_PER_LONG again"), which is available in v6.16-rc2.
Unfortunately that got broken again in v6.16-rc3 by
commit fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources"). Another fix for this is pending [1] and should make it into v6.16.

[0] https://lore.kernel.org/lkml/[email protected]/
[1] https://lore.kernel.org/lkml/[email protected]/

Thomas