linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hari Bathini <hbathini@linux.ibm.com>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	"Naveen N. Rao" <naveen@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-trace-kernel@vger.kernel.org,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le
Date: Mon, 4 Nov 2024 15:02:12 +0530	[thread overview]
Message-ID: <d10f4a96-944f-42c4-9886-05dfe831e8fd@linux.ibm.com> (raw)
In-Reply-To: <20241103135758.5a5f8f0870a139ab1a5bc7b8@kernel.org>



On 03/11/24 10:27 am, Masami Hiramatsu (Google) wrote:
> On Sat,  2 Nov 2024 00:49:25 +0530
> Hari Bathini <hbathini@linux.ibm.com> wrote:
> 
>> For ppc64le, depending on the kernel configuration used, offset 16
>> from function start address can also be considered function entry.
>> Update the test case to accommodate such configurations.
>>
> 
> Hi Hari, so have you met any error on this test case?

Hi Masami,

vfs_read+8 is function entry on powerpc. So, the test case bails out at:
   "check_error 'p vfs_read+8 ^$arg*'		# NOFENTRY_ARGS"

as it allows setting kprobe "vfs_read+8 $arg*"

> Can you share the error result too?


End of the log file for reference:

"
Test command: p vfs_read $arg* $arg*
[2661828.483436] trace_kprobe: error: $arg* can be used only once in the 
parameters
   Command: p vfs_read $arg* $arg*
                             ^
Test command: p vfs_read+8 $arg*
"

Thanks
Hari

> 
> Thank you,
> 
>> Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
>> ---
>>   .../selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc    | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
>> index a16c6a6f6055..c03b94cc5784 100644
>> --- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
>> +++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_syntax_errors.tc
>> @@ -111,7 +111,11 @@ check_error 'p vfs_read $arg* ^$arg*'		# DOUBLE_ARGS
>>   if !grep -q 'kernel return probes support:' README; then
>>   check_error 'r vfs_read ^$arg*'			# NOFENTRY_ARGS
>>   fi
>> +if [ "$(uname -m)" = "ppc64le" ]; then
>> +check_error 'p vfs_read+20 ^$arg*'		# NOFENTRY_ARGS
>> +else
>>   check_error 'p vfs_read+8 ^$arg*'		# NOFENTRY_ARGS
>> +fi
>>   check_error 'p vfs_read ^hoge'			# NO_BTFARG
>>   check_error 'p kfree ^$arg10'			# NO_BTFARG (exceed the number of parameters)
>>   check_error 'r kfree ^$retval'			# NO_RETVAL
>> -- 
>> 2.47.0
>>
> 
> 


  reply	other threads:[~2024-11-04  9:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-01 19:19 [PATCH] selftests/ftrace: update kprobe syntax error test for ppc64le Hari Bathini
2024-11-01 20:59 ` Segher Boessenkool
2024-11-04  9:21   ` Hari Bathini
2024-11-04  9:44     ` Segher Boessenkool
2024-11-04 10:10       ` Hari Bathini
2024-11-04 10:36         ` Segher Boessenkool
2024-11-04 15:27           ` Steven Rostedt
2024-11-04 17:36           ` Hari Bathini
2024-11-05  8:20             ` Segher Boessenkool
2024-11-05  9:17               ` Masami Hiramatsu
2024-11-05 19:52                 ` Segher Boessenkool
2024-11-06  5:54                   ` Hari Bathini
2024-11-03  4:57 ` Masami Hiramatsu
2024-11-04  9:32   ` Hari Bathini [this message]
2024-11-05  8:37     ` Masami Hiramatsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d10f4a96-944f-42c4-9886-05dfe831e8fd@linux.ibm.com \
    --to=hbathini@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mhiramat@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).