From patchwork Mon Nov 16 04:04:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 56565 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1100393lbb; Sun, 15 Nov 2015 20:13:19 -0800 (PST) X-Received: by 10.66.216.38 with SMTP id on6mr51679185pac.53.1447646746883; Sun, 15 Nov 2015 20:05:46 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kh9si37024663pab.241.2015.11.15.20.05.46; Sun, 15 Nov 2015 20:05:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752869AbbKPEFp (ORCPT + 2 others); Sun, 15 Nov 2015 23:05:45 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:16411 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752871AbbKPEFP (ORCPT ); Sun, 15 Nov 2015 23:05:15 -0500 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id tAG45A7O026908 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 16 Nov 2015 04:05:10 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tAG45ATr018245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 16 Nov 2015 04:05:10 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tAG459sa006334; Mon, 16 Nov 2015 04:05:09 GMT Received: from lappy.us.oracle.com (/10.154.129.227) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 15 Nov 2015 20:05:09 -0800 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: Will Deacon , Sasha Levin Subject: [added to the 3.18 stable tree] Revert "ARM64: unwind: Fix PC calculation" Date: Sun, 15 Nov 2015 23:04:07 -0500 Message-Id: <1447646665-7350-41-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1447646665-7350-1-git-send-email-sasha.levin@oracle.com> References: <1447646665-7350-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Will Deacon This patch has been added to the 3.18 stable tree. If you have any objections, please let us know. -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html =============== [ Upstream commit 9702970c7bd3e2d6fecb642a190269131d4ac16c ] This reverts commit e306dfd06fcb44d21c80acb8e5a88d55f3d1cf63. With this patch applied, we were the only architecture making this sort of adjustment to the PC calculation in the unwinder. This causes problems for ftrace, where the PC values are matched against the contents of the stack frames in the callchain and fail to match any records after the address adjustment. Whilst there has been some effort to change ftrace to workaround this, those patches are not yet ready for mainline and, since we're the odd architecture in this regard, let's just step in line with other architectures (like arch/arm/) for now. Cc: Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/stacktrace.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 407991b..ccb6078 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -48,11 +48,7 @@ int notrace unwind_frame(struct stackframe *frame) frame->sp = fp + 0x10; frame->fp = *(unsigned long *)(fp); - /* - * -4 here because we care about the PC at time of bl, - * not where the return will go. - */ - frame->pc = *(unsigned long *)(fp + 8) - 4; + frame->pc = *(unsigned long *)(fp + 8); return 0; }