public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Daniel Xu <dxu@dxuuu.xyz>
Cc: shuah@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	eddyz87@gmail.com, ast@kernel.org, olsajiri@gmail.com,
	quentin@isovalent.com, alan.maguire@oracle.com, acme@kernel.org,
	martin.lau@linux.dev, song@kernel.org, yonghong.song@linux.dev,
	john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com,
	haoluo@google.com, mykolal@fb.com, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH bpf-next v4 03/12] bpf: selftests: Fix fentry test kfunc prototypes
Date: Mon, 10 Jun 2024 15:28:36 +0200	[thread overview]
Message-ID: <Zmb_hJQqxi44Nj5B@krava> (raw)
In-Reply-To: <1f493cb7a7e5349f99e2badf0880b75dd6681898.1717881178.git.dxu@dxuuu.xyz>

On Sat, Jun 08, 2024 at 03:15:59PM -0600, Daniel Xu wrote:
> The prototypes in progs/get_func_ip_test.c were not in line with how the
> actual kfuncs are defined in net/bpf/test_run.c. This causes compilation
> errors when kfunc prototypes are generated from BTF.
> 
> Fix by aligning with actual kfunc definitions.
> 
> Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
> ---
>  .../testing/selftests/bpf/progs/get_func_ip_test.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/progs/get_func_ip_test.c b/tools/testing/selftests/bpf/progs/get_func_ip_test.c
> index 8956eb78a226..a89596f7585d 100644
> --- a/tools/testing/selftests/bpf/progs/get_func_ip_test.c
> +++ b/tools/testing/selftests/bpf/progs/get_func_ip_test.c
> @@ -5,13 +5,13 @@
>  
>  char _license[] SEC("license") = "GPL";
>  
> -extern const void bpf_fentry_test1 __ksym;
> -extern const void bpf_fentry_test2 __ksym;
> -extern const void bpf_fentry_test3 __ksym;
> -extern const void bpf_fentry_test4 __ksym;
> -extern const void bpf_modify_return_test __ksym;
> -extern const void bpf_fentry_test6 __ksym;
> -extern const void bpf_fentry_test7 __ksym;
> +extern int bpf_fentry_test1(int a) __ksym;

hum, the only registered one as kfunc is bpf_fentry_test1, to allow fmodret
also there's bpf_fentry_test9 as kfunc, which AFAICS is not really needed

jirka

[1] 5b481acab4ce bpf: do not rely on ALLOW_ERROR_INJECTION for fmod_ret

> +extern int bpf_fentry_test2(int a, __u64 b) __ksym;
> +extern int bpf_fentry_test3(char a, int b, __u64 c) __ksym;
> +extern int bpf_fentry_test4(void *a, char b, int c, __u64 d) __ksym;
> +extern int bpf_modify_return_test(int a, int *b) __ksym;
> +extern int bpf_fentry_test6(__u64 a, void *b, short c, int d, void *e, __u64 f) __ksym;
> +extern int bpf_fentry_test7(struct bpf_fentry_test_t *arg) __ksym;
>  
>  extern bool CONFIG_X86_KERNEL_IBT __kconfig __weak;
>  
> -- 
> 2.44.0
> 

  reply	other threads:[~2024-06-10 13:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-08 21:15 [PATCH bpf-next v4 00/12] bpf: Support dumping kfunc prototypes from BTF Daniel Xu
2024-06-08 21:15 ` [PATCH bpf-next v4 01/12] kbuild: bpf: Tell pahole to DECL_TAG kfuncs Daniel Xu
2024-06-08 21:15 ` [PATCH bpf-next v4 02/12] bpf: selftests: Fix bpf_iter_task_vma_new() prototype Daniel Xu
2024-06-08 21:15 ` [PATCH bpf-next v4 03/12] bpf: selftests: Fix fentry test kfunc prototypes Daniel Xu
2024-06-10 13:28   ` Jiri Olsa [this message]
2024-06-11 16:58     ` Daniel Xu
2024-06-12 12:41       ` Jiri Olsa
2024-06-08 21:16 ` [PATCH bpf-next v4 04/12] bpf: selftests: Fix bpf_cpumask_first_zero() kfunc prototype Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 05/12] bpf: selftests: Fix bpf_map_sum_elem_count() " Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 06/12] bpf: selftests: Fix bpf_session_cookie() " Daniel Xu
2024-06-10 13:04   ` Jiri Olsa
2024-06-11 15:54     ` Daniel Xu
2024-06-11 16:03       ` Alexei Starovoitov
2024-06-17 22:25     ` Andrii Nakryiko
2024-06-18 12:43       ` Jiri Olsa
2024-06-18 16:58         ` Andrii Nakryiko
2024-06-18 19:07           ` Jiri Olsa
2024-06-18 20:29             ` Andrii Nakryiko
2024-06-08 21:16 ` [PATCH bpf-next v4 07/12] bpf: selftests: Namespace struct_opt callbacks in bpf_dctcp Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 08/12] bpf: verifier: Relax caller requirements for kfunc projection type args Daniel Xu
2024-06-10 18:30   ` Alexei Starovoitov
2024-06-11 18:01     ` Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 09/12] bpf: treewide: Align kfunc signatures to prog point-of-view Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 10/12] bpf: selftests: nf: Opt out of using generated kfunc prototypes Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 11/12] bpf: selftests: xfrm: " Daniel Xu
2024-06-08 21:16 ` [PATCH bpf-next v4 12/12] bpftool: Support dumping kfunc prototypes from BTF Daniel Xu
2024-06-08 21:23 ` [PATCH bpf-next v4 00/12] bpf: " Daniel Xu

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=Zmb_hJQqxi44Nj5B@krava \
    --to=olsajiri@gmail.com \
    --cc=acme@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dxu@dxuuu.xyz \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mykolal@fb.com \
    --cc=quentin@isovalent.com \
    --cc=sdf@google.com \
    --cc=shuah@kernel.org \
    --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