linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Hari Bathini <hbathini@linux.ibm.com>
Cc: Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Masami Hiramatsu <mhiramat@kernel.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: Fri, 1 Nov 2024 15:59:48 -0500	[thread overview]
Message-ID: <20241101205948.GW29862@gate.crashing.org> (raw)
In-Reply-To: <20241101191925.1550493-1-hbathini@linux.ibm.com>

Hi!

On Sat, Nov 02, 2024 at 12:49:25AM +0530, Hari Bathini 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.

(This is true for all ELfv2, not just LE.  For the kernel that is about
the same).

The LEP and GEP can differ by zero, one, two, four, eight, or sixteen
insns (where an insn is four bytes).  Four insns is common, yes, but
maybe you can support all?  See the function symbol's st_other field
to see what the offset is:
0, 1: zero insns, zero bytes
N = 2..6: 1 << (N-2) insns, i.e. 1<<N bytes
7: reserved

(This is the top 3 bits of st_other, the other bits have other meanings).

Four insns is common, yes, but by no means the only possibility.


Segher


  reply	other threads:[~2024-11-01 21:02 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 [this message]
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
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=20241101205948.GW29862@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=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).