From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Peter Zijlstra <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>,
Jason Baron <jbaron@akamai.com>,
linuxppc-dev@lists.ozlabs.org, Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [PATCH] static_call: Don't make __static_call_return0 static
Date: Tue, 15 Mar 2022 14:11:58 -0700 [thread overview]
Message-ID: <20220315211158.kymtyh2nv4xj7ite@treble> (raw)
In-Reply-To: <b301796066e4fdd45c50c9e202d36a43688eb78e.1647242388.git.christophe.leroy@csgroup.eu>
On Mon, Mar 14, 2022 at 08:21:30AM +0100, Christophe Leroy wrote:
> System.map shows that vmlinux contains several instances of
> __static_call_return0():
>
> c0004fc0 t __static_call_return0
> c0011518 t __static_call_return0
> c00d8160 t __static_call_return0
>
> arch_static_call_transform() uses the middle one to check whether we are
> setting a call to __static_call_return0 or not:
>
> c0011520 <arch_static_call_transform>:
> c0011520: 3d 20 c0 01 lis r9,-16383 <== r9 = 0xc001 << 16
> c0011524: 39 29 15 18 addi r9,r9,5400 <== r9 += 0x1518
> c0011528: 7c 05 48 00 cmpw r5,r9 <== r9 has value 0xc0011518 here
>
> So if static_call_update() is called with one of the other instances of
> __static_call_return0(), arch_static_call_transform() won't recognise it.
>
> In order to work properly, global single instance of __static_call_return0() is required.
>
> Fixes: 3f2a8fc4b15d ("static_call/x86: Add __static_call_return0()")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
--
Josh
next prev parent reply other threads:[~2022-03-15 21:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 7:21 [PATCH] static_call: Don't make __static_call_return0 static Christophe Leroy
2022-03-15 21:11 ` Josh Poimboeuf [this message]
2022-03-16 7:11 ` Christophe Leroy
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=20220315211158.kymtyh2nv4xj7ite@treble \
--to=jpoimboe@redhat.com \
--cc=ardb@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=x86@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