linux-stable/arch/riscv/kernel/vdso
Tong Tiangen 78a743cd82
riscv/vdso: Move vdso data page up front
As commit 601255ae3c ("arm64: vdso: move data page before code pages"), the
same issue exists on riscv, testcase is shown below, make sure that vdso.so is
bigger than page size,

  struct timespec tp;
  clock_gettime(5, &tp);
  printf("tv_sec: %ld, tv_nsec: %ld\n", tp.tv_sec, tp.tv_nsec);

without this patch, test result : tv_sec: 0, tv_nsec: 0
   with this patch, test result : tv_sec: 1629271537, tv_nsec: 748000000

Move the vdso data page in front of the VDSO area to fix the issue.

Fixes: ad5d1122b8 ("riscv: use vDSO common flow to reduce the latency of the time-related functions")
Signed-off-by: Tong Tiangen <tongtiangen@huawei.com>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
2021-10-02 13:42:25 -07:00
..
.gitignore RISC-V: Fix the VDSO symbol generaton for binutils-2.35+ 2020-11-06 00:03:48 -08:00
flush_icache.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
gen_vdso_offsets.sh riscv: explicitly use symbol offsets for VDSO 2021-08-24 21:45:47 -07:00
getcpu.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
Makefile riscv: explicitly use symbol offsets for VDSO 2021-08-24 21:45:47 -07:00
note.S riscv: add Linux note to vdso 2020-05-04 14:22:34 -07:00
rt_sigreturn.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
vdso.lds.S riscv/vdso: Move vdso data page up front 2021-10-02 13:42:25 -07:00
vdso.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286 2019-06-05 17:36:37 +02:00
vgettimeofday.c riscv: Add extern declarations for vDSO time-related functions 2020-06-25 15:15:51 -07:00