mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Down <chris@chrisdown.name>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Nuoqi Gui <gnq25@mails.tsinghua.edu.cn>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Mykyta Yatsenko <yatsenko@meta.com>,
	Shuah Khan <shuah@kernel.org>,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf 0/2] bpf: Gate dynptr probe-read kfuncs like helpers
Date: Fri, 30 Oct 2026 01:15:51 +0800	[thread overview]
Message-ID: <auN_R9gCBqNwEkKV@chrisdown.name> (raw)
In-Reply-To: <DJ9QOWVIXFHR.1S8UL5H0USVCB@gmail.com>

Hey Alexei,

Alexei Starovoitov writes:
> It's fine as-is. Won't fix.

Could you expand a bit on the lockdown side of this? I ran into the same 
discrepancy independently and was preparing fixes until I found this thread 
while looking for prior discussion.

The CAP_PERFMON side is now covered by 81c975aae375 ("bpf: Require CAP_PERFMON 
for kfuncs reading memory"), but the probe_read_kernel helpers still check 
LOCKDOWN_BPF_READ_KERNEL while the matching dynptr kfuncs don't. Is that 
intentional?

I also checked bpf_rdonly_cast() plus typed loads, which can still read kernel 
memory in that mode, so I can see why just gating the two dynptr kfuncs 
wouldn't give us a consistent boundary. I'm less clear on whether that's the 
reason for leaving them alone or there's some other reason.

Thanks,

Chris

      reply	other threads:[~2026-10-29 17:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-15  8:31 Nuoqi Gui
2026-06-15  8:31 ` [PATCH bpf 1/2] " Nuoqi Gui
2026-06-15  8:31 ` [PATCH bpf 2/2] selftests/bpf: Cover dynptr probe-read kfunc capability gate Nuoqi Gui
2026-06-15 15:48 ` [PATCH bpf 0/2] bpf: Gate dynptr probe-read kfuncs like helpers Alexei Starovoitov
2026-10-29 17:15   ` Chris Down [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=auN_R9gCBqNwEkKV@chrisdown.name \
    --to=chris@chrisdown.name \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=gnq25@mails.tsinghua.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=shuah@kernel.org \
    --cc=yatsenko@meta.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

all inboxes | Powered by JetHome®