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: 350281 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 88650140083 for ; Tue, 20 May 2014 00:54:30 +1000 (EST) 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=vFWjfXnesmyFnLs9e/t7ubVCi3q2yrBZPl/9Ba2XnrZgU2j31D707 M8vXkYO/F88bt3QoUeHBGIqAM/lV2nrycrh8BpiXfVdCeZv1+hYwuN9yD9mOkgiO Lw1bQeYIVJgq2XjYp5r3O3ad1LhLQfND3aRhqFYjpQN2AkdLVytHuQ= 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=BsdX9GWRJoD+S++2pFT3dnqIyiWJ U9HOLu6ccgUGj7aJGw8Zu2BoVEHsTFbCTei1UL9BIGRbugpj0Wrgag2gVd6vrLou 8SKRTv/Or8IQ5hozZGw4q+EkWl6ulvRWM+th7db9oENABMxxlean3YSO5zUBCcw4 9mzhxuHEGQQQIJ4= 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: 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 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 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> 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; \