From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21136 invoked by alias); 25 Sep 2013 16:09:13 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 21126 invoked by uid 89); 25 Sep 2013 16:09:12 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Sep 2013 16:09:12 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8PG99Mi001255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 25 Sep 2013 12:09:09 -0400 Received: from [10.3.113.66] (ovpn-113-66.phx2.redhat.com [10.3.113.66]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r8PG99rh026962; Wed, 25 Sep 2013 12:09:09 -0400 Message-ID: <52430AA4.70703@redhat.com> Date: Wed, 25 Sep 2013 16:09:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: Will Newton CC: libc-ports@sourceware.org, patches@linaro.org Subject: Re: [PATCH] ARM: Add pointer guard support. References: <5242A79D.1030709@linaro.org> In-Reply-To: <5242A79D.1030709@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00132.txt.bz2 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. Cheers, Carlos. [1] https://sourceware.org/ml/libc-ports/2013-08/msg00052.html