From: Yonghong Song <yonghong.song@linux.dev>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>
Cc: bpf@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH bpf 3/3] selftests/bpf: Test gotol with large offsets
Date: Tue, 2 Jan 2024 16:44:58 -0800 [thread overview]
Message-ID: <fbdd0cc8-4078-40a7-9654-7e3c0cfce738@linux.dev> (raw)
In-Reply-To: <20240102193531.3169422-4-iii@linux.ibm.com>
On 1/2/24 11:30 AM, Ilya Leoshkevich wrote:
> Test gotol with offsets that don't fit into a short (i.e., larger than
> 32k or smaller than -32k).
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
It might be useful to explain why the test will fail
with unpriv mode (4K insn limit) just in case that
people are not aware of the reason.
Acked-by: Yonghong Song <yonghong.song@linux.dev>
> ---
> .../selftests/bpf/progs/verifier_gotol.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/progs/verifier_gotol.c b/tools/testing/selftests/bpf/progs/verifier_gotol.c
> index d1edbcff9a18..05a329ee45ee 100644
> --- a/tools/testing/selftests/bpf/progs/verifier_gotol.c
> +++ b/tools/testing/selftests/bpf/progs/verifier_gotol.c
> @@ -33,6 +33,25 @@ l3_%=: \
> : __clobber_all);
> }
>
> +SEC("socket")
> +__description("gotol, large_imm")
> +__success __failure_unpriv __retval(40000)
> +__naked void gotol_large_imm(void)
> +{
> + asm volatile (" \
> + gotol 1f; \
> +0: \
> + r0 = 0; \
> + .rept 40000; \
> + r0 += 1; \
> + .endr; \
> + exit; \
> +1: gotol 0b; \
> +" :
> + :
> + : __clobber_all);
> +}
> +
> #else
>
> SEC("socket")
next prev parent reply other threads:[~2024-01-03 0:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 19:30 [PATCH bpf 0/3] s390/bpf: Fix gotol with large offsets Ilya Leoshkevich
2024-01-02 19:30 ` [PATCH bpf 1/3] " Ilya Leoshkevich
2024-01-03 0:05 ` Yonghong Song
2024-01-03 18:42 ` John Fastabend
2024-01-02 19:30 ` [PATCH bpf 2/3] selftests/bpf: Double the size of test_loader log Ilya Leoshkevich
2024-01-03 0:41 ` Yonghong Song
2024-01-03 7:05 ` Ilya Leoshkevich
2024-01-03 18:15 ` Yonghong Song
2024-01-03 18:43 ` John Fastabend
2024-01-04 21:19 ` Alexei Starovoitov
2024-01-04 22:33 ` Alexei Starovoitov
2024-01-04 22:38 ` Yonghong Song
2024-01-02 19:30 ` [PATCH bpf 3/3] selftests/bpf: Test gotol with large offsets Ilya Leoshkevich
2024-01-03 0:44 ` Yonghong Song [this message]
2024-01-03 18:44 ` John Fastabend
2024-01-04 23:00 ` [PATCH bpf 0/3] s390/bpf: Fix " 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=fbdd0cc8-4078-40a7-9654-7e3c0cfce738@linux.dev \
--to=yonghong.song@linux.dev \
--cc=agordeev@linux.ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.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