* New warning in linus/master
@ 2026-04-22 3:51 Ricardo Ribalda
2026-04-22 5:56 ` Thomas Weißschuh
0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Ribalda @ 2026-04-22 3:51 UTC (permalink / raw)
To: Thomas Weißschuh, linux-arm-kernel,
Linux Kernel Mailing List, linuxppc-dev
Hi Thomas
Media-CI has found a couple of new warnings in the latest kernel
version for aarch64 and powerpc. They get fixed with this patch and
before moving I wanted to know if this was under your radar.
diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index 7dec05dd33b7..65914842fae0 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
ifneq ($(c-gettimeofday-y),)
- CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
+ CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
-Wno-maybe-uninitialized
endif
ifneq ($(c-getrandom-y),)
diff --git a/arch/powerpc/kernel/vdso/Makefile
b/arch/powerpc/kernel/vdso/Makefile
index 8834dfe9d727..4b8d40b1dfeb 100644
--- a/arch/powerpc/kernel/vdso/Makefile
+++ b/arch/powerpc/kernel/vdso/Makefile
@@ -12,12 +12,12 @@ obj-vdso32 += getrandom-32.o vgetrandom-chacha-32.o
obj-vdso64 += getrandom-64.o vgetrandom-chacha-64.o
ifneq ($(c-gettimeofday-y),)
- CFLAGS_vgettimeofday-32.o += -include $(c-gettimeofday-y)
+ CFLAGS_vgettimeofday-32.o += -include $(c-gettimeofday-y)
-Wno-maybe-uninitialized
# Go prior to 1.16.x assumes r30 is not clobbered by any VDSO code.
That used to be true
# by accident when the VDSO was hand-written asm code, but may not be
now that the VDSO is
# compiler generated. To avoid breaking Go tell GCC not to use r30.
Impact on code
# generation is minimal, it will just use r29 instead.
- CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y) $(call
cc-option, -ffixed-r30)
+ CFLAGS_vgettimeofday-64.o += -include $(c-gettimeofday-y) $(call
cc-option, -ffixed-r30) -Wno-maybe-uninitialized
endif
ifneq ($(c-getrandom-y),)
https://gitlab.freedesktop.org/linux-media/users/ribalda/-/pipelines/1649144/test_report?job_name=cross-gcc
CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Debian 15.2.0-16) 15.2.0"
SYNC include/config/auto.conf
CC arch/arm64/kernel/vdso/vgettimeofday.o
In file included from <command-line>:
In function ‘vdso_set_timespec’,
inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
inlined from ‘__cvdso_clock_gettime_common’ at
/workdir/lib/vdso/gettimeofday.c:293:10,
inlined from ‘__cvdso_clock_gettime_data.constprop’ at
/workdir/lib/vdso/gettimeofday.c:306:7:
/workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
uninitialized [-Wmaybe-uninitialized]
104 | ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/lib/vdso/gettimeofday.c: In function
‘__cvdso_clock_gettime_data.constprop’:
/workdir/lib/vdso/gettimeofday.c:242:13: note: ‘sec’ was declared here
242 | u64 sec, ns;
| ^~~
In file included from /workdir/lib/vdso/gettimeofday.c:11:
In function ‘__iter_div_u64_rem’,
inlined from ‘vdso_set_timespec’ at /workdir/lib/vdso/gettimeofday.c:104:21,
inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
inlined from ‘__cvdso_clock_gettime_common’ at
/workdir/lib/vdso/gettimeofday.c:293:10,
inlined from ‘__cvdso_clock_gettime_data.constprop’ at
/workdir/lib/vdso/gettimeofday.c:306:7:
./include/vdso/math64.h:10:25: warning: ‘ns’ may be used uninitialized
[-Wmaybe-uninitialized]
10 | while (dividend >= divisor) {
| ~~~~~~~~~^~~~~~~~~~
/workdir/lib/vdso/gettimeofday.c: In function
‘__cvdso_clock_gettime_data.constprop’:
/workdir/lib/vdso/gettimeofday.c:242:18: note: ‘ns’ was declared here
242 | u64 sec, ns;
| ^~
LD arch/arm64/kernel/vdso/vdso.so.dbg
VDSOSYM include/generated/vdso-offsets.h
OBJCOPY arch/arm64/kernel/vdso/vdso.so
/workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
uninitialized [-Wmaybe-uninitialized]
./include/vdso/math64.h:10:25: warning: ‘ns’ may be used uninitialized
[-Wmaybe-uninitialized]
CONFIG_CC_VERSION_TEXT="powerpc64-linux-gnu-gcc (Debian 15.2.0-15) 15.2.0"
SYNC include/config/auto.conf
VDSO32C arch/powerpc/kernel/vdso/vgettimeofday-32.o
In file included from <command-line>:
In function ‘vdso_set_timespec’,
inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
inlined from ‘__cvdso_clock_gettime_common’ at
/workdir/lib/vdso/gettimeofday.c:293:10,
inlined from ‘__cvdso_clock_gettime32_data’ at
/workdir/lib/vdso/gettimeofday.c:327:7:
/workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
uninitialized [-Wmaybe-uninitialized]
104 | ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/lib/vdso/gettimeofday.c: In function ‘__cvdso_clock_gettime32_data’:
/workdir/lib/vdso/gettimeofday.c:242:13: note: ‘sec’ was declared here
242 | u64 sec, ns;
| ^~~
In file included from /workdir/lib/vdso/gettimeofday.c:11:
In function ‘__iter_div_u64_rem’,
inlined from ‘vdso_set_timespec’ at /workdir/lib/vdso/gettimeofday.c:104:21,
inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
inlined from ‘__cvdso_clock_gettime_common’ at
/workdir/lib/vdso/gettimeofday.c:293:10,
inlined from ‘__cvdso_clock_gettime32_data’ at
/workdir/lib/vdso/gettimeofday.c:327:7:
./include/vdso/math64.h:10:25: warning: ‘ns’ may be used uninitialized
[-Wmaybe-uninitialized]
10 | while (dividend >= divisor) {
| ~~~~~~~~~^~~~~~~~~~
/workdir/lib/vdso/gettimeofday.c: In function ‘__cvdso_clock_gettime32_data’:
/workdir/lib/vdso/gettimeofday.c:242:18: note: ‘ns’ was declared here
242 | u64 sec, ns;
| ^~
In function ‘vdso_set_timespec’,
inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
inlined from ‘__cvdso_clock_gettime_common’ at
/workdir/lib/vdso/gettimeofday.c:293:10,
inlined from ‘__cvdso_clock_gettime_data’ at
/workdir/lib/vdso/gettimeofday.c:306:7:
/workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
uninitialized [-Wmaybe-uninitialized]
104 | ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/workdir/lib/vdso/gettimeofday.c: In function ‘__cvdso_clock_gettime_data’:
/workdir/lib/vdso/gettimeofday.c:242:13: note: ‘sec’ was declared here
242 | u64 sec, ns;
| ^~~
In function ‘__iter_div_u64_rem’,
inlined from ‘vdso_set_timespec’ at /workdir/lib/vdso/gettimeofday.c:104:21,
inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
inlined from ‘__cvdso_clock_gettime_common’ at
/workdir/lib/vdso/gettimeofday.c:293:10,
inlined from ‘__cvdso_clock_gettime_data’ at
/workdir/lib/vdso/gettimeofday.c:306:7:
./include/vdso/math64.h:10:25: warning: ‘ns’ may be used uninitialized
[-Wmaybe-uninitialized]
10 | while (dividend >= divisor) {
| ~~~~~~~~~^~~~~~~~~~
/workdir/lib/vdso/gettimeofday.c: In function ‘__cvdso_clock_gettime_data’:
/workdir/lib/vdso/gettimeofday.c:242:18: note: ‘ns’ was declared here
242 | u64 sec, ns;
| ^~
VDSO32L arch/powerpc/kernel/vdso/vdso32.so.dbg
VDSO32SYM include/generated/vdso32-offsets.h
CC arch/powerpc/kernel/vdso/vgettimeofday-64.o
VDSO64L arch/powerpc/kernel/vdso/vdso64.so.dbg
VDSO64SYM include/generated/vdso64-offsets.h
/workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
uninitialized [-Wmaybe-uninitialized]
./include/vdso/math64.h:10:25: warning: ‘ns’ may be used uninitialized
[-Wmaybe-uninitialized]
/workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
uninitialized [-Wmaybe-uninitialized]
./include/vdso/math64.h:10:25: warning: ‘ns’ may be used uninitialized
[-Wmaybe-uninitialized]
Thanks
--
Ricardo Ribalda
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 3:51 New warning in linus/master Ricardo Ribalda
@ 2026-04-22 5:56 ` Thomas Weißschuh
2026-04-22 7:00 ` Ricardo Ribalda
2026-04-22 7:26 ` Christophe Leroy (CS GROUP)
0 siblings, 2 replies; 8+ messages in thread
From: Thomas Weißschuh @ 2026-04-22 5:56 UTC (permalink / raw)
To: Ricardo Ribalda; +Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
Hi Ricardo,
On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
> Media-CI has found a couple of new warnings in the latest kernel
> version for aarch64 and powerpc. They get fixed with this patch and
> before moving I wanted to know if this was under your radar.
Thanks for the report. I was not aware of these so far.
> diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> index 7dec05dd33b7..65914842fae0 100644
> --- a/arch/arm64/kernel/vdso/Makefile
> +++ b/arch/arm64/kernel/vdso/Makefile
> @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
> CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
>
> ifneq ($(c-gettimeofday-y),)
> - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> -Wno-maybe-uninitialized
> endif
(...)
I'd like to know exactly what is going on before suppressing the warning.
It is a non-standard warning, only enabled by *some* of the vDSO builds
for some reason.
> https://gitlab.freedesktop.org/linux-media/users/ribalda/-/pipelines/1649144/test_report?job_name=cross-gcc
While I was able to download a configuration from this job and also use the
same container image, I can not reproduce the issue. Is the configuration the
full one or only the template?
Could you provide full reproduction steps?
> CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Debian 15.2.0-16) 15.2.0"
The linked test log shows GCC 14.2, not 15.2.
Not that I could reproduce it with either one...
> SYNC include/config/auto.conf
> CC arch/arm64/kernel/vdso/vgettimeofday.o
> In file included from <command-line>:
> In function ‘vdso_set_timespec’,
> inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
> inlined from ‘__cvdso_clock_gettime_common’ at
> /workdir/lib/vdso/gettimeofday.c:293:10,
> inlined from ‘__cvdso_clock_gettime_data.constprop’ at
> /workdir/lib/vdso/gettimeofday.c:306:7:
> /workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
> uninitialized [-Wmaybe-uninitialized]
> 104 | ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
> | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /workdir/lib/vdso/gettimeofday.c: In function
> ‘__cvdso_clock_gettime_data.constprop’:
> /workdir/lib/vdso/gettimeofday.c:242:13: note: ‘sec’ was declared here
> 242 | u64 sec, ns;
> | ^~~
The same pattern is used in some other do_ handlers, which do not generate this
warning. I also can't immediately see what is wrong.
(...)
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 5:56 ` Thomas Weißschuh
@ 2026-04-22 7:00 ` Ricardo Ribalda
2026-04-22 7:32 ` Thomas Weißschuh
2026-04-22 7:26 ` Christophe Leroy (CS GROUP)
1 sibling, 1 reply; 8+ messages in thread
From: Ricardo Ribalda @ 2026-04-22 7:00 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
Hi Thomas
Thanks for the prompt reply
On Wed, 22 Apr 2026 at 13:57, Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> Hi Ricardo,
>
> On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
> > Media-CI has found a couple of new warnings in the latest kernel
> > version for aarch64 and powerpc. They get fixed with this patch and
> > before moving I wanted to know if this was under your radar.
>
> Thanks for the report. I was not aware of these so far.
>
> > diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> > index 7dec05dd33b7..65914842fae0 100644
> > --- a/arch/arm64/kernel/vdso/Makefile
> > +++ b/arch/arm64/kernel/vdso/Makefile
> > @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
> > CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
> >
> > ifneq ($(c-gettimeofday-y),)
> > - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > -Wno-maybe-uninitialized
> > endif
>
> (...)
>
> I'd like to know exactly what is going on before suppressing the warning.
> It is a non-standard warning, only enabled by *some* of the vDSO builds
> for some reason.
>
> > https://gitlab.freedesktop.org/linux-media/users/ribalda/-/pipelines/1649144/test_report?job_name=cross-gcc
>
> While I was able to download a configuration from this job and also use the
> same container image, I can not reproduce the issue. Is the configuration the
> full one or only the template?
>
> Could you provide full reproduction steps?
You can try repro with:
work/linux $ podman run -v .:/workdir/ --rm -it
registry.freedesktop.org/linux-media/media-ci/build:latest
$ cd /workdir
$ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
$ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
arch/arm64/kernel/vdso/vgettimeofday.o
The gcc version discrepancy is because I the error was due to old gcc
version and I was playing around with that... but it fails in both
gcc14 and gcc15
You can try with debian testing with
work/linux$ podman run -v .:/workdir/ --rm -it debian:testing
$ apt-get update
$ apt-get install gcc-aarch64-linux-gnu build-essential flex bison libssl-dev bc
$ cd /workdir
$ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
$ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
arch/arm64/kernel/vdso/vgettimeofday.o
Regards!
>
> > CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Debian 15.2.0-16) 15.2.0"
>
> The linked test log shows GCC 14.2, not 15.2.
> Not that I could reproduce it with either one...
>
> > SYNC include/config/auto.conf
> > CC arch/arm64/kernel/vdso/vgettimeofday.o
> > In file included from <command-line>:
> > In function ‘vdso_set_timespec’,
> > inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
> > inlined from ‘__cvdso_clock_gettime_common’ at
> > /workdir/lib/vdso/gettimeofday.c:293:10,
> > inlined from ‘__cvdso_clock_gettime_data.constprop’ at
> > /workdir/lib/vdso/gettimeofday.c:306:7:
> > /workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
> > uninitialized [-Wmaybe-uninitialized]
> > 104 | ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
> > | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > /workdir/lib/vdso/gettimeofday.c: In function
> > ‘__cvdso_clock_gettime_data.constprop’:
> > /workdir/lib/vdso/gettimeofday.c:242:13: note: ‘sec’ was declared here
> > 242 | u64 sec, ns;
> > | ^~~
>
> The same pattern is used in some other do_ handlers, which do not generate this
> warning. I also can't immediately see what is wrong.
>
> (...)
>
>
> Thomas
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 5:56 ` Thomas Weißschuh
2026-04-22 7:00 ` Ricardo Ribalda
@ 2026-04-22 7:26 ` Christophe Leroy (CS GROUP)
1 sibling, 0 replies; 8+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-04-22 7:26 UTC (permalink / raw)
To: Thomas Weißschuh, Ricardo Ribalda
Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
Le 22/04/2026 à 07:56, Thomas Weißschuh a écrit :
> Hi Ricardo,
>
> On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
>> Media-CI has found a couple of new warnings in the latest kernel
>> version for aarch64 and powerpc. They get fixed with this patch and
>> before moving I wanted to know if this was under your radar.
>
> Thanks for the report. I was not aware of these so far.
>
>> diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
>> index 7dec05dd33b7..65914842fae0 100644
>> --- a/arch/arm64/kernel/vdso/Makefile
>> +++ b/arch/arm64/kernel/vdso/Makefile
>> @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
>> CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
>>
>> ifneq ($(c-gettimeofday-y),)
>> - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
>> + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
>> -Wno-maybe-uninitialized
>> endif
>
> (...)
>
> I'd like to know exactly what is going on before suppressing the warning.
> It is a non-standard warning, only enabled by *some* of the vDSO builds
> for some reason.
>
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Flinux-media%2Fusers%2Fribalda%2F-%2Fpipelines%2F1649144%2Ftest_report%3Fjob_name%3Dcross-gcc&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C5c0f15ee20a44072f47108dea0340304%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639124342424606113%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=9Tvp2aYfB02ijxVGLzCOYcMwZlPvqVDufxEporLl1mc%3D&reserved=0
>
> While I was able to download a configuration from this job and also use the
> same container image, I can not reproduce the issue. Is the configuration the
> full one or only the template?
>
> Could you provide full reproduction steps?
>
>> CONFIG_CC_VERSION_TEXT="aarch64-linux-gnu-gcc (Debian 15.2.0-16) 15.2.0"
>
> The linked test log shows GCC 14.2, not 15.2.
> Not that I could reproduce it with either one...
>
>> SYNC include/config/auto.conf
>> CC arch/arm64/kernel/vdso/vgettimeofday.o
>> In file included from <command-line>:
>> In function ‘vdso_set_timespec’,
>> inlined from ‘do_aux’ at /workdir/lib/vdso/gettimeofday.c:266:2,
>> inlined from ‘__cvdso_clock_gettime_common’ at
>> /workdir/lib/vdso/gettimeofday.c:293:10,
>> inlined from ‘__cvdso_clock_gettime_data.constprop’ at
>> /workdir/lib/vdso/gettimeofday.c:306:7:
>> /workdir/lib/vdso/gettimeofday.c:104:26: warning: ‘sec’ may be used
>> uninitialized [-Wmaybe-uninitialized]
>> 104 | ts->tv_sec = sec + __iter_div_u64_rem(ns, NSEC_PER_SEC, &ns);
>> | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> /workdir/lib/vdso/gettimeofday.c: In function
>> ‘__cvdso_clock_gettime_data.constprop’:
>> /workdir/lib/vdso/gettimeofday.c:242:13: note: ‘sec’ was declared here
>> 242 | u64 sec, ns;
>> | ^~~
>
> The same pattern is used in some other do_ handlers, which do not generate this
> warning. I also can't immediately see what is wrong.
You are likely in a special case where vdso_get_timestamp() returns
false without setting &sec, and some versions of GCC and/or CLANG fail
to see that vdso_set_timespec() is not called when vdso_get_timestamp()
returns false.
Christophe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 7:00 ` Ricardo Ribalda
@ 2026-04-22 7:32 ` Thomas Weißschuh
2026-04-22 8:06 ` Ricardo Ribalda
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Weißschuh @ 2026-04-22 7:32 UTC (permalink / raw)
To: Ricardo Ribalda; +Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
On Wed, Apr 22, 2026 at 03:00:11PM +0800, Ricardo Ribalda wrote:
> On Wed, 22 Apr 2026 at 13:57, Thomas Weißschuh
> <thomas.weissschuh@linutronix.de> wrote:
> > On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
> > > Media-CI has found a couple of new warnings in the latest kernel
> > > version for aarch64 and powerpc. They get fixed with this patch and
> > > before moving I wanted to know if this was under your radar.
> >
> > Thanks for the report. I was not aware of these so far.
> >
> > > diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> > > index 7dec05dd33b7..65914842fae0 100644
> > > --- a/arch/arm64/kernel/vdso/Makefile
> > > +++ b/arch/arm64/kernel/vdso/Makefile
> > > @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
> > > CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
> > >
> > > ifneq ($(c-gettimeofday-y),)
> > > - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > > + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > > -Wno-maybe-uninitialized
> > > endif
> >
> > (...)
> >
> > I'd like to know exactly what is going on before suppressing the warning.
> > It is a non-standard warning, only enabled by *some* of the vDSO builds
> > for some reason.
> >
> > > https://gitlab.freedesktop.org/linux-media/users/ribalda/-/pipelines/1649144/test_report?job_name=cross-gcc
> >
> > While I was able to download a configuration from this job and also use the
> > same container image, I can not reproduce the issue. Is the configuration the
> > full one or only the template?
> >
> > Could you provide full reproduction steps?
>
> You can try repro with:
>
> work/linux $ podman run -v .:/workdir/ --rm -it
> registry.freedesktop.org/linux-media/media-ci/build:latest
> $ cd /workdir
> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> arch/arm64/kernel/vdso/vgettimeofday.o
>
> The gcc version discrepancy is because I the error was due to old gcc
> version and I was playing around with that... but it fails in both
> gcc14 and gcc15
Ack.
> You can try with debian testing with
> work/linux$ podman run -v .:/workdir/ --rm -it debian:testing
> $ apt-get update
> $ apt-get install gcc-aarch64-linux-gnu build-essential flex bison libssl-dev bc
> $ cd /workdir
> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> arch/arm64/kernel/vdso/vgettimeofday.o
Both reproducers do *not* reproduce the issue for me.
(It is more or less exactly what I tried before)
Please note that this line does not work in general:
$ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make arch/arm64/kernel/vdso/vgettimeofday.o
The vDSO object files can not be built in this way like regular kernel object
files and will produce a compiler error, but not the one under discussion.
Instead the vDSO on arm64 is built during the 'make prepare' phase.
(Other architectures work differently, of course...)
(...)
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 7:32 ` Thomas Weißschuh
@ 2026-04-22 8:06 ` Ricardo Ribalda
2026-04-22 8:45 ` Thomas Weißschuh
0 siblings, 1 reply; 8+ messages in thread
From: Ricardo Ribalda @ 2026-04-22 8:06 UTC (permalink / raw)
To: Thomas Weißschuh
Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
Hi Thomas
On Wed, 22 Apr 2026 at 15:32, Thomas Weißschuh
<thomas.weissschuh@linutronix.de> wrote:
>
> On Wed, Apr 22, 2026 at 03:00:11PM +0800, Ricardo Ribalda wrote:
> > On Wed, 22 Apr 2026 at 13:57, Thomas Weißschuh
> > <thomas.weissschuh@linutronix.de> wrote:
> > > On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
> > > > Media-CI has found a couple of new warnings in the latest kernel
> > > > version for aarch64 and powerpc. They get fixed with this patch and
> > > > before moving I wanted to know if this was under your radar.
> > >
> > > Thanks for the report. I was not aware of these so far.
> > >
> > > > diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> > > > index 7dec05dd33b7..65914842fae0 100644
> > > > --- a/arch/arm64/kernel/vdso/Makefile
> > > > +++ b/arch/arm64/kernel/vdso/Makefile
> > > > @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
> > > > CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
> > > >
> > > > ifneq ($(c-gettimeofday-y),)
> > > > - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > > > + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > > > -Wno-maybe-uninitialized
> > > > endif
> > >
> > > (...)
> > >
> > > I'd like to know exactly what is going on before suppressing the warning.
> > > It is a non-standard warning, only enabled by *some* of the vDSO builds
> > > for some reason.
> > >
> > > > https://gitlab.freedesktop.org/linux-media/users/ribalda/-/pipelines/1649144/test_report?job_name=cross-gcc
> > >
> > > While I was able to download a configuration from this job and also use the
> > > same container image, I can not reproduce the issue. Is the configuration the
> > > full one or only the template?
> > >
> > > Could you provide full reproduction steps?
> >
> > You can try repro with:
> >
> > work/linux $ podman run -v .:/workdir/ --rm -it
> > registry.freedesktop.org/linux-media/media-ci/build:latest
> > $ cd /workdir
> > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
> > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> > arch/arm64/kernel/vdso/vgettimeofday.o
> >
> > The gcc version discrepancy is because I the error was due to old gcc
> > version and I was playing around with that... but it fails in both
> > gcc14 and gcc15
>
> Ack.
>
> > You can try with debian testing with
> > work/linux$ podman run -v .:/workdir/ --rm -it debian:testing
> > $ apt-get update
> > $ apt-get install gcc-aarch64-linux-gnu build-essential flex bison libssl-dev bc
> > $ cd /workdir
> > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
> > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> > arch/arm64/kernel/vdso/vgettimeofday.o
>
> Both reproducers do *not* reproduce the issue for me.
> (It is more or less exactly what I tried before)
Ok, I think I found what is going on. media-ci was forcing
KCFLAGS=-Wmaybe-uninitialized
https://gitlab.freedesktop.org/linux-media/media-ci/-/blob/main/test-build.sh?ref_type=heads#L29
And something has changed in the kernel in the last version that
triggers a (hopefully) false positive.
can you try with:
CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
KCFLAGS=-Wmaybe-uninitialized allyesconfig
CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
KCFLAGS=-Wmaybe-uninitialized prepare
?
>
> Please note that this line does not work in general:
> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make arch/arm64/kernel/vdso/vgettimeofday.o
>
> The vDSO object files can not be built in this way like regular kernel object
> files and will produce a compiler error, but not the one under discussion.
> Instead the vDSO on arm64 is built during the 'make prepare' phase.
> (Other architectures work differently, of course...)
>
> (...)
>
>
> Thomas
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 8:06 ` Ricardo Ribalda
@ 2026-04-22 8:45 ` Thomas Weißschuh
2026-04-22 9:09 ` Christophe Leroy (CS GROUP)
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Weißschuh @ 2026-04-22 8:45 UTC (permalink / raw)
To: Ricardo Ribalda; +Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
On Wed, Apr 22, 2026 at 04:06:45PM +0800, Ricardo Ribalda wrote:
> On Wed, 22 Apr 2026 at 15:32, Thomas Weißschuh
> <thomas.weissschuh@linutronix.de> wrote:
> >
> > On Wed, Apr 22, 2026 at 03:00:11PM +0800, Ricardo Ribalda wrote:
> > > On Wed, 22 Apr 2026 at 13:57, Thomas Weißschuh
> > > <thomas.weissschuh@linutronix.de> wrote:
> > > > On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
> > > > > Media-CI has found a couple of new warnings in the latest kernel
> > > > > version for aarch64 and powerpc. They get fixed with this patch and
> > > > > before moving I wanted to know if this was under your radar.
> > > >
> > > > Thanks for the report. I was not aware of these so far.
> > > >
> > > > > diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
> > > > > index 7dec05dd33b7..65914842fae0 100644
> > > > > --- a/arch/arm64/kernel/vdso/Makefile
> > > > > +++ b/arch/arm64/kernel/vdso/Makefile
> > > > > @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
> > > > > CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
> > > > >
> > > > > ifneq ($(c-gettimeofday-y),)
> > > > > - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > > > > + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
> > > > > -Wno-maybe-uninitialized
> > > > > endif
> > > >
> > > > (...)
> > > >
> > > > I'd like to know exactly what is going on before suppressing the warning.
> > > > It is a non-standard warning, only enabled by *some* of the vDSO builds
> > > > for some reason.
> > > >
> > > > > https://gitlab.freedesktop.org/linux-media/users/ribalda/-/pipelines/1649144/test_report?job_name=cross-gcc
> > > >
> > > > While I was able to download a configuration from this job and also use the
> > > > same container image, I can not reproduce the issue. Is the configuration the
> > > > full one or only the template?
> > > >
> > > > Could you provide full reproduction steps?
> > >
> > > You can try repro with:
> > >
> > > work/linux $ podman run -v .:/workdir/ --rm -it
> > > registry.freedesktop.org/linux-media/media-ci/build:latest
> > > $ cd /workdir
> > > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
> > > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> > > arch/arm64/kernel/vdso/vgettimeofday.o
> > >
> > > The gcc version discrepancy is because I the error was due to old gcc
> > > version and I was playing around with that... but it fails in both
> > > gcc14 and gcc15
> >
> > Ack.
> >
> > > You can try with debian testing with
> > > work/linux$ podman run -v .:/workdir/ --rm -it debian:testing
> > > $ apt-get update
> > > $ apt-get install gcc-aarch64-linux-gnu build-essential flex bison libssl-dev bc
> > > $ cd /workdir
> > > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
> > > $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> > > arch/arm64/kernel/vdso/vgettimeofday.o
> >
> > Both reproducers do *not* reproduce the issue for me.
> > (It is more or less exactly what I tried before)
>
>
> Ok, I think I found what is going on. media-ci was forcing
> KCFLAGS=-Wmaybe-uninitialized
>
> https://gitlab.freedesktop.org/linux-media/media-ci/-/blob/main/test-build.sh?ref_type=heads#L29
>
> And something has changed in the kernel in the last version that
> triggers a (hopefully) false positive.
>
> can you try with:
>
> CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> KCFLAGS=-Wmaybe-uninitialized allyesconfig
> CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
> KCFLAGS=-Wmaybe-uninitialized prepare
That works!
The warning was introduced in ed78b7b2c5ae ("vdso/gettimeofday: Add a helper to
read the sequence lock of a time namespace aware clock").
It is *not* a false-positive, specifically:
do {
if (vdso_read_begin_timens(vc, &seq)) {
vd = __arch_get_vdso_u_timens_data(vd);
vc = &vd->aux_clock_data[idx];
/* Re-read from the real time data page */
continue;
This 'continue' jumps to the end of the loop body and if the real vDSO datapage
by chance has a sequence counter of '1' will exit the loop, leaving 'sec' and
'nsec' uninitialized. My believe was that the 'continue' would jump to the
*beginning* of the loop body, which is cleary wrong. Previously there was an
inner while loop() which would make the 'continue' effectively start at the
beginning of the outer do-while loop.
}
/* Auxclock disabled? */
if (vc->clock_mode == VDSO_CLOCKMODE_NONE)
return false;
if (!vdso_get_timestamp(vd, vc, VDSO_BASE_AUX, &sec, &ns))
return false;
} while (vdso_read_retry(vc, seq));
vdso_set_timespec(ts, sec, ns);
I'm working on a fix.
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New warning in linus/master
2026-04-22 8:45 ` Thomas Weißschuh
@ 2026-04-22 9:09 ` Christophe Leroy (CS GROUP)
0 siblings, 0 replies; 8+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-04-22 9:09 UTC (permalink / raw)
To: Thomas Weißschuh, Ricardo Ribalda
Cc: linux-arm-kernel, Linux Kernel Mailing List, linuxppc-dev
Le 22/04/2026 à 10:45, Thomas Weißschuh a écrit :
> On Wed, Apr 22, 2026 at 04:06:45PM +0800, Ricardo Ribalda wrote:
>> On Wed, 22 Apr 2026 at 15:32, Thomas Weißschuh
>> <thomas.weissschuh@linutronix.de> wrote:
>>>
>>> On Wed, Apr 22, 2026 at 03:00:11PM +0800, Ricardo Ribalda wrote:
>>>> On Wed, 22 Apr 2026 at 13:57, Thomas Weißschuh
>>>> <thomas.weissschuh@linutronix.de> wrote:
>>>>> On Wed, Apr 22, 2026 at 11:51:45AM +0800, Ricardo Ribalda wrote:
>>>>>> Media-CI has found a couple of new warnings in the latest kernel
>>>>>> version for aarch64 and powerpc. They get fixed with this patch and
>>>>>> before moving I wanted to know if this was under your radar.
>>>>>
>>>>> Thanks for the report. I was not aware of these so far.
>>>>>
>>>>>> diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
>>>>>> index 7dec05dd33b7..65914842fae0 100644
>>>>>> --- a/arch/arm64/kernel/vdso/Makefile
>>>>>> +++ b/arch/arm64/kernel/vdso/Makefile
>>>>>> @@ -50,7 +50,7 @@ CFLAGS_vgettimeofday.o = $(CC_FLAGS_ADD_VDSO)
>>>>>> CFLAGS_vgetrandom.o = $(CC_FLAGS_ADD_VDSO)
>>>>>>
>>>>>> ifneq ($(c-gettimeofday-y),)
>>>>>> - CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
>>>>>> + CFLAGS_vgettimeofday.o += -include $(c-gettimeofday-y)
>>>>>> -Wno-maybe-uninitialized
>>>>>> endif
>>>>>
>>>>> (...)
>>>>>
>>>>> I'd like to know exactly what is going on before suppressing the warning.
>>>>> It is a non-standard warning, only enabled by *some* of the vDSO builds
>>>>> for some reason.
>>>>>
>>>>>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Flinux-media%2Fusers%2Fribalda%2F-%2Fpipelines%2F1649144%2Ftest_report%3Fjob_name%3Dcross-gcc&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7cbf9009269d4ddc16d208dea04b86f1%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639124443421115079%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=O4r8HjaUn7KEgW8tDE9GEC9e8CWyJBpCfhVTJZZ%2BFHs%3D&reserved=0
>>>>>
>>>>> While I was able to download a configuration from this job and also use the
>>>>> same container image, I can not reproduce the issue. Is the configuration the
>>>>> full one or only the template?
>>>>>
>>>>> Could you provide full reproduction steps?
>>>>
>>>> You can try repro with:
>>>>
>>>> work/linux $ podman run -v .:/workdir/ --rm -it
>>>> registry.freedesktop.org/linux-media/media-ci/build:latest
>>>> $ cd /workdir
>>>> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
>>>> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
>>>> arch/arm64/kernel/vdso/vgettimeofday.o
>>>>
>>>> The gcc version discrepancy is because I the error was due to old gcc
>>>> version and I was playing around with that... but it fails in both
>>>> gcc14 and gcc15
>>>
>>> Ack.
>>>
>>>> You can try with debian testing with
>>>> work/linux$ podman run -v .:/workdir/ --rm -it debian:testing
>>>> $ apt-get update
>>>> $ apt-get install gcc-aarch64-linux-gnu build-essential flex bison libssl-dev bc
>>>> $ cd /workdir
>>>> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make allyesconfig
>>>> $ CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
>>>> arch/arm64/kernel/vdso/vgettimeofday.o
>>>
>>> Both reproducers do *not* reproduce the issue for me.
>>> (It is more or less exactly what I tried before)
>>
>>
>> Ok, I think I found what is going on. media-ci was forcing
>> KCFLAGS=-Wmaybe-uninitialized
>>
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.freedesktop.org%2Flinux-media%2Fmedia-ci%2F-%2Fblob%2Fmain%2Ftest-build.sh%3Fref_type%3Dheads%23L29&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7cbf9009269d4ddc16d208dea04b86f1%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639124443421146576%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2FpTHYfCn5ob42%2Fm6FVOZ32PVzuXBNBT3rlMVWslCfhw%3D&reserved=0
>>
>> And something has changed in the kernel in the last version that
>> triggers a (hopefully) false positive.
>>
>> can you try with:
>>
>> CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
>> KCFLAGS=-Wmaybe-uninitialized allyesconfig
>> CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 make
>> KCFLAGS=-Wmaybe-uninitialized prepare
>
> That works!
>
> The warning was introduced in ed78b7b2c5ae ("vdso/gettimeofday: Add a helper to
> read the sequence lock of a time namespace aware clock").
>
> It is *not* a false-positive, specifically:
>
> do {
> if (vdso_read_begin_timens(vc, &seq)) {
> vd = __arch_get_vdso_u_timens_data(vd);
> vc = &vd->aux_clock_data[idx];
> /* Re-read from the real time data page */
> continue;
>
> This 'continue' jumps to the end of the loop body and if the real vDSO datapage
> by chance has a sequence counter of '1' will exit the loop, leaving 'sec' and
> 'nsec' uninitialized. My believe was that the 'continue' would jump to the
> *beginning* of the loop body, which is cleary wrong. Previously there was an
> inner while loop() which would make the 'continue' effectively start at the
> beginning of the outer do-while loop.
Well spotted. I missed it too while reviewing.
A 'retry:' label at the begining of the loop with a 'goto retry' instead
of the 'continue' should make it.
Christophe
>
> }
>
> /* Auxclock disabled? */
> if (vc->clock_mode == VDSO_CLOCKMODE_NONE)
> return false;
>
> if (!vdso_get_timestamp(vd, vc, VDSO_BASE_AUX, &sec, &ns))
> return false;
>
> } while (vdso_read_retry(vc, seq));
>
> vdso_set_timespec(ts, sec, ns);
>
>
> I'm working on a fix.
>
>
> Thomas
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-04-22 9:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 3:51 New warning in linus/master Ricardo Ribalda
2026-04-22 5:56 ` Thomas Weißschuh
2026-04-22 7:00 ` Ricardo Ribalda
2026-04-22 7:32 ` Thomas Weißschuh
2026-04-22 8:06 ` Ricardo Ribalda
2026-04-22 8:45 ` Thomas Weißschuh
2026-04-22 9:09 ` Christophe Leroy (CS GROUP)
2026-04-22 7:26 ` Christophe Leroy (CS GROUP)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox