Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2463422imj; Mon, 18 Feb 2019 06:28:48 -0800 (PST) X-Google-Smtp-Source: AHgI3IYhiIJ5z9lJkppDyI6pmK3DPZYKXwogtjwY1OMy5S9vA6Rz3f4E2u3MI07AC/p1JCu6IrL2 X-Received: by 2002:a63:ce:: with SMTP id 197mr18891517pga.212.1550500127903; Mon, 18 Feb 2019 06:28:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550500127; cv=none; d=google.com; s=arc-20160816; b=spg401Xh1ghKIXRzjonFm8OHDwTCMbhKLBRTeq9/xQI0fQqKysE6i56n4jNJ/NLv+k MialnC4P7222h3kKYfRwe15o+FqWVMIQH+Vv7kt2gQGLbxyBVNL91KnmS3QPyKVhEaG0 3RVOfv2VTwIK3mVGha0Axee5Czveb5A4Nssq6eODUVNACZbRdFPQ5xgGCLjrACy9nwjb WDlgTpgyW9DPR4Uk0vrVl8v5rIC4w4lkbLGQ1+Tv7fozbYCxxXExf53IWwXNm+6G8718 SchMRL9YVu5KdbV2D9i0m1NcAWKE/Ps8ICMSJsSO6bzHhq4wsZ9pPUJBagHDWmmitSKA 7lvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0PXWNX5aOg5Vm3eplhfcYKRBatHqOs2H6RvbDVLDnSY=; b=vY8wo8bO/NVuWH4va3RWPddRvdzg8t+962H9O4FRkfjRMeq4yf8e8kJxXwkeZpSlnD 9mC5AvcTl44PzQozs86aL0w1bzBZfuWmzY16N56/0w1qlhfNGyPIeGPhgFIDW/nRSCzM GC/+0czXLj5PqdVRotaojjyrUnq7/kjnEUZIiL+MvpQxYYZhDrIWJLadl+/JxXGO4vGQ 9sLsGwFRNWeDo710ihrrFaHRpkWz+VMSUfsg56Sr5/tQYRBPJDW0IEbWULgrk2O8q8Mt X3ljIB9UhbMbvDxIkI9DuuUM6j8+fDGmumDzkQbSw2AUchL4xejJqQtgrWOsO7P25qPK wqsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gFZ9/oO/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si12859746pgf.112.2019.02.18.06.28.31; Mon, 18 Feb 2019 06:28:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gFZ9/oO/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389389AbfBROC3 (ORCPT + 99 others); Mon, 18 Feb 2019 09:02:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:44202 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388497AbfBROC1 (ORCPT ); Mon, 18 Feb 2019 09:02:27 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 98B032070D; Mon, 18 Feb 2019 14:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550498547; bh=/It0IvLy86arOifdEZVxL9muEdcav5gi9NK4G9FR2eQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gFZ9/oO/x5rYrWvxU6RhSz1j/ISQ9oBn5DUmo+KK5APIJ0DrA5a7T+Nkh6E64bK7U yKE/X3CIPU74jecTQcaH9Ps3SplZ7dW5ypdD3rWSo2qFxQFy/p15P4JDH3C03kdnK3 MgSQzSUsdn7psbF90ZaIQXK2ikhLmm/9b3diYioU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , AKASHI Takahiro , Ard Biesheuvel , Catalin Marinas , Torsten Duwe , Will Deacon , Sasha Levin Subject: [PATCH 4.4 021/143] arm64: ftrace: dont adjust the LR value Date: Mon, 18 Feb 2019 14:42:29 +0100 Message-Id: <20190218133529.930355438@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190218133529.099444112@linuxfoundation.org> References: <20190218133529.099444112@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 6e803e2e6e367db9a0d6ecae1bd24bb5752011bd ] The core ftrace code requires that when it is handed the PC of an instrumented function, this PC is the address of the instrumented instruction. This is necessary so that the core ftrace code can identify the specific instrumentation site. Since the instrumented function will be a BL, the address of the instrumented function is LR - 4 at entry to the ftrace code. This fixup is applied in the mcount_get_pc and mcount_get_pc0 helpers, which acquire the PC of the instrumented function. The mcount_get_lr helper is used to acquire the LR of the instrumented function, whose value does not require this adjustment, and cannot be adjusted to anything meaningful. No adjustment of this value is made on other architectures, including arm. However, arm64 adjusts this value by 4. This patch brings arm64 in line with other architectures and removes the adjustment of the LR value. Signed-off-by: Mark Rutland Cc: AKASHI Takahiro Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Torsten Duwe Cc: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/entry-ftrace.S | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S index 0f03a8fe2314..d18d15810d19 100644 --- a/arch/arm64/kernel/entry-ftrace.S +++ b/arch/arm64/kernel/entry-ftrace.S @@ -78,7 +78,6 @@ .macro mcount_get_lr reg ldr \reg, [x29] ldr \reg, [\reg, #8] - mcount_adjust_addr \reg, \reg .endm .macro mcount_get_lr_addr reg -- 2.19.1