Are vDSO addresses special?

2 messages, 2 authors, 2021-02-11 · open the first message on its own page

Are vDSO addresses special?

From: Florian Weimer <hidden>
Date: 2021-02-11 09:58:08

In glibc, we have some code that copies the DT_SONAME string of the
kernel vDSO into the heap, commented this way:

             /* Work around a kernel problem.  The kernel cannot handle
                addresses in the vsyscall DSO pages in writev() calls.  */

Is this really a problem anymore?  vDSO addresses are ordinary userspace
addresses, I think.  (The vsyscall stuff is very different, of course,
and maybe the vDSO started out the same way.)

We only care about Linux 3.2 or later in glibc.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill

Re: Are vDSO addresses special?

From: Andy Lutomirski <luto@amacapital.net>
Date: 2021-02-11 16:10:48

On Feb 11, 2021, at 2:05 AM, Florian Weimer [off-list ref] wrote:

In glibc, we have some code that copies the DT_SONAME string of the
kernel vDSO into the heap, commented this way:

            /* Work around a kernel problem.  The kernel cannot handle
               addresses in the vsyscall DSO pages in writev() calls.  */

Is this really a problem anymore?  vDSO addresses are ordinary userspace
addresses, I think.  (The vsyscall stuff is very different, of course,
and maybe the vDSO started out the same way.)
I don’t think it was ever a problem, and it certainly haven’t been a problem for a long, long time. vDSO addresses are regular user addresses.  The *vsyscall* addresses are not, and most syscalls will not accept them, but that shouldn’t matter especially since modern kernels, by default, won’t let you read those addresses from user code either.

Saying “vsyscall DSO” is odd. There’s no such thing.

—Andy 
We only care about Linux 3.2 or later in glibc.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help