From: Eduard Zingerman <eddyz87@gmail.com>
To: Matt Bobrowski <mattbobrowski@google.com>, bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
song@kernel.org, kpsingh@kernel.org, sdf@google.com,
haoluo@google.com, memxor@gmail.com, void@manifault.com,
jolsa@kernel.org
Subject: Re: [PATCH 1/2] bpf: relax zero fixed offset constraint on trusted pointer arguments
Date: Mon, 17 Jun 2024 22:38:56 -0700 [thread overview]
Message-ID: <28250a9a52c8a10dc7c37e15df9a9d446976e4eb.camel@gmail.com> (raw)
In-Reply-To: <ZnA9ndnXKtHOuYMe@google.com>
On Mon, 2024-06-17 at 13:43 +0000, Matt Bobrowski wrote:
[...]
> * For OBJ_RELEASE and KF_RELEASE BPF helpers and kfuncs:
>
> * If the expected argument type is of an untyped pointer i.e. void *,
> then we continue to enforce a zero fixed offset as we need to
> ensure that the correct referenced pointer is handed off correctly
> to the relevant deallocation routine
>
> * If the expected argument is backed by BTF, then we relax the strict
> zero fixed offset and allow it only if we successfully type matched
> between the register and argument. A failed type match between
> register and argument will result in the legacy strict zero offset
> semantics
>
> * For KF_TRUSTED_ARGS BPF kfuncs:
>
> * The fixed zero offset constraint has been lifted, such that
> KF_TRUSTED_ARGS BPF kfuncs can now accept a trusted pointer
> argument with a non-zero fixed offset providing that register and
> argument BTF has type matched successfully
[...]
Hi Matt,
I've read this and the next patch once, but need more time to provide
feedback. Two quick notes:
- It seems something is wrong with the way this patch set was sent:
for some reason it is not organized as a single thread (e.g. on vger).
- I see how OBJ_RELEASE arguments trigger btf_struct_ids_match() in
check_release_arg_reg_off(), but I don't see how KF_TRUSTED_ARGS
trigger similar logic.
Do you have some positive tests that verify newly added functionality?
Thanks,
Eduard
next prev parent reply other threads:[~2024-06-18 5:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 13:43 [PATCH 1/2] bpf: relax zero fixed offset constraint on trusted pointer arguments Matt Bobrowski
2024-06-18 5:38 ` Eduard Zingerman [this message]
2024-06-18 7:12 ` Matt Bobrowski
2024-06-19 8:57 ` Kumar Kartikeya Dwivedi
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=28250a9a52c8a10dc7c37e15df9a9d446976e4eb.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=haoluo@google.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=mattbobrowski@google.com \
--cc=memxor@gmail.com \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=void@manifault.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