Re: [PATCH] lib/vdso: guard clockid before building u32 bitmask
From: Thomas Weißschuh
Date: Wed Jan 14 2026 - 04:53:22 EST
On Wed, Jan 14, 2026 at 05:31:48PM +0800, sun jian wrote:
> On Wed, Jan 14, 2026 at 4:56 PM Thomas Weißschuh
> <thomas.weissschuh@xxxxxxxxxxxxx> wrote:
> > So this looks like a false-positive. Can you post the sparse warning?
> Here is the sparse warning I saw:
>
> arch/x86/entry/vdso/vdso32/../../../../../lib/vdso/gettimeofday.c:454:26:
> warning: shift too big (40) for type unsigned long
>
> It is emitted when checking the vdso32 include path via vclock_gettime.c.
On which specific kernel commit are you?
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?
(...)
Thomas