Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Conor Dooley <conor.dooley@microchip.com>,
	Wende Tan <twd2.me@gmail.com>,
	Palmer Dabbelt <palmer@rivosinc.com>,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Nam Cao <namcao@linutronix.de>, kernel test robot <lkp@intel.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] riscv: vdso: Do not use LTO for the vDSO
Date: Tue, 7 Jul 2026 10:44:06 -0700	[thread overview]
Message-ID: <20260707174406.GA991448@ax162> (raw)
In-Reply-To: <20260707080753-4e88aca1-b88d-4f6c-b37a-f7f3064bda5e@linutronix.de>

On Tue, Jul 07, 2026 at 08:10:19AM +0200, Thomas Weißschuh wrote:
> On Mon, Jul 06, 2026 at 02:01:58PM -0700, Nathan Chancellor wrote:
> > On Wed, Jul 01, 2026 at 11:21:22AM +0200, Thomas Weißschuh wrote:
> > > With LTO enabled the compiler assumes that the vDSO functions are not
> > > used and optimizes them away completely. Currently this happens to
> > > __vdso_clock_getres(), __vdso_clock_gettime(), __vdso_getrandom(),
> > > __vdso_gettimeofday() and __vdso_riscv_hwprobe().
> > > 
> > > Disable LTO for the vDSO, as these functions are hand-optimized anyways.
> > > 
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202606301855.WvkSC4kD-lkp@intel.com/
> > 
> > While this change seems correct, is this really the fix for that report?
> > It seems like that error happens in clang but I would expect this sort
> > of issue to only appear once LTO has run through ld.lld?
> 
> At this point the vDSO userspace library has already run through ld.lld.
> That has optimized away the futex symbols, which means their offsets are not
> defined when building the regular vDSO *kernel* code.

Ahhh, thanks for the additional clarification! That makes much more
sense, I had missed that we were in kernel code, not userspace.

-- 
Cheers,
Nathan

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-07-07 17:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  9:21 [PATCH 0/2] riscv: vdso: Do not use LTO for the vDSO Thomas Weißschuh
2026-07-01  9:21 ` [PATCH 1/2] " Thomas Weißschuh
2026-07-06 21:01   ` Nathan Chancellor
2026-07-07  6:10     ` Thomas Weißschuh
2026-07-07 17:44       ` Nathan Chancellor [this message]
2026-07-01  9:21 ` [PATCH 2/2] riscv: vdso: Simplify cflags remove logic Thomas Weißschuh
2026-07-02  9:38 ` [PATCH 0/2] riscv: vdso: Do not use LTO for the vDSO Nam Cao
2026-07-07 17:45 ` Nathan Chancellor

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=20260707174406.GA991448@ax162 \
    --to=nathan@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor.dooley@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=namcao@linutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=pjw@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=twd2.me@gmail.com \
    /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