From: "H. Peter Anvin" <hpa@zytor.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: "Nicolas Schier" <nsc@kernel.org>,
"Nathan Chancellor" <nathan@kernel.org>,
"Thomas Gleixner" <tglx@kernel.org>,
"Andy Lutomirski" <luto@kernel.org>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, "Nam Cao" <namcao@linutronix.de>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"André Almeida" <andrealmeid@igalia.com>
Subject: Re: [PATCH] vDSO, kbuild: Provide vDSO debug variants at runtime
Date: Mon, 02 Nov 2026 12:36:05 -0800 [thread overview]
Message-ID: <AAE231D0-1792-4DF6-842A-2C9B4B3BC8EF@zytor.com> (raw)
In-Reply-To: <20261029102949-d209a22d-5f56-4b52-a054-deafff531e7d@linutronix.de>
On October 29, 2026 2:40:26 AM PDT, "Thomas Weißschuh" <thomas.weissschuh@linutronix.de> wrote:
>On Tue, Oct 27, 2026 at 11:12:26PM -0700, H. Peter Anvin wrote:
>> On October 27, 2026 10:55:04 PM PDT, "Thomas Weißschuh" <thomas.weissschuh@linutronix.de> wrote:
>> >On Tue, Oct 27, 2026 at 05:02:52PM -0700, H. Peter Anvin wrote:
>> >> On October 27, 2026 1:22:44 PM PDT, Nicolas Schier <nsc@kernel.org> wrote:
>> >> >On 2026-07-08 15:56 +0200, Thomas Weißschuh wrote:
>> >> >> Finding the debug version of the vDSO is not trivial as there is no common
>> >> >> scheme where it is placed. That's especially problematic for CI testing.
>> >> >>
>> >> >> The vDSO futex unlock mechanism requires for testing to have access to the
>> >> >> inner labels of the unlock assembly, which are only accessible via the
>> >> >> debug so.
>> >> >>
>> >> >> Also for general debugging purposes it's convenient to have access to the
>> >> >> debug vDSO at a well defined place.
>> >> >>
>> >> >> The files are placed in /sys/kernel/vdso_debug.tar.xz. They use the
>> >> >> regular 'make vdso_install' layout, including build-id symlinks to find
>> >> >> the correct file for each process.
>> >> >>
>> >> >> The design is kept close to the ones of the similar IKCONFIG and IKHEADERS.
>> >> >>
>> >> >> On x86 the x32 vDSO is derived from the x86_64 one, necessitating an
>> >> >> explicit dependency to avoid errors due to concurrent builds.
>> >> >>
>> >> >> Suggested-by: Thomas Gleixner <tglx@kernel.org>
>> >> >> Link: https://lore.kernel.org/lkml/20260602090536.045586688@kernel.org/
>> >> >> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>> >> >> ---
>> >> >> Makefile | 33 ++++++++++++++++++++++++++++++++-
>> >> >> arch/x86/Makefile | 3 +++
>> >> >> init/Kconfig | 10 ++++++++++
>> >> >> kernel/Makefile | 1 +
>> >> >> kernel/vdso_debug.c | 43 +++++++++++++++++++++++++++++++++++++++++++
>> >> >> 5 files changed, 89 insertions(+), 1 deletion(-)
>> >> >>
>> >> >
>> >> >This seems to have fallen through the cracks; shall it be considered for
>> >> >kbuild-7.5?
>> >
>> >Please don't pick this up just yet. I have a prototype which exposes the
>> >directory through sysfs directly without forcing users to unpack the archive.
>> >If you could take a look at the kbuild bits however, that would be great.
>> >
>> >> A thought: most tools support compressed separate debug information. Would it
>> >> make more sense to have the vdso images with separate, compressed debug data
>> >> in a subdirectory?
>> >
>> >I want to stick to the 'make vdso_install' layout. Maybe that should be
>> >changed to your proposal, too? But what are the specific advantages?
>> >The files are compressed on disk anyways through the module compression.
>
>> The nice thing would be that it would let debug tools use them as-is, and
>> after all we need to make the vdso itself available anyway.
>
>To make sure we are on the same page:
>You propose to make the vDSO mapping a file-based one pointing to sysfs?
>
>This would change the userspace ABI and I can imagine some tools breaking.
>Also it will require a bunch of additional per-architecture logic.
>
>Tools should be able to handle the debug-id symlinks as implemented by my
>current scheme. For regular (real) file backed mappings there is no guarantee
>that the file on disk is still the same version that is mapped by the process.
>
>> As a possible side benefit the user would be able to see the post-patch vdso.
>
>Nice idea.
>
>
>We could go with a combined aproach. First we go with my proposal which works
>with minimal per-architecture logic and already works for most of them as is.
>That can later be extended with per-architecture logic to provide the
>alternative-patched "live" view, file-backed mappings and detached debug symbols.
>
>
>Thomas
I'm not necessarily saying the vma has to work that way, but the contents can be exported as a file regardless.
It might be nice to do that in the long run, but that's a separate project.
prev parent reply other threads:[~2026-11-02 20:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 13:56 Thomas Weißschuh
2026-07-08 15:28 ` André Almeida
2026-07-15 12:29 ` André Almeida
2026-07-24 14:14 ` Thomas Weißschuh
2026-07-09 9:57 ` Vincenzo Frascino
2026-07-09 19:06 ` H. Peter Anvin
2026-07-10 6:36 ` Thomas Weißschuh
2026-07-10 7:32 ` H. Peter Anvin
2026-07-10 7:41 ` Thomas Weißschuh
2026-07-10 18:34 ` H. Peter Anvin
2026-07-13 13:17 ` Thomas Weißschuh
2026-10-27 20:22 ` Nicolas Schier
2026-10-28 0:02 ` H. Peter Anvin
2026-10-28 5:55 ` Thomas Weißschuh
2026-10-28 6:12 ` H. Peter Anvin
2026-10-29 9:40 ` Thomas Weißschuh
2026-11-02 20:36 ` H. Peter Anvin [this message]
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=AAE231D0-1792-4DF6-842A-2C9B4B3BC8EF@zytor.com \
--to=hpa@zytor.com \
--cc=andrealmeid@igalia.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=namcao@linutronix.de \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
--cc=tglx@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
--cc=vincenzo.frascino@arm.com \
--cc=x86@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®