This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: vdso handling
- From: Pedro Alves <palves at redhat dot com>
- To: Mark Wielaard <mjw at redhat dot com>, Cary Coutant <ccoutant at google dot com>, Doug Evans <dje at google dot com>, "Metzger, Markus T" <markus dot t dot metzger at intel dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 13 Mar 2014 15:26:18 +0000
- Subject: Re: vdso handling
- Authentication-results: sourceware.org; auth=none
- References: <A78C989F6D9628469189715575E55B230AA884EB at IRSMSX104 dot ger dot corp dot intel dot com> <20140312071701 dot GW26922 at bubble dot grove dot modra dot org> <CADPb22SAmK5JB3muW_nCvuHN5L-aOcdyzYNR+OtnM3bA1x_OJg at mail dot gmail dot com> <CAHACq4o=HmdCo1FPFL-96raf2UN805jvM=VZM-9dbKrmzJFJTw at mail dot gmail dot com> <20140313010147 dot GZ26922 at bubble dot grove dot modra dot org> <1394704336 dot 11818 dot 115 dot camel at bordewijk dot wildebeest dot org> <20140313130322 dot GA3384 at bubble dot grove dot modra dot org> <5321C7C8 dot 6000707 at redhat dot com> <5321C8FA dot 40708 at gmail dot com>
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);
}
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