Re: [patch V5 16/16] [RFC] vdso, x86: Expose vdso.so.dbg through sysfs

From: Thomas Gleixner

Date: Tue Jun 02 2026 - 16:04:42 EST


On Tue, Jun 02 2026 at 12:39, Thomas Weißschuh wrote:
> 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.

I'm fine with any sensible solution. This one just worked for my
nefarious purposes and that's why it's marked RFC. :)