[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <366bb558c3fd23b9a80008d923f29ed0234e17b9.camel@sipsolutions.net>
Date: Mon, 22 Sep 2025 17:14:18 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Tiwei Bie <tiwei.bie@...ux.dev>, richard@....at,
anton.ivanov@...bridgegreys.com, benjamin@...solutions.net, arnd@...db.de,
linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org,
tiwei.btw@...group.com
Subject: Re: [PATCH v2 03/10] um: vdso: Implement __vdso_getcpu() via syscall
On Mon, 2025-09-22 at 16:01 +0200, Thomas Weißschuh wrote:
> Right now it does not provide any advantage over a regular syscall.
> Essentially it is just overhead. That said, if you do want to make a
> real vDSO out of it, I'd be happy to help in that.
I don't know if I'd say "just overhead" - depends on which path is more
optimised in a typical libc implementation? I'd basically think it's
identical, no? You either link to the vDSO, or a __weak same function in
the libc?
> > I mean ... on the one hand, sure, it doesn't really do much after this,
> > but OTOH it lets userspace actually use that path? So might be useful.
>
> What advantage does userspace have from it?
Right now, none? But it's easier to play with if you have the
infrastructure, and I'm not convinced there's a _disadvantage_?
> > > Also the functionality to map the host vDSO and vsyscall page into UML
> > > userspace looks very weird and error-prone. Maybe it can also go away.
> >
> > Surely host vDSO etc. is never mapped into UML userspace and never is,
> > not sure what you're thinking of, but clearly that's wrong as written.
>
> This is how I understand the 32bit implementation using
> ARCH_REUSE_HOST_VSYSCALL_AREA and NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr)
> where vsyscall_ehdr comes from the hosts getauxval(AT_SYSINFO_EHDR).
Huh, hm, yeah I forgot about that ... 32-bit. Yeah, agree we should just
kill that. I'm not even sure it works with the host kernel trapping
there? Oh well.
johannes
Powered by blists - more mailing lists