The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: "Rui Qi" <qirui.001@bytedance.com>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
	"Mathieu Desnoyers" <mathieu.desnoyers@efficios.com>,
	"Shuah Khan" <shuah@kernel.org>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-trace-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v2 0/2] selftests/ftrace: Fix add_remove_uprobe robustness
Date: Fri, 7 Aug 2026 19:29:14 +0900	[thread overview]
Message-ID: <20260807192914.afd2a3ee624fecd760232d12@kernel.org> (raw)
In-Reply-To: <20260807081512.2974757-1-qirui.001@bytedance.com>

On Fri,  7 Aug 2026 16:15:10 +0800
"Rui Qi" <qirui.001@bytedance.com> wrote:

> Hi,
> 
> This series fixes two ways add_remove_uprobe can construct an invalid
> uprobe offset.

Please send the series in the new thread (not reply) next time.
Instead, you can make a permalink to the previous discussion from your
mail's message-id and write it in the mail body so that we can follow
the discussion in the previous version.

e.g. 

 https://lore.kernel.org/all/20260806083101.2651025-1-qirui.001@bytedance.com/

You can get this using below script.
-----
#!/bin/sh
#
if [ -f "$1" ]; then
  MID=`grep -i ^"Message-Id:" $1 | cut -f2 -d: | tr -d ' <>'`
else
  MID=$1
fi

URL=`curl -Ls -o /dev/null -w %{url_effective} http://lkml.kernel.org/r/$MID`
echo ${URL%T/#u}
-----

Thank you,

> 
> Patch 1 follows Masami's feedback on v1 and forces the C locale in the
> top-level ftracetest runner, rather than setting LC_ALL=C around each
> readelf invocation.
> 
> Patch 2 fixes the remaining offset issue. readelf reports the ELF entry
> point as a virtual address, while uprobe_events expects a file offset.
> Convert the entry point through the LOAD program headers so the test also
> works for non-PIE executables.
> 
> Changes in v2:
> - Move LC_ALL=C to the top-level ftracetest runner, as suggested by
>   Masami.
> - Keep the entry-point-to-file-offset conversion as the second patch and
>   rely on the runner-provided locale for readelf output.
> 
> Testing:
> - ./scripts/checkpatch.pl --strict -g HEAD~2..HEAD
> - sh -n tools/testing/selftests/ftrace/ftracetest
> - sh -n tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc
> 
> Rui Qi (2):
>   selftests/ftrace: Force C locale in ftracetest
>   selftests/ftrace: Convert ELF entry point to file offset in uprobe
>     test
> 
>  tools/testing/selftests/ftrace/ftracetest     |  3 +++
>  .../test.d/dynevent/add_remove_uprobe.tc      | 27 +++++++++++++++++--
>  2 files changed, 28 insertions(+), 2 deletions(-)
> 
> -- 
> 2.20.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

      parent reply	other threads:[~2026-08-07 10:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  8:31 [PATCH 1/2] selftests/ftrace: Force C locale for readelf in uprobe test Rui Qi
2026-08-06  8:31 ` [PATCH 2/2] selftests/ftrace: Convert ELF entry point to file offset " Rui Qi
2026-08-07  1:47 ` [PATCH 1/2] selftests/ftrace: Force C locale for readelf " Masami Hiramatsu
2026-08-07  8:01   ` Rui Qi
2026-08-07  8:15 ` [PATCH v2 0/2] selftests/ftrace: Fix add_remove_uprobe robustness Rui Qi
2026-08-07  8:15   ` [PATCH v2 1/2] selftests/ftrace: Force C locale in ftracetest Rui Qi
2026-08-07  8:15   ` [PATCH v2 2/2] selftests/ftrace: Convert ELF entry point to file offset in uprobe test Rui Qi
2026-08-07 10:30     ` Masami Hiramatsu
2026-08-07 10:29   ` Masami Hiramatsu [this message]

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=20260807192914.afd2a3ee624fecd760232d12@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=hca@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=qirui.001@bytedance.com \
    --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