mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "JP Kobryn" <jp.kobryn@linux.dev>, <mikeba@sentinelone.com>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>
Cc: "Martin KaFai Lau" <martin.lau@linux.dev>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Song Liu" <song@kernel.org>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"Jiri Olsa" <jolsa@kernel.org>,
	"John Fastabend" <john.fastabend@gmail.com>,
	"Shuah Khan" <shuah@kernel.org>, <bpf@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RFC bpf-next 0/2] bpf: Do not let preemption cause false recursion drops in trampoline progs
Date: Wed, 04 Nov 2026 02:21:11 +0000	[thread overview]
Message-ID: <DMM2G9OX9ACV.231CHJEPK0OHU@gmail.com> (raw)
In-Reply-To: <e3f63654-0f7c-462b-b58d-05f3164fe340@linux.dev>

On Tue Nov 3, 2026 at 11:46 PM UTC, JP Kobryn wrote:
> On 10/30/26 3:22 PM, Alexei Starovoitov wrote:
>> On Sun, Oct 25, 2026 at 04:02 AM Mike Bazov via B4 Relay <devnull+mikeba.sentinelone.com@kernel.org> wrote:
>> 
>>> Is disabling preemption in __bpf_prog_enter_recur() on !PREEMPT_RT the
>>> preferred fix for fentry/fexit, or would you prefer a different
>>> mechanism for reconciling preemptible execution with prog->active and
>>> the per-CPU private stack?
>> 
>> No.
>> We cannot disable preemption, since progs are not short
>> with may_goto they can take 1/4 sec.
>
>
> Seeing this issue as well. This patch opts in ALL non-sleepable programs
> with trampolines. Alexei, would your thoughts be the same if there was
> an opt-in approach, like a libbpf annotation "fentry.nonpreempt", for
> select programs? A patch like this could then check if
> program->nonpreempt is set.

I don't think it's a good idea. Try bpf_preemt_disable(), as I mentioned
in the other reply.

      reply	other threads:[~2026-11-04  2:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 11:02 Mike Bazov via B4 Relay
2026-10-25 11:02 ` [PATCH RFC bpf-next 1/2] bpf: Keep recursion-checked trampoline programs non-preemptible on !PREEMPT_RT Mike Bazov via B4 Relay
2026-10-25 11:02 ` [PATCH RFC bpf-next 2/2] selftests/bpf: Add trampoline preemption false-recursion test Mike Bazov via B4 Relay
2026-10-30 22:22 ` [PATCH RFC bpf-next 0/2] bpf: Do not let preemption cause false recursion drops in trampoline progs Alexei Starovoitov
2026-11-02 23:24   ` [EXT.MSG] " Mike Bazov
2026-11-03  1:49     ` Alexei Starovoitov
2026-11-03 21:28       ` Mike Bazov
2026-11-04  2:20         ` Alexei Starovoitov
2026-11-03 23:46   ` JP Kobryn
2026-11-04  2:21     ` Alexei Starovoitov [this message]

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=DMM2G9OX9ACV.231CHJEPK0OHU@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jp.kobryn@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=mikeba@sentinelone.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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

all inboxes | Powered by JetHome®