[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzaG2q-4qFZ0WDhbfPJL70T7z84CE=MoKkT2peOXrx28cw@mail.gmail.com>
Date: Mon, 11 Jan 2021 12:39:05 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Gilad Reti <gilad.reti@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>, bpf <bpf@...r.kernel.org>,
Yonghong Song <yhs@...com>,
Alexei Starovoitov <ast@...nel.org>,
Networking <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Signed-off-by: giladreti <gilad.reti@...il.com>
On Mon, Jan 11, 2021 at 8:06 AM Gilad Reti <gilad.reti@...il.com> wrote:
>
> On Mon, Jan 11, 2021, 17:55 Daniel Borkmann <daniel@...earbox.net> wrote:
> >
> > Hello Gilad,
> >
> > On 1/11/21 4:31 PM, giladreti wrote:
> > > Added support for pointer to mem register spilling, to allow the verifier
> > > to track pointer to valid memory addresses. Such pointers are returned
> > > for example by a successful call of the bpf_ringbuf_reserve helper.
> > >
> > > This patch was suggested as a solution by Yonghong Song.
> >
> > The SoB should not be in subject line but as part of the commit message instead
> > and with proper name, e.g.
> >
> > Signed-off-by: Gilad Reti <gilad.reti@...il.com>
> >
> > For subject line, please use a short summary that fits the patch prefixed with
> > the subsystem "bpf: [...]", see also [0] as an example. Thanks.
> >
> > It would be good if you could also add a BPF selftest for this [1].
> >
> > [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=e22d7f05e445165e58feddb4e40cc9c0f94453bc
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/
> > https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/verifier/spill_fill.c
> >
>
> Sure. Thanks for your guidance. As you can probably tell, I am new to
> kernel code contribution (in fact this is a first time for me).
> Should I try to submit this patch again?
In addition to all already mentioned things, also make sure you have
[PATCH bpf] prefix in the subject, to identify that this is a bug fix
for the bpf tree.
Also you missed adding Fixes tag, please add this:
Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier
support for it")
And yes, please re-submit with all the feedback incorporated
(including the selftest).
>
> Sorry in advance for all the overhead I may be causing to you...
>
> > > ---
> > > kernel/bpf/verifier.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> > > index 17270b8404f1..36af69fac591 100644
> > > --- a/kernel/bpf/verifier.c
> > > +++ b/kernel/bpf/verifier.c
> > > @@ -2217,6 +2217,8 @@ static bool is_spillable_regtype(enum bpf_reg_type type)
> > > case PTR_TO_RDWR_BUF:
> > > case PTR_TO_RDWR_BUF_OR_NULL:
> > > case PTR_TO_PERCPU_BTF_ID:
> > > + case PTR_TO_MEM:
> > > + case PTR_TO_MEM_OR_NULL:
> > > return true;
> > > default:
> > > return false;
> > >
> >
Powered by blists - more mailing lists