From patchwork Tue Dec 18 21:04:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 1015621 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jPia4Zo/"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="WEJOkY70"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43K9Xk5tQwz9sBQ for ; Wed, 19 Dec 2018 08:05:42 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3tBpzj3L9POfEg1qTQeigpYd7VFjVQBgYCoGfu3NcDo=; b=jPia4Zo/VPWZWl yAatehrWxZZ+Old3LV8bOQ6CgeYWSCb2w9iVPSedrNCEBo4uOHJm1IjCkbB6yYL8zWlCKGzTA6SjB 3rP4eAJAG+wOuEZ0ppDC/uAnz+AqYZIZsw1yp/U0klUieq0pKV/pOi1I+Lcw5wWRy5X0Jl2Chr47S ++f8r2St0oR37btXvtWBepihv+4pahonsLVRQm8kz9cYrlWreR4Mmp4tzWDEh3pFcgSHYJu4ycqYJ Uur8maKJSh00BZArYkPPjylSMtpsKIvi7W1APdI+Gf7wziIXfGMiFHLBUl0JtzkwfxyN6gLPK3Rvx 3jtqvp6UslBARCTQND1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZMYe-0001lN-8S; Tue, 18 Dec 2018 21:05:40 +0000 Received: from smtprelay4.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZMYb-0001eZ-8q for linux-snps-arc@lists.infradead.org; Tue, 18 Dec 2018 21:05:38 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id D364A24E27FF; Tue, 18 Dec 2018 13:05:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1545167127; bh=MIgU++1TSKnW+TO5e+lRBNLlRlZBgZ9WIFnJlKEFFBQ=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=WEJOkY70P1D2e/qTGGbqZMRrk8J8p8R9O+TQyNOd+nhmFEnWA47vwuxahX+1fJCz2 IqIfWV6A0wGogeeSYF0KSfw6sFU/6vgC7SWBeFYIR63PCKUkHBm6WDCIz+Y9so3Gv4 I/zWMVF2fJhV2J383YrRuTOW1Un8MrR9JdUqvXeuix2bCBE0t2tFcDAw7IEhQfg/Nt 644MnJyytGqu6UP1zVQRlFw2qWnTHEou2YZhV/QCXd4h3lJzSqmTFwWGOIPNl0srcV BZDc7I5AkgP2YyOMftPOWZWNGeIpS/bsJBGkwaRHZNdMVS4If5fIoaRc8uR8W2tq9X 1p+0WD1yCLoqw== Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id B4D613233; Tue, 18 Dec 2018 13:05:27 -0800 (PST) Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 18 Dec 2018 13:05:27 -0800 Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.105) by IN01WEHTCA.internal.synopsys.com (10.144.199.103) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 19 Dec 2018 02:35:25 +0530 Received: from vineetg-Latitude-E7450.internal.synopsys.com (10.10.161.70) by IN01WEHTCB.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 19 Dec 2018 02:35:25 +0530 From: Vineet Gupta To: Subject: [PATCH 17/21] ARC: testsuite fix: stdlib/tst-makecontext Date: Tue, 18 Dec 2018 13:04:39 -0800 Message-ID: <1545167083-16764-18-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545167083-16764-1-git-send-email-vgupta@synopsys.com> References: <1545167083-16764-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 X-Originating-IP: [10.10.161.70] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181218_130537_362694_EBAE37EE X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vineet Gupta , linux-snps-arc@lists.infradead.org Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Terminate the unwinding by telling unwinder to fetch return address (BLINK) from r15 which has been set apriori to 0. Signed-off-by: Vineet Gupta --- ChangeLog | 2 ++ sysdeps/unix/sysv/linux/arc/makecontext.c | 1 + sysdeps/unix/sysv/linux/arc/setcontext.S | 2 ++ 3 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index d3a979a9236b..39ff298b0091 100644 --- a/ChangeLog +++ b/ChangeLog @@ -110,6 +110,8 @@ * sysdeps/arc/entry.h: Add ENTRY_POINT define check. * sysdeps/arc/crti.S: add .hidden annotations. * sysdeps/unix/sysv/linux/arc/ipc_priv.h: New file. + * sysdeps/unix/sysv/linux/arc/makecontext.c: clear r15. + * sysdeps/unix/sysv/linux/arc/setcontext.S: set blink from r15. 2018-12-17 Joseph Myers diff --git a/sysdeps/unix/sysv/linux/arc/makecontext.c b/sysdeps/unix/sysv/linux/arc/makecontext.c index 7018bed9d64a..8d233f83da7e 100644 --- a/sysdeps/unix/sysv/linux/arc/makecontext.c +++ b/sysdeps/unix/sysv/linux/arc/makecontext.c @@ -45,6 +45,7 @@ __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...) */ ucp->uc_mcontext.callee.r13 = (unsigned long) func; ucp->uc_mcontext.callee.r14 = (unsigned long) ucp->uc_link; + ucp->uc_mcontext.callee.r15 = 0; r = &ucp->uc_mcontext.scratch.r0; diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S index 3f503c661d95..6ec2ec0ddc79 100644 --- a/sysdeps/unix/sysv/linux/arc/setcontext.S +++ b/sysdeps/unix/sysv/linux/arc/setcontext.S @@ -79,6 +79,8 @@ weak_alias(__setcontext, setcontext) ENTRY(__startcontext) + cfi_register (blink, r15) + /* call user @func, loaded in r13 by setcontext() */ jl [r13]