[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTi=+eGfzfmEG7=ytRzg1skTrCtkCVw@mail.gmail.com>
Date: Sun, 29 May 2011 11:28:12 -0400
From: Andrew Lutomirski <luto@....edu>
To: richard -rw- weinberger <richard.weinberger@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [GIT pull] x86 vdso updates
On Sun, May 29, 2011 at 11:10 AM, richard -rw- weinberger
<richard.weinberger@...il.com> wrote:
> On Sun, May 29, 2011 at 4:57 PM, Andrew Lutomirski <luto@....edu> wrote:
>> On Sun, May 29, 2011 at 5:51 AM, richard -rw- weinberger
>> <richard.weinberger@...il.com> wrote:
>>> Yesterday I had a closer look at 64bit UML.
>>> Glibc is always using vsyscalls because 64bit UML does not support the vDSO.
>>>
>>> On 32bit UML simply scans the ELF auxiliary vector provided by the host to
>>> get the address of the vDSO.
>>> How can I get this address on a 64bit host?
>>
>> I believe it's exactly the same. There's an auxv entry that points to the vDSO.
>
> I don't think so.
> See:
> http://www.win.tue.nl/~aeb/linux/lk/lk-4.html
> Section "Address space randomization".
> The demo program finds the vDSO only on x86.
>
> UML uses quite the same method to find it.
> arch/um/os-Linux/elf_aux.c
The attached program works for me.
I don't know what this is supposed to mean, though:
/* See if the page is under TASK_SIZE */
if (vsyscall_ehdr < (unsigned long) envp)
vsyscall_ehdr = 0;
First, envp != TASK_SIZE.
Second, the vDSO can be wherever it wants. On current kernels at
least it is *always* mapped below TASK_SIZE (in the unsigned sense)
because it's mapped into user address space.
--Andy
View attachment "auxv.c" of type "text/x-csrc" (998 bytes)
Powered by blists - more mailing lists