linux/arch/s390
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: 1ba2d6c0fd ("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
..
appldata s390/appldata: use struct_size() helper 2020-06-29 16:32:34 +02:00
boot s390: uv: Fix sysfs max number of VCPUs reporting 2021-01-27 13:00:04 +01:00
configs s390: remove IBM_PARTITION and CONFIGFS_FS from zfcpdump defconfig 2021-03-08 10:46:30 +01:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-02-21 17:23:56 -08:00
hypfs s390/hypfs: use store_tod_clock_ext() 2021-02-13 17:17:55 +01:00
include s390/vdso: fix tod_steering_delta type 2021-03-25 21:57:25 +01:00
kernel s390/vdso: fix initializing and updating of vdso_data 2021-03-25 21:57:26 +01:00
kvm s390/time,idle: get rid of unsigned long long 2021-03-08 10:46:27 +01:00
lib s390: convert to generic entry 2021-01-19 12:29:26 +01:00
mm s390 updates for the 5.12 merge window #2 2021-02-26 14:12:32 -08:00
net bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
pci s390/pci: fix leak of PCI device structure 2021-03-15 19:10:56 +01:00
purgatory - Add support for the hugetlb_cma command line option to allocate gigantic 2020-12-14 16:22:26 -08:00
tools s390/opcodes: rename selhhhr to selfhr 2021-02-24 00:31:22 +01:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig Rework of the X86 irq stack handling: 2021-02-24 16:32:23 -08:00
Kconfig.debug s390: convert to generic entry 2021-01-19 12:29:26 +01:00
Makefile arch: s390: Remove CONFIG_OPROFILE support 2021-01-29 10:05:51 +05:30