From: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Ricardo Ribalda" <ribalda@chromium.org>
Cc: linux-arm-kernel@lists.infradead.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: New warning in linus/master
Date: Wed, 22 Apr 2026 09:26:02 +0200 [thread overview]
Message-ID: <5d16def3-3bad-49b1-866d-94a522e8d394@kernel.org> (raw)
In-Reply-To: <20260422071541-9a295128-d913-418f-a21c-1386fca30290@linutronix.de>
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
prev parent reply other threads:[~2026-04-22 7:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=5d16def3-3bad-49b1-866d-94a522e8d394@kernel.org \
--to=chleroy@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ribalda@chromium.org \
--cc=thomas.weissschuh@linutronix.de \
/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