From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79304 invoked by alias); 5 Feb 2020 21:14:53 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 79288 invoked by uid 89); 5 Feb 2020 21:14:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=login, 7318, 7313, H*Ad:U*danglin X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: hall.aurel32.net Received: from hall.aurel32.net (HELO hall.aurel32.net) (195.154.113.88) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Feb 2020 21:14:50 +0000 Received: from [2a01:e35:2fdd:a4e1:fe91:fc89:bc43:b814] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1izS0W-0002cZ-3H; Wed, 05 Feb 2020 22:14:48 +0100 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.92.3) (envelope-from ) id 1izS0V-006Z2c-Nx; Wed, 05 Feb 2020 22:14:47 +0100 From: Aurelien Jarno To: libc-stable@sourceware.org Cc: John David Anglin Subject: [2.30 COMMITTED] hppa: Align __clone stack argument to 8 bytes (Bug 25066) Date: Wed, 01 Jan 2020 00:00:00 -0000 Message-Id: <20200205211442.1564605-1-aurelien@aurel32.net> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00000.txt.bz2 From: John David Anglin The hppa architecture requires strict alignment for loads and stores. As a result, the minimum stack alignment that will work is 8 bytes. This patch adjusts __clone() to align the stack argument passed to it. It also adjusts slightly some formatting. This fixes the nptl/tst-tls1 test. (cherry picked from commit e4c23a029a54c8c7788eff9ca771a01cccaaa0ce) --- NEWS | 1 + sysdeps/unix/sysv/linux/hppa/clone.S | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 2c707f35ff0..15df670edc5 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,7 @@ The following bugs are resolved with this release: unconditionally [24899] login: Add nonstring attributes to struct utmp, struct utmpx [24902] login: pututxline could fail to overwrite existing entries + [25066] FAIL: nptl/tst-tls1 on hppa [25189] Don't use a custom wrapper macro around __has_include [25203] libio: Disable vtable validation for pre-2.1 interposed handles [25204] Ignore LD_PREFER_MAP_32BIT_EXEC for SUID programs diff --git a/sysdeps/unix/sysv/linux/hppa/clone.S b/sysdeps/unix/sysv/linux/hppa/clone.S index 79fa4f6147c..1c0325e199b 100644 --- a/sysdeps/unix/sysv/linux/hppa/clone.S +++ b/sysdeps/unix/sysv/linux/hppa/clone.S @@ -73,13 +73,18 @@ ENTRY(__clone) #endif /* Sanity check arguments. */ - comib,=,n 0, %arg0, .LerrorSanity /* no NULL function pointers */ - comib,=,n 0, %arg1, .LerrorSanity /* no NULL stack pointers */ + comib,=,n 0,%arg0,.LerrorSanity /* no NULL function pointers */ + comib,=,n 0,%arg1,.LerrorSanity /* no NULL stack pointers */ + + /* Ensure stack argument is 8-byte aligned. */ + ldo 7(%r25),%r25 + depi 0,31,3,%r25 /* Save the function pointer, arg, and flags on the new stack. */ stwm %r26, 64(%r25) stw %r23, -60(%r25) stw %r24, -56(%r25) + /* Clone arguments are (int flags, void * child_stack) */ copy %r24, %r26 /* flags are first */ /* User stack pointer is in the correct register already */ -- 2.24.1