[musl] Re: Thread pointer changes

Rich Felker dalias at libc.org
Fri Jun 27 14:58:09 PDT 2014


On Fri, Jun 27, 2014 at 02:47:38PM -0700, Andy Lutomirski wrote:
> >> > Due to that, any ARMv5 or earlier CPU will always have the kuser helper
> >> > page.  ARMv6 and later may or may not have the kuser helper page, but
> >> > there you're really building for a different ABI anyway (VFP-based) and
> >> > you also know that you have the thread registers.
> >>
> >> so is it expected that the libc makes no attempt to provide
> >> portable binary interface for armv5 and armv6?
> >
> > The libc interface that applications make use should not have any
> > dependence on whether KUSER_HELPERS is enabled or disabled, the
> > presence of that page should be totally invisible to applications.
> 
> As of right now, an x86_64 libc can have good performance on any
> recent kernel and will work correctly on any kernel.  From what you're
> saying, it sounds impossible to implement such a thing on ARM without
> fiddling with /proc.

Indeed. I wasn't even aware of the legacy vsyscall mess for x86_64,
and we're not using it in musl. Keeping it around seems like just a
matter of maintaining API/ABI compatibility with legacy versions of
glibc that are using it. On the other hand, the kuser helper page is
the ONLY way for a libc that's compatible with pre-v6 arm to get
working atomics and TLS.

Rich



More information about the linux-arm-kernel mailing list