1. 09 Jul, 2021 1 commit
    • Martin Fäcknitz's avatar
      MIPS: vdso: Invalid GIC access through VDSO · 47ce8527
      Martin Fäcknitz authored
      Accessing raw timers (currently only CLOCK_MONOTONIC_RAW) through VDSO
      doesn't return the correct time when using the GIC as clock source.
      The address of the GIC mapped page is in this case not calculated
      correctly. The GIC mapped page is calculated from the VDSO data by
      subtracting PAGE_SIZE:
      
        void *get_gic(const struct vdso_data *data) {
          return (void __iomem *)data - PAGE_SIZE;
        }
      
      However, the data pointer is not page aligned for raw clock sources.
      This is because the VDSO data for raw clock sources (CS_RAW = 1) is
      stored after the VDSO data for coarse clock sources (CS_HRES_COARSE = 0).
      Therefore, only the VDSO data for CS_HRES_COARSE is page aligned:
      
        +--------------------+
        |                    |
        | vd[CS_RAW]         | ---+
        | vd[CS_HRES_COARSE] |    |
        +--------------------+    | -PAGE_SIZE
        |                    |    |
        |  GIC mapped page   | <--+
        |                    |
        +--------------------+
      
      When __arch_get_hw_counter() is called with &vd[CS_RAW], get_gic returns
      the wrong address (somewhere inside the GIC mapped page). The GIC counter
      values are not returned which results in an invalid time.
      
      Fixes: a7f4df4e ("MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()")
      Signed-off-by: default avatarMartin Fäcknitz <faecknitz@hotsplots.de>
      Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
      47ce8527
  2. 05 Jul, 2021 2 commits
  3. 30 Jun, 2021 6 commits
  4. 29 Jun, 2021 3 commits
  5. 21 Jun, 2021 4 commits
  6. 01 Jun, 2021 11 commits
  7. 27 May, 2021 11 commits
  8. 11 May, 2021 2 commits