All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Sullivan <rysulliv@redhat.com>
To: live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: rysulliv@redhat.com, joe.lawrence@redhat.com, pmladek@suse.com,
	mbenes@suse.cz, jikos@kernel.org, jpoimboe@kernel.org,
	naveen.n.rao@linux.ibm.com, christophe.leroy@csgroup.eu,
	mpe@ellerman.id.au, npiggin@gmail.com
Subject: RE: [PATCH v2] powerpc/ftrace: restore caller's toc on ppc64 livepatch sibling call
Date: Thu,  8 Aug 2024 17:17:40 -0400	[thread overview]
Message-ID: <20240808211751.50746-1-rysulliv@redhat.com> (raw)
In-Reply-To: <79fffe34-ce0b-4937-a85a-0ce566684887@csgroup.eu>

Restores caller's toc pointer to r2, on a sibling call this will
uncorrupt the caller's toc pointer and otherwise will be redundant

Signed-off-by: Ryan Sullivan <rysulliv@redhat.com>
---
 arch/powerpc/kernel/trace/ftrace_entry.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S b/arch/powerpc/kernel/trace/ftrace_entry.S
index 76dbe9fd2c0f..4dfbe6076ad1 100644
--- a/arch/powerpc/kernel/trace/ftrace_entry.S
+++ b/arch/powerpc/kernel/trace/ftrace_entry.S
@@ -244,6 +244,9 @@ livepatch_handler:
 	mtlr	r12
 	ld	r2,  -24(r11)
 
+	/* Restore toc to caller's stack in case of sibling call */
+	std	r2, 24(r1)
+
 	/* Pop livepatch stack frame */
 	ld	r12, PACA_THREAD_INFO(r13)
 	subi	r11, r11, 24
-- 
2.44.0


WARNING: multiple messages have this Message-ID (diff)
From: Ryan Sullivan <rysulliv@redhat.com>
To: live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Cc: pmladek@suse.com, joe.lawrence@redhat.com, jikos@kernel.org,
	christophe.leroy@csgroup.eu, rysulliv@redhat.com,
	npiggin@gmail.com, naveen.n.rao@linux.ibm.com, mbenes@suse.cz,
	jpoimboe@kernel.org
Subject: RE: [PATCH v2] powerpc/ftrace: restore caller's toc on ppc64 livepatch sibling call
Date: Thu,  8 Aug 2024 17:17:40 -0400	[thread overview]
Message-ID: <20240808211751.50746-1-rysulliv@redhat.com> (raw)
In-Reply-To: <79fffe34-ce0b-4937-a85a-0ce566684887@csgroup.eu>

Restores caller's toc pointer to r2, on a sibling call this will
uncorrupt the caller's toc pointer and otherwise will be redundant

Signed-off-by: Ryan Sullivan <rysulliv@redhat.com>
---
 arch/powerpc/kernel/trace/ftrace_entry.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/trace/ftrace_entry.S b/arch/powerpc/kernel/trace/ftrace_entry.S
index 76dbe9fd2c0f..4dfbe6076ad1 100644
--- a/arch/powerpc/kernel/trace/ftrace_entry.S
+++ b/arch/powerpc/kernel/trace/ftrace_entry.S
@@ -244,6 +244,9 @@ livepatch_handler:
 	mtlr	r12
 	ld	r2,  -24(r11)
 
+	/* Restore toc to caller's stack in case of sibling call */
+	std	r2, 24(r1)
+
 	/* Pop livepatch stack frame */
 	ld	r12, PACA_THREAD_INFO(r13)
 	subi	r11, r11, 24
-- 
2.44.0


  parent reply	other threads:[~2024-08-08 21:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-24 18:33 [PATCH] powerpc/ftrace: restore r2 to caller's stack on livepatch sibling call Ryan Sullivan
2024-07-24 18:33 ` Ryan Sullivan
2024-07-29 14:17 ` Michael Ellerman
2024-07-29 14:17   ` Michael Ellerman
2024-07-29 15:02   ` Ryan Sullivan
2024-07-29 15:02     ` Ryan Sullivan
2024-08-15 10:22     ` Michael Ellerman
2024-08-15 16:07       ` Ryan Sullivan
2024-08-15 16:24         ` Joe Lawrence
2024-09-09 16:33           ` Ryan B. Sullivan
2024-09-10  7:21             ` Michael Ellerman
2024-09-10 15:02               ` Ryan B. Sullivan
2024-08-08  7:00 ` Christophe Leroy
2024-08-08  7:00   ` Christophe Leroy
2024-08-08 17:55   ` [PATCH v2] powerpc/ftrace: restore caller's toc on ppc64 " Ryan Sullivan
2024-08-08 17:55     ` Ryan Sullivan
2024-08-08 21:17   ` Ryan Sullivan [this message]
2024-08-08 21:17     ` Ryan Sullivan

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=20240808211751.50746-1-rysulliv@redhat.com \
    --to=rysulliv@redhat.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=pmladek@suse.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.