BPF List
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
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>,
	 Ilya Leoshkevich <iii@linux.ibm.com>
Subject: RE: [PATCH bpf 1/3] s390/bpf: Fix gotol with large offsets
Date: Wed, 03 Jan 2024 10:42:27 -0800	[thread overview]
Message-ID: <6595aa93aaf56_256122085f@john.notmuch> (raw)
In-Reply-To: <20240102193531.3169422-2-iii@linux.ibm.com>

Ilya Leoshkevich wrote:
> The gotol implementation uses a wrong data type for the offset: it
> should be s32, not s16.
> 
> Fixes: c690191e23d8 ("s390/bpf: Implement unconditional jump with 32-bit offset")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  arch/s390/net/bpf_jit_comp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
> index bf06b7283f0c..c7fbeedeb0a4 100644
> --- a/arch/s390/net/bpf_jit_comp.c
> +++ b/arch/s390/net/bpf_jit_comp.c
> @@ -779,7 +779,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp,
>  				 int i, bool extra_pass, u32 stack_depth)
>  {
>  	struct bpf_insn *insn = &fp->insnsi[i];
> -	s16 branch_oc_off = insn->off;
> +	s32 branch_oc_off = insn->off;
>  	u32 dst_reg = insn->dst_reg;
>  	u32 src_reg = insn->src_reg;
>  	int last, insn_count = 1;
> -- 
> 2.43.0
> 
> 

Acked-by: John Fastabend <john.fastabend@gmail.com>

  parent reply	other threads:[~2024-01-03 18:42 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 [this message]
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
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=6595aa93aaf56_256122085f@john.notmuch \
    --to=john.fastabend@gmail.com \
    --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