From: Daniel Borkmann <daniel@iogearbox.net>
To: Artem Savkov <asavkov@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, "Daniel Müller" <deso@posteo.net>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix attach point for non-x86 arches in test_progs/lsm
Date: Mon, 15 Aug 2022 20:46:56 +0200 [thread overview]
Message-ID: <376f20c5-4b1c-efec-4dde-43d91b3d4308@iogearbox.net> (raw)
In-Reply-To: <20220815122422.687116-1-asavkov@redhat.com>
On 8/15/22 2:24 PM, Artem Savkov wrote:
> Use SYS_PREFIX macro from bpf_misc.h instead of hard-coded '__x64_'
> prefix for sys_setdomainname attach point in lsm test.
>
> Signed-off-by: Artem Savkov <asavkov@redhat.com>
> ---
> tools/testing/selftests/bpf/progs/lsm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/progs/lsm.c b/tools/testing/selftests/bpf/progs/lsm.c
> index 33694ef8acfa..d8d8af623bc2 100644
> --- a/tools/testing/selftests/bpf/progs/lsm.c
> +++ b/tools/testing/selftests/bpf/progs/lsm.c
> @@ -4,6 +4,7 @@
> * Copyright 2020 Google LLC.
> */
>
> +#include "bpf_misc.h"
> #include "vmlinux.h"
> #include <bpf/bpf_helpers.h>
> #include <bpf/bpf_tracing.h>
> @@ -160,7 +161,7 @@ int BPF_PROG(test_task_free, struct task_struct *task)
>
> int copy_test = 0;
>
> -SEC("fentry.s/__x64_sys_setdomainname")
> +SEC("fentry.s/" SYS_PREFIX "sys_setdomainname")
> int BPF_PROG(test_sys_setdomainname, struct pt_regs *regs)
> {
> void *ptr = (void *)PT_REGS_PARM1(regs);
>
Good catch! Could you also update the comment in tools/testing/selftests/bpf/DENYLIST.s390x +46 :
[...]
test_lsm # failed to find kernel BTF type ID of '__x64_sys_setdomainname': -3 (?)
[...]
It should likely say sth like `attach fentry unexpected error: -524 (trampoline)`.
Thanks,
Daniel
next prev parent reply other threads:[~2022-08-15 19:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 12:24 Artem Savkov
2022-08-15 18:46 ` Daniel Borkmann [this message]
2022-08-16 5:52 ` [PATCH bpf-next v2] " Artem Savkov
2022-08-16 20:40 ` 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=376f20c5-4b1c-efec-4dde-43d91b3d4308@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=andrii@kernel.org \
--cc=asavkov@redhat.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=deso@posteo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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®