mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Arnd Bergmann" <arnd@kernel.org>
Cc: "Thomas Gleixner" <tglx@linutronix.de>,
	"David S . Miller" <davem@davemloft.net>,
	"Andreas Larsson" <andreas@gaisler.com>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
	shuah <shuah@kernel.org>,
	"Anna-Maria Gleixner" <anna-maria@linutronix.de>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"John Stultz" <jstultz@google.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Eric Biggers" <ebiggers@google.com>,
	sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Helge Deller" <deller@gmx.de>
Subject: Re: [PATCH 1/2] vdso: sparc: stub out custom vdso implementation
Date: Tue, 08 Jul 2025 08:40:27 +0200	[thread overview]
Message-ID: <59e6bb77-1f11-4e30-9bbd-51bf077d9840@app.fastmail.com> (raw)
In-Reply-To: <20250708073204-b67226e4-b140-4a1a-ae98-47769c1b2f98@linutronix.de>

On Tue, Jul 8, 2025, at 07:39, Thomas Weißschuh wrote:
> On Mon, Jul 07, 2025 at 04:46:37PM +0200, Arnd Bergmann wrote:
>> 
>>   sparc-linux-ld: warning: arch/sparc/vdso/vdso-note.o: missing .note.GNU-stack section implies executable stack
>>   sparc-linux-ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
>
> IMO this should be in its own patch.

Fair enough, I considered splitting up my patch further already but
tried to keep it simple. This one does make sense to split out though.

>> Most of the removed code only exists on sparc in order to dynamically
>> patch the vdso based on the presence of the tick vs vtick based
>> clocksource.
>> 
>> Rip out the whole thing and replace it with a minimal stub as we do
>> on parisc and uml. This introduces a small performance regression when
>> using a libc that is aware of the vdso (glibc-2.29 or higher).
>> 
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Thanks, this makes things easier.
>
> Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> Tested-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>
> But why do we even need the stubs? Removing the time functions from the
> vDSO completely should also work, no?
> For parisc there was no reasoning why stubs were used. On uml the stubs are
> necessary to prevent the libc from calling into the host vsyscall [0], but
> that looks irrelevant for SPARC.
>
> [0] f1c2bb8b9964 ("um: implement a x86_64 vDSO")

I was wondering about this myself, I thought this might have been
for runtime environments that just assume the vDSO is there, possibly
some non-C libraries, or future glibc versions that may error
out when the vdso is absent instead of falling back to the syscall.

The 5f55e098b8d0 ("parisc: Add 64-bit gettimeofday() and
clock_gettime() vDSO functions") commit and the corresponding
glibc patch one don't have any explanation unfortunately, but
maybe Helge can explain why this is needed.

The arch/x86/um/vdso/um_vdso.c version for 32-bit seems to still
be missing the clock_gettime64() entry, any idea what the
resulting behavior is for time64 userspace?

      Arnd

  reply	other threads:[~2025-07-08  6:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-07 14:46 Arnd Bergmann
2025-07-07 14:46 ` [PATCH 2/2] clocksource: remove ARCH_CLOCKSOURCE_DATA Arnd Bergmann
2025-07-07 17:31   ` John Stultz
2025-07-07 15:22 ` [PATCH 1/2] vdso: sparc: stub out custom vdso implementation John Paul Adrian Glaubitz
2025-07-07 15:45   ` Arnd Bergmann
2025-07-07 16:05     ` John Paul Adrian Glaubitz
2025-07-10 16:22       ` Andreas Larsson
2025-07-11 10:31         ` Arnd Bergmann
2025-07-14  8:40           ` John Paul Adrian Glaubitz
2025-07-21 21:12           ` Thomas Gleixner
2025-07-08  5:39 ` Thomas Weißschuh
2025-07-08  6:40   ` Arnd Bergmann [this message]
2025-07-08  7:13     ` Thomas Weißschuh
2025-07-23 10:57 ` Thomas Weißschuh
2025-07-23 11:10   ` John Paul Adrian Glaubitz
2025-07-23 17:24   ` Thomas Gleixner

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=59e6bb77-1f11-4e30-9bbd-51bf077d9840@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=andreas@gaisler.com \
    --cc=anna-maria@linutronix.de \
    --cc=arnd@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=ebiggers@google.com \
    --cc=frederic@kernel.org \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=shuah@kernel.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@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

all inboxes | Powered by JetHome®