[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241218111724-41f5e3c6-f41d-41ec-beed-bd05cca05016@linutronix.de>
Date: Wed, 18 Dec 2024 11:25:44 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
Helge Deller <deller@....de>, Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Vincenzo Frascino <vincenzo.frascino@....com>,
Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Theodore Ts'o <tytso@....edu>,
"Jason A. Donenfeld" <Jason@...c4.com>, Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>,
Russell King <linux@...linux.org.uk>, Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>, Alexander Gordeev <agordeev@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>, Sven Schnelle <svens@...ux.ibm.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>, Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>, Naveen N Rao <naveen@...nel.org>,
Madhavan Srinivasan <maddy@...ux.ibm.com>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Arnd Bergmann <arnd@...db.de>, linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-riscv@...ts.infradead.org, loongarch@...ts.linux.dev,
linux-s390@...r.kernel.org, linux-mips@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-arch@...r.kernel.org, Nam Cao <namcao@...utronix.de>
Subject: Re: [PATCH 03/17] vdso: Add generic time data storage
Hi Christophe,
On Wed, Dec 18, 2024 at 08:32:14AM +0100, Christophe Leroy wrote:
> Le 16/12/2024 à 15:09, Thomas Weißschuh a écrit :
> > Historically each architecture defined their own way to store the vDSO
> > data page. Add a generic mechanism to provide storage for that page.
> >
> > Furthermore this generic storage will be extended to also provide
> > uniform storage for *non*-time-related data, like the random state or
> > architecture-specific data. These will have their own pages and data
> > structures, so rename 'vdso_data' into 'vdso_time_data' to make that
> > split clear from the name.
> >
> > Also introduce a new consistent naming scheme for the symbols related to
> > the vDSO, which makes it clear if the symbol is accessible from
> > userspace or kernel space and the type of data behind the symbol.
> >
> > The generic fault handler contains an optimization to prefault the vvar
> > page when the timens page is accessed. This was lifted from s390 and x86.
> >
> > Co-developed-by: Nam Cao <namcao@...utronix.de>
> > Signed-off-by: Nam Cao <namcao@...utronix.de>
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> > ---
> > MAINTAINERS | 1 +
> > include/linux/time_namespace.h | 1 +
> > include/linux/vdso_datastore.h | 10 +++++
> > include/vdso/datapage.h | 69 +++++++++++++++++++++++++----
> > lib/Kconfig | 1 +
> > lib/Makefile | 2 +
> > lib/vdso_kernel/Kconfig | 7 +++
> > lib/vdso_kernel/Makefile | 3 ++
> > lib/vdso_kernel/datastore.c | 99 ++++++++++++++++++++++++++++++++++++++++++
>
> There is only one single file, namely datastore.c. You don't need a new
> directory for that, I should go in lib/vdso/
lib/vdso/ currently only contains userspace code.
I don't have a strong opinion on that.
The lib/vdso_kernel location was suggested by tglx, maybe he has some
feedback. (Originally I put it into kernel/vdso_storage.c)
[..]
> > +enum vdso_pages {
> > + VDSO_TIME_PAGE_OFFSET,
> > + VDSO_TIMENS_PAGE_OFFSET,
> > + VDSO_NR_PAGES
> > +};
>
> Naming that VDSO_ is confusing. Most macros called VDSO_ are related to the
> VDSO Code. VDSO data related macros should be prefixed with VVAR_
Also a request from tglx.
[..]
Thanks!
Thomas
Powered by blists - more mailing lists