All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Ihor Solodrai <ihor.solodrai@linux.dev>
Cc: Jiri Olsa <olsajiri@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eduard Zingerman <eddyz87@gmail.com>,
	bpf@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH bpf-next v3 2/2] selftests/bpf: Update kfuncs using btf_struct_meta to new variants
Date: Fri, 20 Mar 2026 12:06:32 +0100	[thread overview]
Message-ID: <ab0qONLv7TCHsqPJ@krava> (raw)
In-Reply-To: <2d654809-e57f-4316-9d09-31c6cfd25508@linux.dev>

On Thu, Mar 19, 2026 at 01:43:35PM -0700, Ihor Solodrai wrote:
> On 3/19/26 5:30 AM, Jiri Olsa wrote:
> > On Wed, Mar 18, 2026 at 04:42:10PM -0700, Ihor Solodrai wrote:
> >> Update selftests to use the new non-_impl kfuncs marked with
> >> KF_IMPLICIT_ARGS by removing redundant declarations and macros from
> >> bpf_experimental.h (the new kfuncs are present in the vmlinux.h) and
> >> updating relevant callsites.
> >>
> >> Fix spin_lock verifier-log matching for lock_id_kptr_preserve by
> >> accepting variable instruction numbers. The calls to kfuncs with
> >> implicit arguments do not have register moves (e.g. r5 = 0)
> >> corresponding to dummy arguments anymore, so the order of instructions
> >> has shifted.
> >>
> >> Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
> >> ---
> >>  .../testing/selftests/bpf/bpf_experimental.h  | 156 +-----------------
> >>  .../selftests/bpf/prog_tests/spin_lock.c      |   5 +-
> >>  .../selftests/bpf/progs/kptr_xchg_inline.c    |   4 +-
> >>  3 files changed, 9 insertions(+), 156 deletions(-)
> >>
> >> diff --git a/tools/testing/selftests/bpf/bpf_experimental.h b/tools/testing/selftests/bpf/bpf_experimental.h
> >> index 44466acf8083..2234bd6bc9d3 100644
> >> --- a/tools/testing/selftests/bpf/bpf_experimental.h
> >> +++ b/tools/testing/selftests/bpf/bpf_experimental.h
> >> @@ -8,156 +8,11 @@
> >>  
> >>  [...]
> >> -
> >> -/* Description
> >> - *	Free an allocated percpu object. All fields of the object that require
> >> - *	destruction will be destructed before the storage is freed.
> >> - *
> >> - *	The 'meta' parameter is rewritten by the verifier, no need for BPF
> >> - *	program to set it.
> >> - * Returns
> >> - *	Void.
> >> - */
> >> -extern void bpf_percpu_obj_drop_impl(void *kptr, void *meta) __ksym;
> >> +/* Convenience macro to wrap over bpf_percpu_obj_new */
> >> +#define bpf_percpu_obj_new(type) ((type __percpu_kptr *)bpf_percpu_obj_new(bpf_core_type_id_local(type)))
> > 
> > nit, seems like a shame to remove all the comments which are still
> > valid, maybe we could leave those externs with comments and just
> > drop the _impl suffix
> 
> I assumed they were copy-pasted from somewhere, but apparently no.
> 
> How about we move the useful comments to kernel/helpers.c, where
> the kfuncs are defined?

sounds good, thanks

jirka

  reply	other threads:[~2026-03-20 11:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 23:42 [PATCH bpf-next v3 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS Ihor Solodrai
2026-03-18 23:42 ` [PATCH bpf-next v3 2/2] selftests/bpf: Update kfuncs using btf_struct_meta to new variants Ihor Solodrai
2026-03-19 12:30   ` Jiri Olsa
2026-03-19 20:43     ` Ihor Solodrai
2026-03-20 11:06       ` Jiri Olsa [this message]
2026-03-20 14:50   ` Mykyta Yatsenko
2026-03-19 12:25 ` [PATCH bpf-next v3 1/2] bpf: Support struct btf_struct_meta via KF_IMPLICIT_ARGS Jiri Olsa
2026-03-19 20:37   ` Ihor Solodrai
2026-03-20 15:49 ` Mykyta Yatsenko
2026-03-27  0:16   ` Ihor Solodrai
2026-03-27 19:19     ` Mykyta Yatsenko
2026-03-21 20:27 ` Alexei Starovoitov
2026-03-23 19:58   ` Ihor Solodrai
2026-03-24 17:22     ` Alexei Starovoitov
2026-03-26 19:13       ` Ihor Solodrai
2026-03-27 20:48         ` Alexei Starovoitov
2026-03-27 20:55           ` Ihor Solodrai
2026-03-27 21:00             ` Alexei Starovoitov
2026-03-27 21:08               ` Ihor Solodrai
2026-03-27 21:47                 ` Alexei Starovoitov
2026-03-27 22:06                   ` Ihor Solodrai

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=ab0qONLv7TCHsqPJ@krava \
    --to=olsajiri@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=kernel-team@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 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.