From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753072AbdFVJH7 (ORCPT ); Thu, 22 Jun 2017 05:07:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:33572 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753049AbdFVJH6 (ORCPT ); Thu, 22 Jun 2017 05:07:58 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 175D922B60 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Thu, 22 Jun 2017 18:07:38 +0900 From: Masami Hiramatsu To: "Naveen N. Rao" Cc: Steven Rostedt , Ananth N Mavinakayanahalli , Masami Hiramatsu , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 2/2] selftests/ftrace: Update multiple kprobes test for powerpc Message-Id: <20170622180738.e97092d4fa6458b9199a03d7@kernel.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.0 (GTK+ 2.24.31; x86_64-redhat-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 Thu, 22 Jun 2017 00:20:28 +0530 "Naveen N. Rao" wrote: > KPROBES_ON_FTRACE is only available on powerpc64le. Update comment to > clarify this. > > Also, we should use an offset of 8 to ensure that the probe does not > fall on ftrace location. The current offset of 4 will fall before the > function local entry point and won't fire, while an offset of 12 or 16 > will fall on ftrace location. Offset 8 is currently guaranteed to not be > the ftrace location. OK, these part seems good to me. > > Finally, do not filter out symbols with a dot. Powerpc Elfv1 uses dot > prefix for all functions and this prevents us from testing some of those > symbols. Furthermore, with the patch to derive event names properly in > the presence of ':' and '.', such names are accepted by kprobe_events > and constitutes a good test for those symbols. Hmm, the reason why I added such filter was to avoid symbols including gcc-generated suffixes like as .constprop or .isra etc. So if the Powerpc Elfv1 use dot prefix, that is OK, in that case, could you update the filter as "^.*\\..*" ? Thank you, > > Signed-off-by: Naveen N. Rao > --- > tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc > index f4d1ff785d67..d209c071b2c0 100644 > --- a/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/multiple_kprobes.tc > @@ -2,16 +2,16 @@ > # description: Register/unregister many kprobe events > > # ftrace fentry skip size depends on the machine architecture. > -# Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc > +# Currently HAVE_KPROBES_ON_FTRACE defined on x86 and powerpc64le > case `uname -m` in > x86_64|i[3456]86) OFFS=5;; > - ppc*) OFFS=4;; > + ppc64le) OFFS=8;; > *) OFFS=0;; > esac > > echo "Setup up to 256 kprobes" > -grep t /proc/kallsyms | cut -f3 -d" " | grep -v .*\\..* | \ > -head -n 256 | while read i; do echo p ${i}+${OFFS} ; done > kprobe_events ||: > +grep t /proc/kallsyms | cut -f3 -d" " | head -n 256 | \ > +while read i; do echo p ${i}+${OFFS} ; done > kprobe_events ||: > > echo 1 > events/kprobes/enable > echo 0 > events/kprobes/enable > -- > 2.13.1 > -- Masami Hiramatsu