This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] ARM: Add pointer guard support.
- From: pinskia at gmail dot com
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Will Newton <will dot newton at linaro dot org>, "libc-ports at sourceware dot org" <libc-ports at sourceware dot org>, "patches at linaro dot org" <patches at linaro dot org>
- Date: Wed, 25 Sep 2013 09:20:17 -0700
- Subject: Re: [PATCH] ARM: Add pointer guard support.
- Authentication-results: sourceware.org; auth=none
- References: <5242A79D dot 1030709 at linaro dot org> <52430AA4 dot 70703 at redhat dot com>
> On Sep 25, 2013, at 9:09 AM, "Carlos O'Donell" <carlos@redhat.com> wrote:
>
>> On 09/25/2013 05:06 AM, Will Newton wrote:
>>
>> Add support for pointer mangling in glibc internal structures in C
>> and assembler code.
>>
>> Tested on armv7 with hard and soft thread pointers.
>
> Have you measured the performance versus using the existing
> global variable?
>
> TLS access on ARM is quite slow and it looks to me like it
> may be faster to use the global variable. Keep in mind that
> the pointer guard and stack guard do not vary by thread.
>
> 32-bit ARM is currently using a global variable e.g.
> __pointer_chk_guard, all you need to do to make it work
> is adjust the definitions of PTR_MANGLE and PTR_DEMANGLE
> to reference the global symbol.
>
> This is the second proposal for ARM (first was [1] for
> AArch64) to support storing the a guard in the TCB, but
> nobody has responded yet to my question about performance.
T
I wonder the same question. Why move to using to tcb in the first place. The only answer I can figure out is that is what x86 does but that is not always the correct answer.
>
> Cheers,
> Carlos.
>
> [1] https://sourceware.org/ml/libc-ports/2013-08/msg00052.html
>