From: Eduard Zingerman <eddyz87@gmail.com>
To: Slava Imameev <slava.imameev@crowdstrike.com>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org
Cc: martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
john.fastabend@gmail.com, kpsingh@kernel.org, sdf@fomichev.me,
haoluo@google.com, jolsa@kernel.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, shuah@kernel.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-open-source@crowdstrike.com
Subject: Re: [PATCH bpf-next v6 1/2] bpf: Support pointer param types via SCALAR_VALUE for trampolines
Date: Tue, 24 Mar 2026 13:21:29 -0700 [thread overview]
Message-ID: <1de9261a98d6e4041ad2e99c745fd6be0831a492.camel@gmail.com> (raw)
In-Reply-To: <20260314082127.7939-2-slava.imameev@crowdstrike.com>
On Sat, 2026-03-14 at 19:21 +1100, Slava Imameev wrote:
> Add BPF verifier support for single- and multi-level pointer
> parameters and return values in BPF trampolines by treating these
> parameters as SCALAR_VALUE.
>
> This extends the existing support for int and void pointers that are
> already treated as SCALAR_VALUE.
>
> This provides consistent logic for single and multi-level pointers:
> if a type is treated as SCALAR for a single-level pointer, the same
> applies to multi-level pointers. The exception is pointer-to-struct,
> which is currently PTR_TO_BTF_ID for single-level but treated as
> scalar for multi-level pointers since the verifier lacks context
> to infer the size of target memory regions.
>
> Safety is ensured by existing BTF verification, which rejects invalid
> pointer types at the BTF verification stage.
>
> Signed-off-by: Slava Imameev <slava.imameev@crowdstrike.com>
> ---
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
[...]
next prev parent reply other threads:[~2026-03-24 20:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-14 8:21 [PATCH bpf-next v6 0/2] bpf: Add multi-level pointer parameter support for trampolines Slava Imameev
2026-03-14 8:21 ` [PATCH bpf-next v6 1/2] bpf: Support pointer param types via SCALAR_VALUE " Slava Imameev
2026-03-24 20:21 ` Eduard Zingerman [this message]
2026-03-14 8:21 ` [PATCH bpf-next v6 2/2] selftests/bpf: Add trampolines single and multi-level pointer params test coverage Slava Imameev
2026-03-24 20:23 ` Eduard Zingerman
2026-03-24 20:40 ` [PATCH bpf-next v6 0/2] bpf: Add multi-level pointer parameter support for trampolines 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=1de9261a98d6e4041ad2e99c745fd6be0831a492.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=haoluo@google.com \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-open-source@crowdstrike.com \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=slava.imameev@crowdstrike.com \
--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