From: Ard Biesheuvel <ardb@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Sami Tolvanen <samitolvanen@google.com>,
Steven Rostedt <rostedt@goodmis.org>,
Arnd Bergmann <arnd@kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Jason Baron <jbaron@akamai.com>, Ingo Molnar <mingo@redhat.com>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Frederic Weisbecker <frederic@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] static_call: fix function type mismatch
Date: Thu, 25 Mar 2021 08:45:56 +0100 [thread overview]
Message-ID: <CAMj1kXF9_Z5epEqyohCPWSfyYse+msq+Oyoekr9C_LXg+Pbx5w@mail.gmail.com> (raw)
In-Reply-To: <YFw+4Ba5ci/Bmg0k@hirez.programming.kicks-ass.net>
On Thu, 25 Mar 2021 at 08:43, Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Thu, Mar 25, 2021 at 01:42:41AM +0100, Rasmus Villemoes wrote:
> > > Actually, it looks like I can't select PREEMPT_DYNAMIC> and tweaking Kconfig
> >
> > Ah, there's no prompt on the "bool" line, so it doesn't show up. That
> > seems to be a mistake, since there's an elaborate help text which says
> >
> > The runtime overhead is negligible with
> > HAVE_STATIC_CALL_INLINE enabled
> > but if runtime patching is not available for the specific
> > architecture
> > then the potential overhead should be considered.
> >
> > So it seems that it was meant to be "you can enable this if you really
> > want".
> >
> > to force enable it on arm64 results in a build error
>
> Right, PREEMPT_DYNAMIC really hard relies on HAVE_STATIC_CALL
>
> There's an implicit dependency in the select:
>
> config PREEMPT
> ...
> select PREEMPT_DYNAMIC if HAVE_PREEMPT_DYNAMIC
>
> > > ("implicit declaration of function 'static_call_mod'").
> >
> > Seems to be an omission in the last !HAVE_STATIC_CALL branch in
> > static_call_types.h, and there's also no
> > EXPORT_STATIC_CALL_TRAMP{,_GPL} in static_call.h for that case.
>
> That interface doesn't make sense for !HAVE_STATIC_CALL. It's impossible
> to not export the function pointer itself but still call it for
> !HAVE_STATIC_CALL.
I proposed an implementation for the indirect static call variety for
arm64 here [0] but we haven't yet decided whether it is needed, given
that indirect calls are mostly fine on arm64 (modulo CFI of course)
Maybe this helps?
[0] https://lore.kernel.org/linux-arm-kernel/20201120082103.4840-1-ardb@kernel.org/
next prev parent reply other threads:[~2021-03-25 7:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 17:06 [PATCH] static_call: fix function type mismatch Arnd Bergmann
2021-03-22 19:32 ` Steven Rostedt
2021-03-22 20:47 ` Peter Zijlstra
2021-03-22 21:18 ` Arnd Bergmann
2021-03-22 21:29 ` Steven Rostedt
2021-03-23 7:47 ` Peter Zijlstra
2021-03-24 12:46 ` Rasmus Villemoes
2021-03-24 16:01 ` Sami Tolvanen
2021-03-24 16:45 ` Rasmus Villemoes
2021-03-24 17:33 ` Peter Zijlstra
2021-03-24 19:16 ` Peter Zijlstra
2021-03-24 21:51 ` Rasmus Villemoes
2021-03-24 22:34 ` Sami Tolvanen
2021-03-24 22:53 ` Rasmus Villemoes
2021-03-24 23:40 ` Sami Tolvanen
2021-03-25 0:42 ` Rasmus Villemoes
2021-03-25 7:42 ` Peter Zijlstra
2021-03-25 7:45 ` Ard Biesheuvel [this message]
2021-03-25 8:27 ` Rasmus Villemoes
2021-03-23 7:35 ` Peter Zijlstra
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=CAMj1kXF9_Z5epEqyohCPWSfyYse+msq+Oyoekr9C_LXg+Pbx5w@mail.gmail.com \
--to=ardb@kernel.org \
--cc=arnd@kernel.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=frederic@kernel.org \
--cc=jbaron@akamai.com \
--cc=jpoimboe@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--cc=vincent.guittot@linaro.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).