All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Yonghong Song <yonghong.song@linux.dev>
Cc: bot+bpf-ci@kernel.org, chandna.sahil@gmail.com, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev,
	eddyz87@gmail.com, song@kernel.org, john.fastabend@gmail.com,
	kpsingh@kernel.org, sdf@fomichev.me, haoluo@google.com,
	jolsa@kernel.org, bpf@vger.kernel.org,
	syzbot+b0cff308140f79a9c4cb@syzkaller.appspotmail.comi,
	martin.lau@kernel.org, clm@meta.com, ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next] bpf: use preempt_disable/enable() to protect bpf_bprintf_buffers nesting
Date: Tue, 11 Nov 2025 11:37:05 +0100	[thread overview]
Message-ID: <20251111103705.B_sEhO6r@linutronix.de> (raw)
In-Reply-To: <03bc2787-b5e7-42e7-9812-8c50da912c0b@linux.dev>

On 2025-11-10 09:44:55 [-0800], Yonghong Song wrote:
> 
> 
> On 11/10/25 5:25 AM, Sebastian Andrzej Siewior wrote:
> > On 2025-11-09 11:44:48 [-0800], Yonghong Song wrote:
> > 
> > Could we do this instead?
> > There is  __bpf_stream_push_str() => bpf_stream_page_reserve_elem() =>
> > bpf_stream_page_replace() => alloc_pages_nolock().
> 
> I would suggest to stick to preempt_disable/enable().
> In the bpf-next (newer change), for function
> bpf_stream_elem_alloc(), kmalloc_nolock() is used
> and no local_lock usage any more.

Okay. This is then basically a revert of the removal of
preempt_disable(). If it doesn't break anything, fine then. I don't have
a strong argument against other than it would impose limitations as
mentioned previously (but this is no longer the case).
Unless it breaks anything, fine by me :)

The correct tags would be:

 Reported-by: syzbot+b0cff308140f79a9c4cb@syzkaller.appspotmail.com
 Closes: https://lore.kernel.org/all/68f6a4c8.050a0220.1be48.0011.GAE@google.com/
 Fixes: 4223bf833c849 ("bpf: Remove preempt_disable in bpf_try_get_buffers")

Sebastian

      reply	other threads:[~2025-11-11 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-09 17:36 [PATCH bpf-next] bpf: use preempt_disable/enable() to protect bpf_bprintf_buffers nesting Sahil Chandna
2025-11-09 18:07 ` bot+bpf-ci
2025-11-09 19:44   ` Yonghong Song
2025-11-10 13:25     ` Sebastian Andrzej Siewior
2025-11-10 17:44       ` Yonghong Song
2025-11-11 10:37         ` Sebastian Andrzej Siewior [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=20251111103705.B_sEhO6r@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chandna.sahil@gmail.com \
    --cc=clm@meta.com \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=syzbot+b0cff308140f79a9c4cb@syzkaller.appspotmail.comi \
    --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 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.