From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
Helge Deller <deller@gmx.de>, Andy Lutomirski <luto@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Theodore Ts'o <tytso@mit.edu>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Russell King <linux@armlinux.org.uk>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Naveen N Rao <naveen@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Arnd Bergmann <arnd@arndb.de>, Guo Ren <guoren@kernel.org>
Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, loongarch@lists.linux.dev,
linux-s390@vger.kernel.org, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org,
"Nam Cao" <namcao@linutronix.de>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
linux-csky@vger.kernel.org
Subject: [PATCH v3 00/18] vDSO: Introduce generic data storage
Date: Tue, 04 Feb 2025 13:05:32 +0100 [thread overview]
Message-ID: <20250204-vdso-store-rng-v3-0-13a4669dfc8c@linutronix.de> (raw)
Currently each architecture defines the setup of the vDSO data page on
its own, mostly through copy-and-paste from some other architecture.
Extend the existing generic vDSO implementation to also provide generic
data storage.
This removes duplicated code and paves the way for further changes to
the generic vDSO implementation without having to go through a lot of
per-architecture changes.
Based on v6.14-rc1 and intended to be merged through the tip tree.
This also provides the basis for some generic vDSO reworks.
The commits from this series and the upcoming reworks can be seen at:
https://git.kernel.org/pub/scm/linux/kernel/git/thomas.weissschuh/linux.git/log/?h=vdso/store
---
Changes in v3:
- Rebase on v6.14-rc1
- Fix build on riscv64-nommu
- Link to v2: https://lore.kernel.org/r/20250110-vdso-store-rng-v2-0-350c9179bbf1@linutronix.de
Changes in v2:
- Drop __arch_get_vdso_u_timens_data() (Christophe)
- Move to lib/vdso/ (Christophe)
- Rename __ppc_get_vdso_u_timens_data() to
__arch_get_vdso_u_timens_data(), same for other hooks
(Christophe)
- Fix build for architectures with time-less vDSO, like riscv32. (Conor)
- Explicitly fix bug around x86 vclock pages
- Link to v1: https://lore.kernel.org/r/20241216-vdso-store-rng-v1-0-f7aed1bdb3b2@linutronix.de
---
Thomas Weißschuh (18):
x86/vdso: Fix latent bug in vclock_pages calculation
parisc: Remove unused symbol vdso_data
vdso: Introduce vdso/align.h
vdso: Rename included Makefile
vdso: Add generic time data storage
vdso: Add generic random data storage
vdso: Add generic architecture-specific data storage
arm64: vdso: Switch to generic storage implementation
riscv: vdso: Switch to generic storage implementation
LoongArch: vDSO: Switch to generic storage implementation
arm: vdso: Switch to generic storage implementation
s390/vdso: Switch to generic storage implementation
MIPS: vdso: Switch to generic storage implementation
powerpc/vdso: Switch to generic storage implementation
x86/vdso: Switch to generic storage implementation
x86/vdso/vdso2c: Remove page handling
vdso: Remove remnants of architecture-specific random state storage
vdso: Remove remnants of architecture-specific time storage
arch/Kconfig | 4 +
arch/arm/include/asm/vdso.h | 2 +
arch/arm/include/asm/vdso/gettimeofday.h | 7 +-
arch/arm/include/asm/vdso/vsyscall.h | 12 +-
arch/arm/kernel/asm-offsets.c | 4 -
arch/arm/kernel/vdso.c | 34 ++----
arch/arm/mm/Kconfig | 1 +
arch/arm/vdso/Makefile | 2 +-
arch/arm/vdso/vdso.lds.S | 4 +-
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/vdso.h | 2 +-
arch/arm64/include/asm/vdso/compat_gettimeofday.h | 36 ++----
arch/arm64/include/asm/vdso/getrandom.h | 12 --
arch/arm64/include/asm/vdso/gettimeofday.h | 16 +--
arch/arm64/include/asm/vdso/vsyscall.h | 25 +---
arch/arm64/kernel/vdso.c | 90 +-------------
arch/arm64/kernel/vdso/Makefile | 2 +-
arch/arm64/kernel/vdso/vdso.lds.S | 7 +-
arch/arm64/kernel/vdso32/Makefile | 2 +-
arch/arm64/kernel/vdso32/vdso.lds.S | 7 +-
arch/csky/kernel/vdso/Makefile | 2 +-
arch/loongarch/Kconfig | 2 +
arch/loongarch/include/asm/vdso.h | 1 -
arch/loongarch/include/asm/vdso/arch_data.h | 25 ++++
arch/loongarch/include/asm/vdso/getrandom.h | 5 -
arch/loongarch/include/asm/vdso/gettimeofday.h | 14 +--
arch/loongarch/include/asm/vdso/vdso.h | 38 +-----
arch/loongarch/include/asm/vdso/vsyscall.h | 17 ---
arch/loongarch/kernel/asm-offsets.c | 2 +-
arch/loongarch/kernel/vdso.c | 92 +--------------
arch/loongarch/vdso/Makefile | 2 +-
arch/loongarch/vdso/vdso.lds.S | 8 +-
arch/loongarch/vdso/vgetcpu.c | 12 +-
arch/mips/Kconfig | 1 +
arch/mips/include/asm/vdso/gettimeofday.h | 9 +-
arch/mips/include/asm/vdso/vdso.h | 19 ++-
arch/mips/include/asm/vdso/vsyscall.h | 14 +--
arch/mips/kernel/vdso.c | 47 +++-----
arch/mips/vdso/Makefile | 2 +-
arch/mips/vdso/vdso.lds.S | 5 +-
arch/parisc/include/asm/vdso.h | 2 -
arch/parisc/kernel/vdso32/Makefile | 2 +-
arch/parisc/kernel/vdso64/Makefile | 2 +-
arch/powerpc/Kconfig | 2 +
arch/powerpc/include/asm/vdso.h | 1 +
arch/powerpc/include/asm/vdso/arch_data.h | 37 ++++++
arch/powerpc/include/asm/vdso/getrandom.h | 11 +-
arch/powerpc/include/asm/vdso/gettimeofday.h | 29 ++---
arch/powerpc/include/asm/vdso/vsyscall.h | 13 ---
arch/powerpc/include/asm/vdso_datapage.h | 44 +------
arch/powerpc/kernel/asm-offsets.c | 1 -
arch/powerpc/kernel/time.c | 2 +-
arch/powerpc/kernel/vdso.c | 115 ++----------------
arch/powerpc/kernel/vdso/Makefile | 2 +-
arch/powerpc/kernel/vdso/cacheflush.S | 2 +-
arch/powerpc/kernel/vdso/datapage.S | 4 +-
arch/powerpc/kernel/vdso/gettimeofday.S | 4 +-
arch/powerpc/kernel/vdso/vdso32.lds.S | 4 +-
arch/powerpc/kernel/vdso/vdso64.lds.S | 4 +-
arch/powerpc/kernel/vdso/vgettimeofday.c | 14 +--
arch/riscv/Kconfig | 3 +-
arch/riscv/include/asm/vdso.h | 2 +-
.../include/asm/vdso/{time_data.h => arch_data.h} | 8 +-
arch/riscv/include/asm/vdso/gettimeofday.h | 14 +--
arch/riscv/include/asm/vdso/vsyscall.h | 9 --
arch/riscv/kernel/sys_hwprobe.c | 3 +-
arch/riscv/kernel/vdso.c | 90 +-------------
arch/riscv/kernel/vdso/Makefile | 2 +-
arch/riscv/kernel/vdso/hwprobe.c | 6 +-
arch/riscv/kernel/vdso/vdso.lds.S | 7 +-
arch/s390/Kconfig | 1 +
arch/s390/include/asm/vdso.h | 4 +-
arch/s390/include/asm/vdso/getrandom.h | 12 --
arch/s390/include/asm/vdso/gettimeofday.h | 15 +--
arch/s390/include/asm/vdso/vsyscall.h | 20 ----
arch/s390/kernel/time.c | 6 +-
arch/s390/kernel/vdso.c | 97 +---------------
arch/s390/kernel/vdso32/Makefile | 2 +-
arch/s390/kernel/vdso32/vdso32.lds.S | 7 +-
arch/s390/kernel/vdso64/Makefile | 2 +-
arch/s390/kernel/vdso64/vdso64.lds.S | 8 +-
arch/x86/Kconfig | 1 +
arch/x86/entry/vdso/Makefile | 2 +-
arch/x86/entry/vdso/vdso-layout.lds.S | 10 +-
arch/x86/entry/vdso/vdso2c.c | 21 ----
arch/x86/entry/vdso/vdso2c.h | 20 ----
arch/x86/entry/vdso/vma.c | 125 ++------------------
arch/x86/include/asm/vdso.h | 6 -
arch/x86/include/asm/vdso/getrandom.h | 10 --
arch/x86/include/asm/vdso/gettimeofday.h | 25 +---
arch/x86/include/asm/vdso/vsyscall.h | 23 +---
drivers/char/random.c | 6 +-
include/asm-generic/vdso/vsyscall.h | 27 +++--
include/linux/align.h | 10 +-
include/linux/time_namespace.h | 2 -
include/linux/vdso_datastore.h | 10 ++
include/vdso/align.h | 15 +++
include/vdso/datapage.h | 74 +++++++++---
include/vdso/helpers.h | 8 +-
kernel/time/namespace.c | 12 +-
kernel/time/vsyscall.c | 19 ++-
lib/Makefile | 2 +-
lib/vdso/Kconfig | 5 +
lib/vdso/Makefile | 19 +--
lib/vdso/Makefile.include | 18 +++
lib/vdso/datastore.c | 129 +++++++++++++++++++++
lib/vdso/getrandom.c | 8 +-
lib/vdso/gettimeofday.c | 74 +++++++-----
108 files changed, 604 insertions(+), 1277 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20240911-vdso-store-rng-607a3dc9e050
Best regards,
--
Thomas Weißschuh <thomas.weissschuh@linutronix.de>
next reply other threads:[~2025-02-04 12:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-04 12:05 Thomas Weißschuh [this message]
2025-02-04 12:05 ` [PATCH v3 01/18] x86/vdso: Fix latent bug in vclock_pages calculation Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 02/18] parisc: Remove unused symbol vdso_data Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 03/18] vdso: Introduce vdso/align.h Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 04/18] vdso: Rename included Makefile Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 05/18] vdso: Add generic time data storage Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 06/18] vdso: Add generic random " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 07/18] vdso: Add generic architecture-specific " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 08/18] arm64: vdso: Switch to generic storage implementation Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 09/18] riscv: " Thomas Weißschuh
2025-02-22 8:17 ` Xi Ruoyao
2025-02-22 10:14 ` Thomas Gleixner
2025-02-04 12:05 ` [PATCH v3 10/18] LoongArch: vDSO: " Thomas Weißschuh
2025-02-22 8:20 ` Xi Ruoyao
2025-02-04 12:05 ` [PATCH v3 11/18] arm: vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 12/18] s390/vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 13/18] MIPS: vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 14/18] powerpc/vdso: " Thomas Weißschuh
2025-02-05 8:50 ` Christophe Leroy
2025-02-04 12:05 ` [PATCH v3 15/18] x86/vdso: " Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 16/18] x86/vdso/vdso2c: Remove page handling Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 17/18] vdso: Remove remnants of architecture-specific random state storage Thomas Weißschuh
2025-02-04 12:05 ` [PATCH v3 18/18] vdso: Remove remnants of architecture-specific time storage Thomas Weißschuh
2025-02-06 9:31 ` [PATCH v3 00/18] vDSO: Introduce generic data storage David Woodhouse
2025-02-06 10:59 ` Thomas Weißschuh
2025-02-07 10:15 ` David Woodhouse
2025-02-14 11:34 ` Thomas Gleixner
2025-02-14 12:04 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250204-vdso-store-rng-v3-0-13a4669dfc8c@linutronix.de \
--to=thomas.weissschuh@linutronix.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Jason@zx2c4.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=anna-maria@linutronix.de \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=borntraeger@linux.ibm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dave.hansen@linux.intel.com \
--cc=deller@gmx.de \
--cc=frederic@kernel.org \
--cc=gor@linux.ibm.com \
--cc=guoren@kernel.org \
--cc=hca@linux.ibm.com \
--cc=hpa@zytor.com \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-csky@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=loongarch@lists.linux.dev \
--cc=luto@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=namcao@linutronix.de \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=svens@linux.ibm.com \
--cc=tglx@linutronix.de \
--cc=tsbogend@alpha.franken.de \
--cc=tytso@mit.edu \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).