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

Thomas Weißschuh
2025-07-08T06:32:29Z

Hi Stephen,

On Tue, Jul 08, 2025 at 04:08:30PM +1000, Stephen Rothwell wrote:
> 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")

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/20250701-vdso-auxclock-v1-0-df7d9f87b9b8@linutronix.de/
[1] https://lore.kernel.org/lkml/20250630-uapi-genmask-v1-1-eb0ad956a83e@linutronix.de/

Thomas