Re: [PATCH] lib/vdso: guard clockid before building u32 bitmask
From: Thomas Weißschuh
Date: Wed Jan 14 2026 - 05:35:27 EST
On Wed, Jan 14, 2026 at 06:26:17PM +0800, sun jian wrote:
> On Wed, Jan 14, 2026 at 5:53 PM Thomas Weißschuh
> <thomas.weissschuh@xxxxxxxxxxxxx> wrote:
> > On which specific kernel commit are you?
> I'm on:
> b71e635feefc852405b14620a7fc58c4c80c0f73
> ("Merge tag 'cgroup-for-6.19-rc5-fixes'")
> , no tags available.
> > The message points to '} else if (msg & VDSO_AUX) {'. This means that it probably
> > complains about the shift in '#define VDSO_AUX __GENMASK(CLOCK_AUX_LAST, CLOCK_AUX)'.
> > We had problems in that area before, so I'd like to get all the details.
> >
> > Which sparse version are you using?
> Sparse version:
>
> v0.6.4-73-gfbdde312
>
> The warning was reproduced with gcc + CHECK=sparse on x86, via the vdso32
> include path (arch/x86/entry/vdso/vdso32/vclock_gettime.c).
I was able to reproduce the warning. It is a false positive due to the way
sparse is configured. The 32-bit compat vDSO is using the 64-bit sparse flags.
See also:
https://lore.kernel.org/lkml/20251107155158-90fb8c9c-59bf-47b3-8756-7c406166db70@xxxxxxxxxxxxx/
Thomas