Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965426AbbHKRD1 (ORCPT ); Tue, 11 Aug 2015 13:03:27 -0400 Received: from foss.arm.com ([217.140.101.70]:54397 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965202AbbHKRDZ (ORCPT ); Tue, 11 Aug 2015 13:03:25 -0400 Date: Tue, 11 Aug 2015 18:03:22 +0100 From: Will Deacon To: AKASHI Takahiro Cc: Catalin Marinas , "rostedt@goodmis.org" , "jungseoklee85@gmail.com" , "olof@lixom.net" , "broonie@kernel.org" , "david.griego@linaro.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [RFC v2 1/4] ftrace: allow arch-specific check_stack() Message-ID: <20150811170321.GB29880@arm.com> References: <1438674249-3447-1-git-send-email-takahiro.akashi@linaro.org> <1438674249-3447-2-git-send-email-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438674249-3447-2-git-send-email-takahiro.akashi@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1280 Lines: 26 On Tue, Aug 04, 2015 at 08:44:06AM +0100, AKASHI Takahiro wrote: > A stack frame pointer may be used in a different way depending on > cpu architecture. Thus it is not always appropriate to slurp the stack > contents, as currently done in check_stack(), in order to calcurate > a stack index (height) at a given function call. At least not on arm64. > > This patch extract potentially arch-specific code from check_stack() > and puts it into a new arch_check_stack(), which is declared as weak. > So we will be able to add arch-specific and most efficient way of > stack traversing Later. > > Signed-off-by: AKASHI Takahiro If arm64 is the only architecture behaving differently, then I'm happy to reconsider the fix to unwind_frame that we merged in e306dfd06fcb ("ARM64: unwind: Fix PC calculation"). I'd have thought any architecture with a branch-and-link instruction would potentially have the same issue, so we could just be fixing things in the wrong place if ftrace works everywhere else. Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/