lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241219072552-7cd4512c-4f61-408a-9422-167a6f2810db@linutronix.de>
Date: Thu, 19 Dec 2024 07:30:26 +0100
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Arnd Bergmann <arnd@...db.de>
Cc: Conor Dooley <conor@...nel.org>, 
	"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 Gleixner <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>, Christophe Leroy <christophe.leroy@...roup.eu>, 
	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>, 
	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 <linux-arch@...r.kernel.org>, Nam Cao <namcao@...utronix.de>
Subject: Re: [PATCH 07/17] riscv: vdso: Switch to generic storage
 implementation

On Wed, Dec 18, 2024 at 05:35:31PM +0100, Arnd Bergmann wrote:
> On Wed, Dec 18, 2024, at 16:46, Thomas Weißschuh wrote:
> > On Wed, Dec 18, 2024 at 03:08:28PM +0000, Conor Dooley wrote:
> >> On Mon, Dec 16, 2024 at 03:10:03PM +0100, Thomas Weißschuh wrote:
> 
> >> Might be a clang thing, allmodconfig with clang doesn't build either.
> >
> > The proposed generic storage infrastructure currently expects that all
> > its users also use HAVE_GENERIC_VDSO.
> > I missed rv32 when checking this assumption.
> >
> > I can add a bunch of ifdefs into the storage code to handle this.
> >
> > Or we re-add the time vDSO functions which were removed in commit
> > d4c08b9776b3 ("riscv: Use latest system call ABI").
> > Today there are upstream ports of musl and glibc which can use them.
> > (currently musl even tries to use __vdso_clock_gettime() as 64-bit only
> > on rv32 due to a copy-and-paste error from its rv64 code)
> 
> Adding back __vdso_clock_gettime() wouldn't work on rv32 because there
> is no fallback syscall for it, and it wouldn't really help since
> there is no existing userspace that uses time32 structures.

My original paragraph was worded confusingly.
It was about re-adding time-related vDSO function *in general*, not the
specific 32-bit ones.
The new ones should be 64-bit only, indeed.

> > There is precedence in providing 64bit only vDSO functions, for example
> > __vdso_clock_gettime64() in arm.
> > I do have a small, so far untested, proof-of-concept patch for it.
> > This would even be less code than the ifdefs.
> >
> > What do you think about it?
> 
> Yes, simply exposing the normal time64 syscalls through vdso
> should be fine. I think this currently works on everything except
> rv32 and sparc32, probably because neither of them have actual
> users that are able to test.

Should it use the specific _vdso_clock_gettime64() naming or leave out
the 64 suffix?


General Note: I'll continue working on this next year.


Thanks,
Thomas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ