From patchwork Thu Jun 26 23:56:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1779 Received: (qmail 14370 invoked by alias); 26 Jun 2014 23:57:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 14360 invoked by uid 89); 26 Jun 2014 23:57:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_20 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Date: Thu, 26 Jun 2014 23:56:56 +0000 From: "Joseph S. Myers" To: Subject: Fix MIPS64 *_nocancel gp setup Message-ID: MIME-Version: 1.0 The 64-bit MIPS ABIs involve the caller setting up t9 ($25) to the address of the called function, and the called function then using this in a .cpsetup directive to compute gp. The .cpsetup directive needs to name the function to which t9 points for this purpose. In the definition of *_nocancel functions, the directive pointed to the normal entry point rather than the _nocancel one, resulting in segfaults when the _nocancel functions were used. This patch corrects the function name used in the directive. (It seems the bug was latent until Roland's not-cancel.h unification, with the _nocancel entry points not previously being used - so not user-visible in a release, so no Bugzilla entry required.) Tested mips64 sufficiently to confirm the previously seen segfaults are fixed, and committed. Now I can get back to testing the vfork patch.... 2014-06-26 Joseph Myers * sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h [__PIC__] (PSEUDO): Use name of _nocancel entry point in corresponding .cpsetup call. diff --git a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h index d9e7236..341b9a0 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h @@ -47,7 +47,7 @@ .globl __##syscall_name##_nocancel; \ __##syscall_name##_nocancel: \ SAVESTK; \ - .cpsetup t9, STKOFF_GP, name; \ + .cpsetup t9, STKOFF_GP, __##syscall_name##_nocancel; \ cfi_rel_offset (gp, STKOFF_GP); \ li v0, SYS_ify(syscall_name); \ syscall; \