[musl] Re: Thread pointer changes
Andy Lutomirski
luto at amacapital.net
Fri Jun 27 16:17:52 PDT 2014
On Fri, Jun 27, 2014 at 4:07 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> The kuser helpers can NOT be removed unless the CPU is v6k+. Let me
> put that a different way: the kuser helpers can not be removed unless
> the ELF HWCAPs indicate TLS support.
Why? (This is an honest question -- there may be an excellent
answer.) I understand why they're needed in the first place, but I
don't understand why they need to live at a fixed address.
The closest thing to this that I'm familiar with is x86_32's sysenter.
It's a very useful instruction, but it's basically impossible for libc
to contain a sysenter instruction in the libc image. So the kernel
provides one *at a randomized address*, and libc calls it.
Admittedly, x86_32 has an advantage over ARM here: libc without a
sysenter helper is completely functional; it's just slower.
Nonetheless, ISTM it should be possible to start advertising the kuser
helper address to libc, get all the libcs to play along, and then
offer an option of randomizing it for people who know that they don't
have any old libcs on their systems.
--Andy
More information about the linux-arm-kernel
mailing list