From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 893523557F3 for ; Tue, 2 Jun 2026 10:39:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780396795; cv=none; b=a6ATDmgcde4D7CdHWq2XNSgYYjnmAYgLimU/oxkf/lRc6AWL1YaGh+KUkMBvU/spiVqCtsNYMknGjaxz+Zi5TauWyoI//nLGomIjByr8Kr1gu9vSH+vVloNYsfnEIa7HotGqY5W/JJkh7vkvW6pF+nnH5gbsZmPsickrjZCT6Bw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780396795; c=relaxed/simple; bh=OmnILY7T84wd/e4Mu7qptmOzja3vnAoxmUj2L6bYRA8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=esj1fDoFFYg+J8EsZIwRQzJElg+I02TkKg7SBmUVmK3RCDtWPEncVFC2vHMwf3aYpEUhCtokoizJy8YJJ8adul3swAKCwoYT38ScSZsH9lz6L6cIEFOTXlYOzBuDCsfI4iDXJ4JXTxbauU9BrLmzdzg+ihJK5q0e9HH/Pb5L5EY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=D+p3BRRg; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="D+p3BRRg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1780396791; bh=OmnILY7T84wd/e4Mu7qptmOzja3vnAoxmUj2L6bYRA8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D+p3BRRgm36ynTR5wYgKEMNdnpjts+BdIVKf1Ng5b2pk/uN3hRQBuieRjqmcCgBwz 3RteO4z30oBGxj0/VjWmuvBVHNaWor59zCK2IAulZz1rvwhuus8Vg5xeh0vSPURmN1 YyP/v6zgE31ZB3RKTydSH3QlKZtqhhLEixBLIFZo= Date: Tue, 2 Jun 2026 12:39:50 +0200 From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Thomas Gleixner Cc: LKML , Mathieu Desnoyers , =?utf-8?B?QW5kcsOp?= Almeida , Sebastian Andrzej Siewior , Carlos O'Donell , Peter Zijlstra , Florian Weimer , Rich Felker , Torvald Riegel , Darren Hart , Ingo Molnar , Davidlohr Bueso , Arnd Bergmann , "Liam R . Howlett" , Uros Bizjak , Mark Brown , Richard Weinberger Subject: Re: [patch V5 16/16] [RFC] vdso, x86: Expose vdso.so.dbg through sysfs Message-ID: <3d810e4e-1ae5-4b00-8c82-8b5d64c8adeb@t-8ch.de> References: <20260602084648.462672743@kernel.org> <20260602090536.045586688@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260602090536.045586688@kernel.org> On 2026-06-02 11:10:25+0200, Thomas Gleixner 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 conveniant to have access to the > debug VDSO at a well defined place. > > The files are placed in /sys/kernel/vdso/ and named vdso32.so.dbg, > vdso64.so.dbg, vdsox32.so.dbg. How is a user supposed to find the correct one for a given task? As currently proposed that requires architecture-specific logic. What about mirroring CONFIG_IKCONFIG and CONFIG_IKHEADERS, packaging the output of 'make vdso_install' as an archive and embedding that into the kernel. It has the following advantages: * Can be loaded on-demand from a module. * Does not require additional (per-architecture) code. * Contains build-id symlinks which can be followed automatically to find a task's debug vDSO. Currently CONFIG_IKHEADERS only provide the compressed archives, and not a directly usable directory, though. That could be fine here, too. > Signed-off-by: Thomas Gleixner > --- > arch/x86/Kconfig | 1 + > arch/x86/include/asm/vdso.h | 3 +++ > arch/x86/tools/vdso2c.c | 15 ++++++++++----- > arch/x86/tools/vdso2c.h | 32 ++++++++++++++++++++++++++++++-- > include/vdso/sysfs.h | 7 +++++++ > lib/vdso/Kconfig | 6 ++++++ > lib/vdso/Makefile | 3 ++- > lib/vdso/sysfs.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ > 8 files changed, 103 insertions(+), 8 deletions(-) (...) > --- /dev/null > +++ b/include/vdso/sysfs.h > @@ -0,0 +1,7 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef __VDSO_SYSFS_H > +#define __VDSO_SYSFS_H > + > +int vdso_sysfs_init_image(const char *name, void *addr, unsigned int size); > + > +#endif /* __VDSO_SYSFS_H */ This breaks the vdso/ header namespace. For the datastore I went with include/linux/vdso_datastore.h. Maye we can use include/linux/vdso/ ? (...) Thomas