Re: [patch 8/8] x86/vdso: Implement __vdso_futex_robust_try_unlock()
From: Thomas Weißschuh
Date: Thu Mar 19 2026 - 06:50:33 EST
On Thu, Mar 19, 2026 at 11:36:04AM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-03-19 08:41:47 [+0100], Thomas Weißschuh wrote:
> > > vdso2c picks them up correctly too.
> >
> > What also works is to have GDB look up the debug symbols through their
> > debug ids. At this point the load address of the vDSO is already known.
> >
> > $ make vdso_install INSTALL_MOD_PATH=$SOME_DIRECTORY
> > $ gdb -ex "set debug-file-directory $SOME_DIRECTORY/lib/modules/$(uname -r)/vdso" $BINARY
> >
> > Depending on the distribution the vDSO from the kernel package might already
> > be set up to be found automatically.
> >
> > Maybe we could add a helper to scripts/gdb/ which uses $(vdso-install-y)
> > to either populate a debug-file-directory automatically or hook into the GDB
> > lookup process to avoid these manual steps.
>
> Is this a complete vdso.so as mapped in process or just the debug
> symbols or both?
$(vdso-install-y) references full vDSO images including executable code and
debug symbols. The one mapped into userspace is stripped.
> Looking at my Debian thingy this seems to be there as of
> https://packages.debian.org/sid/amd64/linux-image-6.19.8+deb14-amd64-dbg/filelist
>
> | /usr/lib/debug/lib/modules/6.19.8+deb14-amd64/vdso/vdso32.so
> | /usr/lib/debug/lib/modules/6.19.8+deb14-amd64/vdso/vdso64.so
> | /usr/lib/debug/lib/modules/6.19.8+deb14-amd64/vdso/vdsox32.so
> | /usr/lib/debug/lib/modules/6.19.8+deb14-amd64/vmlinux
>
> or do we talk about other things? Usually there is -dbgsym with the
> stripped out debug symbols under /usr/lib/debug/.build-id/ but the
> kernel seems different.
$ dpkg -L linux-image-6.12.74+deb13+1-amd64-dbg | grep -e vdso/vdso -e /usr/lib/debug/.build-id/
/usr/lib/debug/lib/modules/6.12.74+deb13+1-amd64/vdso/vdso32.so
/usr/lib/debug/lib/modules/6.12.74+deb13+1-amd64/vdso/vdso64.so
/usr/lib/debug/lib/modules/6.12.74+deb13+1-amd64/vdso/vdsox32.so
/usr/lib/debug/.build-id/4a/bb1230e4abe0e2d856e1a304b392831ab7a8e1.debug
/usr/lib/debug/.build-id/5f/a3a3ed11e017bcc765ade0997821383a7d4df8.debug
/usr/lib/debug/.build-id/6e/d4f6c60913c24e158bbdfd680b8a1c1b07d8a4.debug
$ readlink /usr/lib/debug/.build-id/4a/bb1230e4abe0e2d856e1a304b392831ab7a8e1.debug
../../lib/modules/6.12.74+deb13+1-amd64/vdso/vdso32.so
This looks as expected to me. It doesn't help for development kernels, though.
Also kbuild 'make deb-pkg' does *not* package these, see also [0].
One thing to note is that Debian does not follow the 'make vdso_install' layout.
Not that this would be a requirement or anything.
[0] https://lore.kernel.org/lkml/20260318-kbuild-pacman-vdso-install-v1-1-48ceb31c0e80@xxxxxxxxxxxxxx/
Thomas