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

From: Thomas Weißschuh

Date: Wed Mar 11 2026 - 10:01:34 EST


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.


Thomas