Skip to content
Snippets Groups Projects
  1. Jun 18, 2020
    • Greg Kroah-Hartman's avatar
      Linux 5.7.4 · 901e2c6c
      Greg Kroah-Hartman authored
      v5.7.4
      901e2c6c
    • Thomas Gleixner's avatar
      lib/vdso: Provide sanity check for cycles (again) · 72b01e01
      Thomas Gleixner authored
      commit 72ce7780 upstream.
      
      The original x86 VDSO implementation checked for the validity of the clock
      source read by testing whether the returned signed cycles value is less
      than zero. This check was also used by the vdso read function to signal
      that the current selected clocksource is not VDSO capable.
      
      During the rework of the VDSO code the check was removed and replaced with
      a check for the clocksource mode being != NONE.
      
      This turned out to be a mistake because the check is necessary for paravirt
      and hyperv clock sources. The reason is that these clock sources have their
      own internal sequence counter to validate the clocksource at the point of
      reading it. This is necessary because the hypervisor can invalidate the
      clocksource asynchronously so a check during the VDSO data update is not
      sufficient. Having a separate indicator for the validity is slower than
      just validating the cycles value. The check for it being negative...
      72b01e01
  2. Jun 17, 2020