lkml.org 
[lkml]   [2012]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add VDSO time function support for x86 32-bit kernel
On 12/13/2012 04:20 PM, Andy Lutomirski wrote:
>
> What you could do is probably arrange (using some linker script magic)
> for a symbol to exist that points at the page *before* the vdso
> starts. Then just map the vvar page there when starting a compat
> task. You could then address it using a normal symbol reference by
> tweaking the vvar macro. (I think this'll access it via the GOT.)
> Alternatively, you could just pick an absolute address -- the page is
> NX, so you don't really need to worry about randomization.
>

The best would probably if we could generate GOTOFF references rather
than GOT, which again probably means making the vvar page part of the
vdso proper. Then, when building the list of vdso pages, we need to
substitute in the vvar page in the proper place.

I have to admit to kind of thinking this might work well even for the
64-bit/x32 case, and perhaps even for native 32 bits.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2012-12-14 03:21    [W:1.158 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site