powerpc/vdso: Add a page for non-time data
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 2 Oct 2024 08:39:28 +0000 (10:39 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Oct 2024 00:08:20 +0000 (11:08 +1100)
commitc39b1dcf055d420a498d1047c645b776e4d1a7aa
tree1186d6bb9294f87f4caa50781d1a877849cd5573
parent8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b
powerpc/vdso: Add a page for non-time data

The page containing VDSO time data is swapped with the one containing
TIME namespace data when a process uses a non-root time namespace.
For other data like powerpc specific data and RNG data, it means
tracking whether time namespace is the root one or not to know which
page to use.

Simplify the logic behind by moving time data out of first data page
so that the first data page which contains everything else always
remains the first page. Time data is in the second or third page
depending on selected time namespace.

While we are playing with get_datapage macro, directly take into
account the data offset inside the macro instead of adding that offset
afterwards.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/0557d3ec898c1d0ea2fc59fa8757618e524c5d94.1727858295.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/vdso_datapage.h
arch/powerpc/kernel/vdso.c
arch/powerpc/kernel/vdso/cacheflush.S
arch/powerpc/kernel/vdso/datapage.S
arch/powerpc/kernel/vdso/getrandom.S
arch/powerpc/kernel/vdso/gettimeofday.S
arch/powerpc/kernel/vdso/vdso32.lds.S
arch/powerpc/kernel/vdso/vdso64.lds.S