Re: [tip: timers/vdso] vdso/gettimeofday: Add a helper to test if a clock is namespaced

From: Borislav Petkov

Date: Wed Mar 11 2026 - 10:13:45 EST


On Wed, Mar 11, 2026 at 03:01:05PM +0100, Thomas Weißschuh wrote:
> On Wed, Mar 11, 2026 at 02:51:26PM +0100, Borislav Petkov wrote:
> > On Wed, Mar 11, 2026 at 11:47:26AM +0100, Thomas Weißschuh wrote:
> > > > +static __always_inline bool vdso_is_timens_clock(const struct vdso_clock *vc)
> > > > +{
> > > > + return IS_ENABLED(CONFIG_TIME_NS) && vc->clock_mode == VDSO_CLOCKMODE_TIMENS;
> > > > +}
> > >
> > > Welp, I never seem to have tested this together with my own vDSO header cleanup
> > > series. This fails to build because VDSO_CLOCKMODE_TIMENS is not visible.
> > > There should be an include of <vdso/clocksource.h> above.
> > >
> > > Could you fix this up, or drop the series so I can resubmit it?
> >
> > Lemme fix that up. I just saw it here too.
>
> Thanks! And sorry for the extra work.

No worries.

Btw, this patch itself builds still, I guess the breakage is caused by one of
the following ones.

I won't chase that though because this one is using VDSO_CLOCKMODE_TIMENS and
I will simply add the clocksource.h include here.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette