linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Are vDSO addresses special?
@ 2021-02-11  9:58 Florian Weimer
  2021-02-11 16:10 ` Andy Lutomirski
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2021-02-11  9:58 UTC (permalink / raw)
  To: linux-mm, linux-api, libc-alpha

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Are vDSO addresses special?
  2021-02-11  9:58 Are vDSO addresses special? Florian Weimer
@ 2021-02-11 16:10 ` Andy Lutomirski
  2021-02-12 17:29   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Lutomirski @ 2021-02-11 16:10 UTC (permalink / raw)
  To: Florian Weimer; +Cc: linux-mm, linux-api, libc-alpha


> On Feb 11, 2021, at 2:05 AM, Florian Weimer <fweimer@redhat.com> 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
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Are vDSO addresses special?
  2021-02-11 16:10 ` Andy Lutomirski
@ 2021-02-12 17:29   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2021-02-12 17:29 UTC (permalink / raw)
  To: Andy Lutomirski; +Cc: linux-mm, linux-api, libc-alpha

* Andy Lutomirski:

>> On Feb 11, 2021, at 2:05 AM, Florian Weimer <fweimer@redhat.com> 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.

Thanks.  Patch posted:

<https://sourceware.org/pipermail/libc-alpha/2021-February/122603.html>

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

In the glibc context, it sometimes means “system-call-like function
implemented in the vDSO”.  But that's not the case here.

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-12 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11  9:58 Are vDSO addresses special? Florian Weimer
2021-02-11 16:10 ` Andy Lutomirski
2021-02-12 17:29   ` Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).