Heiko Carstens 5b43bd1845 s390/vdso: fix initializing and updating of vdso_data
Li Wang reported that clock_gettime(CLOCK_MONOTONIC_RAW, ...) returns
incorrect values when time is provided via vdso instead of system call:

vdso_ts_nsec = 4484351380985507, vdso_ts.tv_sec = 4484351, vdso_ts.tv_nsec = 380985507
sys_ts_nsec  = 1446923235377, sys_ts.tv_sec  = 1446, sys_ts.tv_nsec  = 923235377

Within the s390 specific vdso function __arch_get_hw_counter() reads
tod clock steering values from the arch_data member of the passed in
vdso_data structure.

Problem is that only for the CS_HRES_COARSE vdso_data arch_data is
initialized and gets updated. The CS_RAW specific vdso_data does not
contain any valid tod_clock_steering information, which explains the
different values.

Fix this by initializing and updating all vdso_datas.

Reported-by: Li Wang <liwang@redhat.com>
Tested-by: Li Wang <liwang@redhat.com>
Fixes: 1ba2d6c0fd4e ("s390/vdso: simplify __arch_get_hw_counter()")
Link: https://lore.kernel.org/linux-s390/YFnxr1ZlMIOIqjfq@osiris
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2021-03-25 21:57:26 +01:00
..
2021-01-24 14:42:45 +01:00
2021-02-13 17:17:54 +01:00
2021-01-19 12:29:26 +01:00
2021-02-13 17:17:54 +01:00
2020-09-17 14:11:03 +02:00
2021-01-19 12:29:26 +01:00
2021-02-13 17:17:53 +01:00
2021-01-19 12:29:26 +01:00
2020-12-17 13:22:17 -08:00
2020-12-16 14:55:49 +01:00
2021-02-24 16:32:23 -08:00
2020-06-29 16:31:46 +02:00
2021-01-19 12:29:26 +01:00
2021-01-19 12:29:26 +01:00
2021-01-19 12:29:26 +01:00
2021-01-19 12:29:26 +01:00
2021-01-19 12:29:26 +01:00