Message ID | 1400511234-15112-1-git-send-email-will.newton@linaro.org |
---|---|
State | Committed |
Headers |
Return-Path: <x14307373@homiemail-mx20.g.dreamhost.com> X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 3CA88360076 for <siddhesh@wilcox.dreamhost.com>; Mon, 19 May 2014 07:54:26 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id E7C25419D15B2; Mon, 19 May 2014 07:54:25 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.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-mx20.g.dreamhost.com (Postfix) with ESMTPS id BF522419D15B1 for <glibc@patchwork.siddhesh.in>; Mon, 19 May 2014 07:54:25 -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:from:to:subject:date:message-id; q=dns; s= default; b=hjrRBiHCGiF2S+j2ouMA5fORxuMyCwoUbz/g0kFA3qCZEarW6C2g1 4cBI9Srp/75egxvoD/s8bztSP2CAqPAXDzxZ3Hez5Lnw8h/2lWWqJ7A9dw7Ve8K5 PhkM32x6gapZPSkY0k+npxwJ3TjCIofyjdRCMs0TVlo0yEaASSgFSY= 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:from:to:subject:date:message-id; s=default; bh=SVh2+XfPaTfSPgUqtTpFKsnevi4=; b=Ld7Nw2Hv6TKYz8k2LsLehYKvBbCD gxkoXxvGF8xYHmeVTtJ41PjyiiX6lxXRcMizsaNEc/3vuDjYEhNz47ulrK1JhzE6 UnRlT62YumD1TqJoLi+14A0YXQ1RvbFL0NRN2q67hdqqcKJQRux6Evhxfzcr5F5A 18x4Q20U3zjTA5k= Received: (qmail 6233 invoked by alias); 19 May 2014 14:54:04 -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 6073 invoked by uid 89); 19 May 2014 14:54:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f47.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=nr47/SNymh7EUYkPm9T6e6hvSsLea7L+zMIT6TM+BC8=; b=ezvFmhKiEm+M84lbb+aScFQ3TcYgARVQhfhA2bH5XheRmia6Sg5z2PMJzWNJeZSztJ 7pkMH9/R9ZLbeFh7B8szCQHxa/SYOs4LvU1WkJ3/vOicXrbF/DbpHUDjANDe680XiOZN 7wPKPXa9jFcL6gtaQawm9xwOv2uLGQRrk4JSnZjeIIT+Dv0AgqqPS1sic+0hxm8zbNEk Gt/a1cHRPGyKC0xfkOcCSlwdU9k7k3u6kHjY/Onx09moW5qoBnK4ZamJsN04o37Anaof ANWBs4EVfBZ10amioaV6ZYEFCF/XvTFGZo8Q5PJyMFY7e1VAWOV0D7bV6tH/97Wx2wDt Hxlg== X-Gm-Message-State: ALoCoQmU82M+jxQQkfMnRqfJXijoeGdUNT3e9Jmc+VrYxlTbtU/lpt43WYT+IcMzBE43b9Ble295 X-Received: by 10.194.188.68 with SMTP id fy4mr30138710wjc.30.1400511238697; Mon, 19 May 2014 07:53:58 -0700 (PDT) From: Will Newton <will.newton@linaro.org> To: libc-alpha@sourceware.org Subject: [PATCH] AArch64: Fix handling of nocancel syscall failures Date: Mon, 19 May 2014 15:53:54 +0100 Message-Id: <1400511234-15112-1-git-send-email-will.newton@linaro.org> X-DH-Original-To: glibc@patchwork.siddhesh.in |
Commit Message
Will Newton
May 19, 2014, 2:53 p.m. UTC
The current code for nocancel syscalls does not do a comparison of the system call return value. This leads to code being generated where the b.cs follows the svc instruction directly without setting the flags on which the branch depends. ChangeLog: 2014-05-19 Will Newton <will.newton@linaro.org> * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO): Test the return value of the system call in the nocancel case. --- sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 1 + 1 file changed, 1 insertion(+) Note that I suspect the reason I saw this issue was due to some change in the way sysdep-cancel.h is getting included which may or may not be correct.
Comments
On 19 May 2014 15:53, Will Newton <will.newton@linaro.org> wrote: > 2014-05-19 Will Newton <will.newton@linaro.org> > > * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO): > Test the return value of the system call in the nocancel case. Looks like an obvious fix. OK /Marcus
On Mon, May 19, 2014 at 03:53:54PM +0100, Will Newton wrote: > 2014-05-19 Will Newton <will.newton@linaro.org> > > * sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h (PSEUDO): > Test the return value of the system call in the nocancel case. > --- > sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h | 1 + > 1 file changed, 1 insertion(+) > > Note that I suspect the reason I saw this issue was due to some change in > the way sysdep-cancel.h is getting included which may or may not be > correct. > I hit the same thing this week in Fedora... I ended up bisecting the change to commit 2fbdf5339aaeaa423bd661524f7ec7af41fa2606 Author: Roland McGrath <roland@hack.frob.com> Date: Wed May 14 11:06:36 2014 -0700 Consolidate not-cancel.h files. which makes some sense, since it looks like we may have previously not been using the correct calls until this patch, and hence why prior to this, without your fix, we weren't seeing obvious failures in the test-suite. regards, Kyle
diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h index f6903b5..0e9bef3 100644 --- a/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h +++ b/sysdeps/unix/sysv/linux/aarch64/nptl/sysdep-cancel.h @@ -32,6 +32,7 @@ __##syscall_name##_nocancel: \ cfi_startproc; \ DO_CALL (syscall_name, args); \ + cmn x0, 4095; \ PSEUDO_RET; \ cfi_endproc; \ .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \