Message ID | 20140512174746.GE21081@redacted.bos.redhat.com |
---|---|
State | Committed |
Headers |
Return-Path: <x14307373@homiemail-mx23.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id C13EC36007A for <siddhesh@wilcox.dreamhost.com>; Mon, 12 May 2014 10:47:53 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14307373) id 6BEA063BB0D24; Mon, 12 May 2014 10:47:53 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 49AAF63BB0D05 for <glibc@patchwork.siddhesh.in>; Mon, 12 May 2014 10:47:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=yrLev8bgINTKm0S6jaSjVuIMuoCfI LCyit7HMS75BPqaWoesPSC0WLCG4lhjBKvCDwnRWqXcx6Ucwp962EyIMQv+q8Xh0 LQH5SisTqvZwZcuOQjzB2PNq5k9/cf+Ic6lXrCF8hjRf0WU5d2p3T8LsURPECnre rrdSKr2wHbJhww= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=5ejIj3+17knDsO43tVsn1fvktVo=; b=U69 IIOzaXljey8xW4r1eqd5OkRmgEjk0oe+z98GBvpK5Uzv1blFaLMe9UxFwyTam2ed rK4w1gkgnLqPpWmSHcmIf/wVH6tRqY3KD7rn+6j2Vs7GBDITykg6eSnzhqUvCt8p bHZkiLZ9UFK1U3OMlWE6KQty7zifrzKcxZCmn0I4= Received: (qmail 22598 invoked by alias); 12 May 2014 17:47:51 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-glibc=patchwork.siddhesh.in@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 22588 invoked by uid 89); 12 May 2014 17:47:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Mon, 12 May 2014 13:47:46 -0400 From: Kyle McMartin <kmcmarti@redhat.com> To: libc-alpha@sourceware.org Subject: [PATCH][AARCH64] correct alignment of TLS_TCB_ALIGN Message-ID: <20140512174746.GE21081@redacted.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-DH-Original-To: glibc@patchwork.siddhesh.in |
Commit Message
Kyle McMartin
May 12, 2014, 5:47 p.m. UTC
This fixes a variety of testsuite failures for me: tststatic.out Error 1 tststatic2.out Error 1 tst-tls9-static.out Error 1 tst-audit8.out Error 127 tst-audit9.out Error 127 tst-audit1.out Error 127 and also has the added benefit of making LD_AUDIT/sotruss work on AArch64. Otherwise, we bail out early in _dl_try_allocate_static_tls as the alignment requirement of the PT_TLS section in libc is 16. 2014-05-12 Kyle McMartin <kyle@redhat.com> * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the alignment of struct pthread.
Comments
On Mon, May 12, 2014 at 10:47 AM, Kyle McMartin <kmcmarti@redhat.com> wrote: > This fixes a variety of testsuite failures for me: > tststatic.out Error 1 > tststatic2.out Error 1 > tst-tls9-static.out Error 1 > tst-audit8.out Error 127 > tst-audit9.out Error 127 > tst-audit1.out Error 127 > and also has the added benefit of making LD_AUDIT/sotruss work on > AArch64. > > Otherwise, we bail out early in _dl_try_allocate_static_tls as the > alignment requirement of the PT_TLS section in libc is 16. This is already https://sourceware.org/bugzilla/show_bug.cgi?id=16796 . It is also the same patch which I had came up when I was working on ILP32 changes. Thanks, Andrew > > 2014-05-12 Kyle McMartin <kyle@redhat.com> > > * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the alignment > of struct pthread. > > --- a/sysdeps/aarch64/nptl/tls.h > +++ b/sysdeps/aarch64/nptl/tls.h > @@ -63,7 +63,7 @@ typedef struct > # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) > > /* Alignment requirements for the initial TCB. */ > -# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) > +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) > > /* This is the size of the TCB. */ > # define TLS_TCB_SIZE sizeof (tcbhead_t) > @@ -72,7 +72,7 @@ typedef struct > # define TLS_PRE_TCB_SIZE sizeof (struct pthread) > > /* Alignment requirements for the TCB. */ > -# define TLS_TCB_ALIGN __alignof__ (tcbhead_t) > +# define TLS_TCB_ALIGN __alignof__ (struct pthread) > > /* Install the dtv pointer. The pointer passed is to the element with > index -1 which contain the length. */
On Mon, May 12, 2014 at 11:27:03AM -0700, Andrew Pinski wrote: > On Mon, May 12, 2014 at 10:47 AM, Kyle McMartin <kmcmarti@redhat.com> wrote: > > This fixes a variety of testsuite failures for me: > > tststatic.out Error 1 > > tststatic2.out Error 1 > > tst-tls9-static.out Error 1 > > tst-audit8.out Error 127 > > tst-audit9.out Error 127 > > tst-audit1.out Error 127 > > and also has the added benefit of making LD_AUDIT/sotruss work on > > AArch64. > > > > Otherwise, we bail out early in _dl_try_allocate_static_tls as the > > alignment requirement of the PT_TLS section in libc is 16. > > > This is already https://sourceware.org/bugzilla/show_bug.cgi?id=16796 . > > It is also the same patch which I had came up when I was working on > ILP32 changes. > Sigh. That'd have been nice to have been submitted a month ago. What gives? --Kyle
On 12 May 2014 18:47, Kyle McMartin <kmcmarti@redhat.com> wrote: > 2014-05-12 Kyle McMartin <kyle@redhat.com> > > * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the alignment > of struct pthread. Thanks Kyle, this looks fine, go ahead and commit it, can you back port it? /Marcus
On Mon, May 19, 2014 at 12:23:18PM +0100, Marcus Shawcroft wrote: > On 12 May 2014 18:47, Kyle McMartin <kmcmarti@redhat.com> wrote: > > > 2014-05-12 Kyle McMartin <kyle@redhat.com> > > > > * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the alignment > > of struct pthread. > > > Thanks Kyle, this looks fine, go ahead and commit it, can you back port it? I have pushed this for Kyle. Siddhesh
On Mon, May 26, 2014 at 01:03:03PM +0530, Siddhesh Poyarekar wrote: > On Mon, May 19, 2014 at 12:23:18PM +0100, Marcus Shawcroft wrote: > > On 12 May 2014 18:47, Kyle McMartin <kmcmarti@redhat.com> wrote: > > > > > 2014-05-12 Kyle McMartin <kyle@redhat.com> > > > > > > * sysdeps/aarch64/nptl/tls.h: increase TCB alignment to the alignment > > > of struct pthread. > > > > > > Thanks Kyle, this looks fine, go ahead and commit it, can you back port it? > > I have pushed this for Kyle. > Ah, foo, I was hoping Andrew Pinski would commit it himself, since he ended up coming up with the fix first on BZ. :/ Sorry Andrew. regards, Kyle
--- a/sysdeps/aarch64/nptl/tls.h +++ b/sysdeps/aarch64/nptl/tls.h @@ -63,7 +63,7 @@ typedef struct # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) /* Alignment requirements for the initial TCB. */ -# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) /* This is the size of the TCB. */ # define TLS_TCB_SIZE sizeof (tcbhead_t) @@ -72,7 +72,7 @@ typedef struct # define TLS_PRE_TCB_SIZE sizeof (struct pthread) /* Alignment requirements for the TCB. */ -# define TLS_TCB_ALIGN __alignof__ (tcbhead_t) +# define TLS_TCB_ALIGN __alignof__ (struct pthread) /* Install the dtv pointer. The pointer passed is to the element with index -1 which contain the length. */