public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	bpf@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>
Subject: Re: [PATCH bpf] bpf: Fix dispatcher patchable function entry to 5 bytes nop
Date: Tue, 18 Oct 2022 16:26:12 +0200	[thread overview]
Message-ID: <Y063hLFH1JXtdg7Y@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20221018075934.574415-1-jolsa@kernel.org>

On Tue, Oct 18, 2022 at 09:59:34AM +0200, Jiri Olsa wrote:
> The patchable_function_entry(5) might output 5 single nop
> instructions (depends on toolchain), which will clash with
> bpf_arch_text_poke check for 5 bytes nop instruction.
> 
> Adding early init call for dispatcher that checks and change
> the patchable entry into expected 5 nop instruction if needed.
> 
> There's no need to take text_mutex, because we are using it
> in early init call which is called at pre-smp time.
> 
> Fixes: ceea991a019c ("bpf: Move bpf_dispatcher function out of ftrace locations")
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

  reply	other threads:[~2022-10-18 14:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18  7:59 [PATCH bpf] bpf: Fix dispatcher patchable function entry to 5 bytes nop Jiri Olsa
2022-10-18 14:26 ` Peter Zijlstra [this message]
2022-10-21  2:10 ` patchwork-bot+netdevbpf

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=Y063hLFH1JXtdg7Y@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox