linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Detecting the availability of VSYSCALL
@ 2019-06-25 15:15 Florian Weimer
  2019-06-25 16:30 ` Thomas Gleixner
  2019-06-25 20:08 ` Kees Cook
  0 siblings, 2 replies; 18+ messages in thread
From: Florian Weimer @ 2019-06-25 15:15 UTC (permalink / raw)
  To: linux-api, kernel-hardening, linux-x86_64, linux-arch
  Cc: Andy Lutomirski, Kees Cook, Carlos O'Donell

We're trying to create portable binaries which use VSYSCALL on older
kernels (to avoid performance regressions), but gracefully degrade to
full system calls on kernels which do not have VSYSCALL support compiled
in (or disabled at boot).

For technical reasons, we cannot use vDSO fallback.  Trying vDSO first
and only then use VSYSCALL is the way this has been tackled in the past,
which is why this userspace ABI breakage goes generally unnoticed.  But
we don't have a dynamic linker in our scenario.

Is there any reliable way to detect that VSYSCALL is unavailable,
without resorting to parsing /proc/self/maps or opening file
descriptors?

Should we try mapping something at the magic address (without MAP_FIXED)
and see if we get back a different address?  Something in the auxiliary
vector would work for us, too, but nothing seems to exists there
unfortunately.

Thanks,
Florian

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

end of thread, other threads:[~2019-06-26 17:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-25 15:15 Detecting the availability of VSYSCALL Florian Weimer
2019-06-25 16:30 ` Thomas Gleixner
2019-06-25 16:38   ` Florian Weimer
2019-06-25 20:11     ` Andy Lutomirski
2019-06-25 20:47       ` Florian Weimer
2019-06-25 21:49         ` Andy Lutomirski
2019-06-26 12:12           ` Florian Weimer
2019-06-26 14:15             ` Andy Lutomirski
2019-06-26 15:00               ` Florian Weimer
2019-06-26 15:21                 ` Andy Lutomirski
2019-06-26 15:36                   ` Florian Weimer
2019-06-26 16:24                     ` Andy Lutomirski
2019-06-26 16:45                       ` Florian Weimer
2019-06-26 16:52                         ` Andy Lutomirski
2019-06-26 17:04                           ` Florian Weimer
2019-06-26 17:14                             ` Andy Lutomirski
2019-06-25 20:08 ` Kees Cook
2019-06-25 20:13   ` Andy Lutomirski

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).