STRUCT VDSO_TIME_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct vdso_time_data(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual ✨ this one's straight out of ./include/vdso and it's lowkey iconic β€” it's the vdso datapage representation, and yes, you're gonna want to take notes πŸ’…


🌸 NAME 🌸

struct vdso_time_data β€” the vdso datapage representation, fr fr 🫢


✨ SYNOPSIS ✨

struct vdso_time_data {
    struct arch_vdso_time_data      arch_data;
    struct vdso_clock               clock_data[CS_BASES];
    struct vdso_clock               aux_clock_data[MAX_AUX_CLOCKS];
    s32 tz_minuteswest;
    s32 tz_dsttime;
    u32 hrtimer_res;
    u32 __unused;
 };

like, that's the whole vibe. screenshot it, memorize it, whatever πŸ’–


πŸŽ€ Members πŸŽ€

  • arch_data β€” architecture specific data (it's optional, and it defaults to an empty struct β€” no cap, it just chills there empty if your arch doesn't need it) 🧚
  • clock_data β€” clocksource related data, and it's an array, bestie 🌈
  • aux_clock_data β€” auxiliary clocksource related data, also an array πŸ’«
  • tz_minuteswest β€” minutes west of Greenwich πŸ•°οΈ
  • tz_dsttime β€” type of DST correction ⏰
  • hrtimer_res β€” hrtimer resolution πŸ”₯
  • __unused β€” unused. that's it. that's the whole description. it's giving reserve-a-seat energy πŸ’€

πŸ‘‘ Description πŸ‘‘

okay so the big thing, the main character note: vdso_time_data will be accessed by 64 bit and compat code at the same time 😭 so please, bestie, be careful before modifying this structure. like actually careful. not "i'll just tweak one field" careful. careful careful. 🫢

and the ordering of the struct members? highkey genius of whoever did it β€” it's optimized so you get fast access to the often required struct members that are related to CLOCK_REALTIME and CLOCK_MONOTONIC ⭐ that info is stored in the first cache lines, so the hot stuff hits first and the vibe check passes immediately πŸ’…βœ¨


πŸ’œ SEE ALSO πŸ’œ

  • Kernel file ./include/vdso/datapage.h πŸ“
  • struct vdso_timestamp(9) πŸ•°οΈ
  • struct vdso_clock(9) ⏱️
  • struct vdso_rng_data(9) 🎲

and that's the page!! sourced from ./include/vdso, dated October 2026, and it's literally struct vdso_time_data(9) β€” slay, go forth and don't break compat code, i'm obsessed with u πŸ“πŸ’–πŸ¦‹

πŸ“¦ where this page comes from