vdso handling

Pedro Alves palves@redhat.com
Thu Mar 13 15:26:00 GMT 2014

On 03/13/2014 03:04 PM, Pedro Alves wrote:
> On 03/13/2014 02:59 PM, Pedro Alves wrote:
>> Hmm.  How so?  On x86 (arch/x86/vdso/vdso.S), the kernel just does:
> Hmm, guess I should really be looking at where the vdso is
> actually mapped to a process's address space...  (no idea where
> that is).

I think I found it in the same file (arch/x86/vdso/vma.c):

int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
	return setup_additional_pages(bprm, uses_interp, vdso_pages,

vdso_size comes from:

static int __init init_vdso(void)
	int npages = (vdso_end - vdso_start + PAGE_SIZE - 1) / PAGE_SIZE;
	int i;

	patch_vdso64(vdso_start, vdso_end - vdso_start);

	vdso_size = npages << PAGE_SHIFT;

So it seems like the whole vdso should be always mapped in.

I didn't look at the whole mode compat mess, but if it behaves
differently, it'd sound like a kernel bug to me.

Pedro Alves

More information about the Gdb mailing list