From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:52632 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbdJBLL2 (ORCPT ); Mon, 2 Oct 2017 07:11:28 -0400 Date: Mon, 2 Oct 2017 13:11:36 +0200 From: Greg KH To: "Naveen N. Rao" Cc: stable@vger.kernel.org, Michael Ellerman Subject: Re: [PATCH 4.9] powerpc/ftrace: Pass the correct stack pointer for DYNAMIC_FTRACE_WITH_REGS Message-ID: <20171002111136.GA30402@kroah.com> References: <20170928134027.27369-1-naveen.n.rao@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170928134027.27369-1-naveen.n.rao@linux.vnet.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: On Thu, Sep 28, 2017 at 07:10:27PM +0530, Naveen N. Rao wrote: > For DYNAMIC_FTRACE_WITH_REGS, we should be passing-in the original set > of registers in pt_regs, to capture the state _before_ ftrace_caller. > However, we are instead passing the stack pointer *after* allocating a > stack frame in ftrace_caller. Fix this by saving the proper value of r1 > in pt_regs. Also, use SAVE_10GPRS() to simplify the code. > > Fixes: 153086644fd1 ("powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI") > Cc: stable@vger.kernel.org # v4.6+ > Signed-off-by: Naveen N. Rao > Signed-off-by: Michael Ellerman > --- > Hi Greg, > Here is the backported patch for upstream commit a4979a7e71eb8d > ("powerpc/ftrace: Pass the correct stack pointer for > DYNAMIC_FTRACE_WITH_REGS") for stable kernel v4.9. This has been tested > by Michael Ellerman. Kindly apply. Thanks for the backport, now applied. greg k-h