All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Björn Töpel" <bjorn.topel@gmail.com>,
	"Jisheng Zhang" <jszhang@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	palmer@rivosinc.com
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Netdev <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Tong Tiangen <tongtiangen@huawei.com>
Subject: Re: [PATCH riscv-next] riscv: bpf: Fix eBPF's exception tables
Date: Wed, 19 Jan 2022 16:42:26 +0100	[thread overview]
Message-ID: <1b104397-8cb7-c5c2-92cb-11ce56c9a8de@iogearbox.net> (raw)
In-Reply-To: <CAJ+HfNiS7Ss0FJowPUrrKvuC+1Kn9gXb=VqNoqh3eWJDu=m4Mg@mail.gmail.com>

On 1/19/22 11:24 AM, Björn Töpel wrote:
> On Mon, 10 Jan 2022 at 18:05, Jisheng Zhang <jszhang@kernel.org> wrote:
>> On Tue, Jan 11, 2022 at 12:52:08AM +0800, Jisheng Zhang wrote:
>>> eBPF's exception tables needs to be modified to relative synchronously.
>>>
>>> Suggested-by: Tong Tiangen <tongtiangen@huawei.com>
>>> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> 
> Nice catch, and apologies for the slow response.
> 
> Acked-by: Björn Töpel <bjorn@kernel.org>
> 
>>> ---
>>>   arch/riscv/net/bpf_jit_comp64.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
>>> index 69bab7e28f91..44c97535bc15 100644
>>> --- a/arch/riscv/net/bpf_jit_comp64.c
>>> +++ b/arch/riscv/net/bpf_jit_comp64.c
>>> @@ -498,7 +498,7 @@ static int add_exception_handler(const struct bpf_insn *insn,
>>>        offset = pc - (long)&ex->insn;
>>>        if (WARN_ON_ONCE(offset >= 0 || offset < INT_MIN))
>>>                return -ERANGE;
>>> -     ex->insn = pc;
>>> +     ex->insn = offset;
>>
>> Hi Palmer,
>>
>> Tong pointed out this issue but there was something wrong with my email
>> forwarding address, so I didn't get his reply. Today, I searched on
>> lore.kernel.org just found his reply, sorry for inconvenience.
> 
> AFAIK, Jisheng's extable work is still in Palmer's for-next tree.
> 
> Daniel/Alexei: This eBPF must follow commit 1f77ed9422cb ("riscv:
> switch to relative extable and other improvements"), which is in
> Palmer's tree. It cannot go via bpf-next.

Thanks for letting us know, then lets route this fix via Palmer. Maybe he could
also add Fixes tags when applying, so stable can pick it up later on.

Cheers,
Daniel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Björn Töpel" <bjorn.topel@gmail.com>,
	"Jisheng Zhang" <jszhang@kernel.org>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	palmer@rivosinc.com
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, Netdev <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Tong Tiangen <tongtiangen@huawei.com>
Subject: Re: [PATCH riscv-next] riscv: bpf: Fix eBPF's exception tables
Date: Wed, 19 Jan 2022 16:42:26 +0100	[thread overview]
Message-ID: <1b104397-8cb7-c5c2-92cb-11ce56c9a8de@iogearbox.net> (raw)
In-Reply-To: <CAJ+HfNiS7Ss0FJowPUrrKvuC+1Kn9gXb=VqNoqh3eWJDu=m4Mg@mail.gmail.com>

On 1/19/22 11:24 AM, Björn Töpel wrote:
> On Mon, 10 Jan 2022 at 18:05, Jisheng Zhang <jszhang@kernel.org> wrote:
>> On Tue, Jan 11, 2022 at 12:52:08AM +0800, Jisheng Zhang wrote:
>>> eBPF's exception tables needs to be modified to relative synchronously.
>>>
>>> Suggested-by: Tong Tiangen <tongtiangen@huawei.com>
>>> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> 
> Nice catch, and apologies for the slow response.
> 
> Acked-by: Björn Töpel <bjorn@kernel.org>
> 
>>> ---
>>>   arch/riscv/net/bpf_jit_comp64.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
>>> index 69bab7e28f91..44c97535bc15 100644
>>> --- a/arch/riscv/net/bpf_jit_comp64.c
>>> +++ b/arch/riscv/net/bpf_jit_comp64.c
>>> @@ -498,7 +498,7 @@ static int add_exception_handler(const struct bpf_insn *insn,
>>>        offset = pc - (long)&ex->insn;
>>>        if (WARN_ON_ONCE(offset >= 0 || offset < INT_MIN))
>>>                return -ERANGE;
>>> -     ex->insn = pc;
>>> +     ex->insn = offset;
>>
>> Hi Palmer,
>>
>> Tong pointed out this issue but there was something wrong with my email
>> forwarding address, so I didn't get his reply. Today, I searched on
>> lore.kernel.org just found his reply, sorry for inconvenience.
> 
> AFAIK, Jisheng's extable work is still in Palmer's for-next tree.
> 
> Daniel/Alexei: This eBPF must follow commit 1f77ed9422cb ("riscv:
> switch to relative extable and other improvements"), which is in
> Palmer's tree. It cannot go via bpf-next.

Thanks for letting us know, then lets route this fix via Palmer. Maybe he could
also add Fixes tags when applying, so stable can pick it up later on.

Cheers,
Daniel

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-01-19 15:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 16:52 [PATCH riscv-next] riscv: bpf: Fix eBPF's exception tables Jisheng Zhang
2022-01-10 16:52 ` Jisheng Zhang
2022-01-10 16:57 ` Jisheng Zhang
2022-01-10 16:57   ` Jisheng Zhang
2022-01-19 10:24   ` Björn Töpel
2022-01-19 10:24     ` Björn Töpel
2022-01-19 15:42     ` Daniel Borkmann [this message]
2022-01-19 15:42       ` Daniel Borkmann
2022-01-19 15:59       ` Björn Töpel
2022-01-19 15:59         ` Björn Töpel
2022-01-19 18:04         ` Palmer Dabbelt
2022-01-19 18:04           ` Palmer Dabbelt
2022-01-19 21:46           ` Palmer Dabbelt
2022-01-19 21:46             ` Palmer Dabbelt

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=1b104397-8cb7-c5c2-92cb-11ce56c9a8de@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii@kernel.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=jszhang@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    --cc=songliubraving@fb.com \
    --cc=tongtiangen@huawei.com \
    --cc=yhs@fb.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.