From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbdF1Snq (ORCPT ); Wed, 28 Jun 2017 14:43:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49163 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbdF1Snj (ORCPT ); Wed, 28 Jun 2017 14:43:39 -0400 Date: Thu, 29 Jun 2017 00:13:24 +0530 From: "Naveen N. Rao" To: Masami Hiramatsu Cc: Steven Rostedt , Ananth N Mavinakayanahalli , 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 References: <20170622180738.e97092d4fa6458b9199a03d7@kernel.org> <20170622170325.qznheui7eydkdnmv@naverao1-tp.localdomain> <20170624023021.92f2f90f0e09314ac9bdb87a@kernel.org> <20170624200610.f3aee818b8f6ff2631e0d56a@kernel.org> <20170628092846.uwc55zuq7dsbrzho@naverao1-tp.localdomain> <20170628231650.6fb5d14fb00923d29bd313d7@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170628231650.6fb5d14fb00923d29bd313d7@kernel.org> User-Agent: NeoMutt/20170609 (1.8.3) X-TM-AS-MML: disable x-cbid: 17062818-0044-0000-0000-00000275D1D4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17062818-0045-0000-0000-00000705CD88 Message-Id: <20170628184324.zpfe6f54jbhzxq5g@naverao1-tp.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-28_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706280296 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017/06/28 11:16PM, Masami Hiramatsu wrote: > > > diff --git > > > a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc > > > b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc > > > new file mode 100644 > > > index 0000000..d259031 > > > --- /dev/null > > > +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc > > > @@ -0,0 +1,28 @@ > > > +#!/bin/sh > > > +# description: Kprobe event auto/manual naming > > > + > > > +disable_events > > > +echo > kprobe_events > > > + > > > +:;: "Add an event on function without name" ;: > > > + > > > +FUNC=`grep -m 10 " [tT] [^.]*$" /proc/kallsyms | tail -n 1 | cut -f 3 -d " "` > > > > On powerpc, this always ends up using a blacklisted function. So, I > > think we need a way to find a function that is not black listed. > > Hmm, if we increase the -m argument, like -m 100, is that still > in a blacklisted function? Yes, most of the initial symbols are exception vectors which are blacklisted. > > > However, one of the issues is that debugfs does not show all the address > > ranges that are blacklisted. I am coming up with a way to address that > > and will post patches once I have it working. > > Would you find that is only on powerpc or generic issue? I meant the address _ranges_ that are blacklisted such as the ones with __kprobes annotation and __entry_text and so on. > > > > > With those patches, we should be able to select symbols that are not > > blacklisted. > > Or, maybe we can use generic function, like "schedule" or "vfs_read" > etc. Yes, I think this will be good for the generic test, but may not help selecting a dot symbol on powerpc. Thanks, Naveen