linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] vDSO: Introduce generic data storage
@ 2024-12-16 14:09 Thomas Weißschuh
  2024-12-16 14:09 ` [PATCH 01/17] parisc: Remove unused symbol vdso_data Thomas Weißschuh
                   ` (16 more replies)
  0 siblings, 17 replies; 29+ messages in thread
From: Thomas Weißschuh @ 2024-12-16 14:09 UTC (permalink / raw)
  To: James E.J. Bottomley, Helge Deller, Andy Lutomirski,
	Thomas Gleixner, Vincenzo Frascino, Anna-Maria Behnsen,
	Frederic Weisbecker, Andrew Morton, Catalin Marinas, Will Deacon,
	Theodore Ts'o, Jason A. Donenfeld, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Huacai Chen, WANG Xuerui, Russell King,
	Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle, Thomas Bogendoerfer,
	Michael Ellerman, Nicholas Piggin, Christophe Leroy, Naveen N Rao,
	Madhavan Srinivasan, Ingo Molnar, Borislav Petkov, Dave Hansen,
	x86, H. Peter Anvin, Arnd Bergmann
  Cc: linux-parisc, linux-kernel, linux-arm-kernel, linux-riscv,
	loongarch, linux-s390, linux-mips, linuxppc-dev, linux-arch,
	Nam Cao, Thomas Weißschuh

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.13-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

---
Thomas Weißschuh (17):
      parisc: Remove unused symbol vdso_data
      vdso: Introduce vdso/align.h
      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
      vdso: Remove kconfig symbol GENERIC_VDSO_DATA_STORE

 MAINTAINERS                                        |   1 +
 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/vdso/vdso.lds.S                           |   4 +-
 arch/arm64/include/asm/vdso.h                      |   2 +-
 arch/arm64/include/asm/vdso/compat_gettimeofday.h  |  32 +++---
 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/vdso.lds.S                  |   7 +-
 arch/arm64/kernel/vdso32/vdso.lds.S                |   7 +-
 arch/loongarch/Kconfig                             |   1 +
 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/vdso.lds.S                     |   8 +-
 arch/loongarch/vdso/vgetcpu.c                      |   7 +-
 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/vdso.lds.S                          |   5 +-
 arch/parisc/include/asm/vdso.h                     |   2 -
 arch/powerpc/Kconfig                               |   1 +
 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       |  36 +++---
 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/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                                 |   2 +-
 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/hwprobe.c                   |   6 +-
 arch/riscv/kernel/vdso/vdso.lds.S                  |   7 +-
 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/vdso32.lds.S               |   7 +-
 arch/s390/kernel/vdso64/vdso64.lds.S               |   8 +-
 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               |  22 +---
 drivers/char/random.c                              |   6 +-
 include/asm-generic/vdso/vsyscall.h                |  15 +--
 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                            | 105 ++++++++++++++---
 include/vdso/helpers.h                             |   8 +-
 kernel/time/namespace.c                            |  12 +-
 kernel/time/vsyscall.c                             |  19 ++--
 lib/Makefile                                       |   2 +
 lib/vdso/getrandom.c                               |   4 +-
 lib/vdso/gettimeofday.c                            |  62 +++++-----
 lib/vdso_kernel/Makefile                           |   3 +
 lib/vdso_kernel/datastore.c                        | 125 +++++++++++++++++++++
 89 files changed, 574 insertions(+), 1231 deletions(-)
---
base-commit: 40384c840ea1944d7c5a392e8975ed088ecf0b37
change-id: 20240911-vdso-store-rng-607a3dc9e050

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2025-01-09 11:56 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 14:09 [PATCH 00/17] vDSO: Introduce generic data storage Thomas Weißschuh
2024-12-16 14:09 ` [PATCH 01/17] parisc: Remove unused symbol vdso_data Thomas Weißschuh
2024-12-16 14:09 ` [PATCH 02/17] vdso: Introduce vdso/align.h Thomas Weißschuh
2024-12-16 14:09 ` [PATCH 03/17] vdso: Add generic time data storage Thomas Weißschuh
2024-12-18  7:32   ` Christophe Leroy
2024-12-18 10:25     ` Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 04/17] vdso: Add generic random " Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 05/17] vdso: Add generic architecture-specific " Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 06/17] arm64: vdso: Switch to generic storage implementation Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 07/17] riscv: " Thomas Weißschuh
2024-12-18 15:08   ` Conor Dooley
2024-12-18 15:46     ` Thomas Weißschuh
2024-12-18 16:35       ` Arnd Bergmann
2024-12-19  6:30         ` Thomas Weißschuh
2024-12-19  7:03           ` Arnd Bergmann
2024-12-16 14:10 ` [PATCH 08/17] LoongArch: vDSO: " Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 09/17] arm: vdso: " Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 10/17] s390/vdso: " Thomas Weißschuh
2025-01-09 11:55   ` Heiko Carstens
2024-12-16 14:10 ` [PATCH 11/17] MIPS: vdso: " Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 12/17] powerpc/vdso: " Thomas Weißschuh
2024-12-18  7:20   ` Christophe Leroy
2024-12-18 10:16     ` Thomas Weißschuh
2024-12-18 10:20     ` Christophe Leroy
2024-12-16 14:10 ` [PATCH 13/17] x86/vdso: " Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 14/17] x86/vdso/vdso2c: Remove page handling Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 15/17] vdso: Remove remnants of architecture-specific random state storage Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 16/17] vdso: Remove remnants of architecture-specific time storage Thomas Weißschuh
2024-12-16 14:10 ` [PATCH 17/17] vdso: Remove kconfig symbol GENERIC_VDSO_DATA_STORE Thomas Weißschuh

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).