From patchwork Mon May 19 14:53:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 30386 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F1091202FE for ; Mon, 19 May 2014 14:54:36 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf31404678pab.1 for ; Mon, 19 May 2014 07:54:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=nr47/SNymh7EUYkPm9T6e6hvSsLea7L+zMIT6TM+BC8=; b=TGHWp5SpJgY4yI2ytZdg2OEwFmmOuqAtwBtAiIXw9GSxt268i7Qfc1Vsi0CspzGEaA 3v2xMp4dHrZW7pFjfyepQd5V/4v4ppyeybBroka43oOuJvUPBU988jbU6IZck/HWBnFj kmRGuUzXodmsVI5TMqRg1yFa1rHiY5mez0HIh1MyxWFbnvCoUrUT47YPiXowZvwczglG Fa8z5+Lf5qpQqu4cuJwThTxO5P9VbE5y9de+wma/2dkROrzAtJe+v6lHoyz71x5Fx8Cu O6XBN+hPbaq73fXEsQNaxuayDBedgkxAvJcgdS5X/qHn+LtQOhSGvGO/Nr1IwyZPhC3u rmDQ== X-Gm-Message-State: ALoCoQmw8QNeOtGbR2tOpXHKUMP5vfKyCFy4fSfpL+2LgpyK6rIyKGCgruVGkcmBHZeVOv/nu8Ys X-Received: by 10.67.30.197 with SMTP id kg5mr16759384pad.36.1400511276000; Mon, 19 May 2014 07:54:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.48.112 with SMTP id n103ls1846663qga.86.gmail; Mon, 19 May 2014 07:54:35 -0700 (PDT) X-Received: by 10.52.35.173 with SMTP id i13mr666218vdj.66.1400511275825; Mon, 19 May 2014 07:54:35 -0700 (PDT) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [2607:f8b0:400c:c03::22a]) by mx.google.com with ESMTPS id e9si3994578vcf.49.2014.05.19.07.54.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 19 May 2014 07:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22a as permitted sender) client-ip=2607:f8b0:400c:c03::22a; Received: by mail-vc0-f170.google.com with SMTP id lf12so9715258vcb.29 for ; Mon, 19 May 2014 07:54:35 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr15047180vcb.0.1400511275723; Mon, 19 May 2014 07:54:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp241167vcb; Mon, 19 May 2014 07:54:35 -0700 (PDT) X-Received: by 10.68.231.196 with SMTP id ti4mr43639801pbc.48.1400511274983; Mon, 19 May 2014 07:54:34 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id xb6si19941380pab.45.2014.05.19.07.54.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 May 2014 07:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-49991-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 6233 invoked by alias); 19 May 2014 14:54:04 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 6073 invoked by uid 89); 19 May 2014 14:54:03 -0000 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-Received: by 10.194.188.68 with SMTP id fy4mr30138710wjc.30.1400511238697; Mon, 19 May 2014 07:53:58 -0700 (PDT) From: Will Newton 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-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2607:f8b0:400c:c03::22a as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 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 * 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. 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; \