From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752794AbcHLXqf (ORCPT ); Fri, 12 Aug 2016 19:46:35 -0400 Received: from mail.kernel.org ([198.145.29.136]:59274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752160AbcHLXqe (ORCPT ); Fri, 12 Aug 2016 19:46:34 -0400 Date: Sat, 13 Aug 2016 08:46:26 +0900 From: Masami Hiramatsu To: David Long Cc: Ananth N Mavinakayanahalli , Anil S Keshavamurthy , "David S. Miller" , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, catalin.marinas@arm.com, daniel.thompson@linaro.org, marc.zyngier@arm.com, Mark Brown Subject: Re: [PATCH] Documentation: kprobes: Document jprobes stack copying limitations Message-Id: <20160813084626.06b972afea3814959ab64ebc@kernel.org> In-Reply-To: <1471033484-2709-1-git-send-email-dave.long@linaro.org> References: <1471033484-2709-1-git-send-email-dave.long@linaro.org> X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.30; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 Aug 2016 16:24:44 -0400 David Long wrote: > From: "David A. Long" > > Some architectures (i.e.: sparc64 and arm64) make reasonable partial stack > duplication for jprobes problematic. Document this. > > Signed-off-by: David A. Long Looks good to me. Acked-by: Masami Hiramatsu Thanks! > --- > Documentation/kprobes.txt | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt > index 1f9b3e2..1f6d45a 100644 > --- a/Documentation/kprobes.txt > +++ b/Documentation/kprobes.txt > @@ -103,6 +103,16 @@ Note that the probed function's args may be passed on the stack > or in registers. The jprobe will work in either case, so long as the > handler's prototype matches that of the probed function. > > +Note that in some architectures (e.g.: arm64 and sparc64) the stack > +copy is not done, as the actual location of stacked parameters may be > +outside of a reasonable MAX_STACK_SIZE value and because that location > +cannot be determined by the jprobes code. In this case the jprobes > +user must be careful to make certain the calling signature of the > +function does not cause parameters to be passed on the stack (e.g.: > +more than eight function arguments, an argument of more than sixteen > +bytes, or more than 64 bytes of argument data, depending on > +architecture). > + > 1.3 Return Probes > > 1.3.1 How Does a Return Probe Work? > -- > 2.5.0 > -- Masami Hiramatsu