netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf
@ 2019-10-01 17:37 Brian Vazquez
  2019-10-01 17:37 ` [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt Brian Vazquez
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Brian Vazquez @ 2019-10-01 17:37 UTC (permalink / raw)
  To: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann, David S . Miller
  Cc: Stanislav Fomichev, linux-kernel, netdev, bpf, Brian Vazquez

This patch series fixes some fd leaks in tcp_rtt and
test_sockopt_inherit bpf prof_tests.

Brian Vazquez (2):
  selftests/bpf: test_progs: don't leak server_fd in tcp_rtt
  selftests/bpf: test_progs: don't leak server_fd in
    test_sockopt_inherit

 tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c         | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.23.0.444.g18eeb5a265-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt
  2019-10-01 17:37 [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Brian Vazquez
@ 2019-10-01 17:37 ` Brian Vazquez
  2019-10-02  3:17   ` Andrii Nakryiko
  2019-10-01 17:37 ` [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit Brian Vazquez
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 12+ messages in thread
From: Brian Vazquez @ 2019-10-01 17:37 UTC (permalink / raw)
  To: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann, David S . Miller
  Cc: Stanislav Fomichev, linux-kernel, netdev, bpf, Brian Vazquez

server_fd needs to be closed if pthread can't be created.

Fixes: 8a03222f508b ("selftests/bpf: test_progs: fix client/server race
in tcp_rtt")
Cc: Stanislav Fomichev <sdf@google.com>

Signed-off-by: Brian Vazquez <brianvv@google.com>
---
 tools/testing/selftests/bpf/prog_tests/tcp_rtt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
index a82da555b1b02..f4cd60d6fba2e 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
@@ -260,13 +260,14 @@ void test_tcp_rtt(void)
 
 	if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
 				      (void *)&server_fd)))
-		goto close_cgroup_fd;
+		goto close_server_fd;
 
 	pthread_mutex_lock(&server_started_mtx);
 	pthread_cond_wait(&server_started, &server_started_mtx);
 	pthread_mutex_unlock(&server_started_mtx);
 
 	CHECK_FAIL(run_test(cgroup_fd, server_fd));
+close_server_fd:
 	close(server_fd);
 close_cgroup_fd:
 	close(cgroup_fd);
-- 
2.23.0.444.g18eeb5a265-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-01 17:37 [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Brian Vazquez
  2019-10-01 17:37 ` [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt Brian Vazquez
@ 2019-10-01 17:37 ` Brian Vazquez
  2019-10-02  3:20   ` Andrii Nakryiko
  2019-10-01 17:47 ` [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Stanislav Fomichev
  2019-10-01 23:02 ` Daniel Borkmann
  3 siblings, 1 reply; 12+ messages in thread
From: Brian Vazquez @ 2019-10-01 17:37 UTC (permalink / raw)
  To: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann, David S . Miller
  Cc: Stanislav Fomichev, linux-kernel, netdev, bpf, Brian Vazquez

server_fd needs to be close if pthread can't be created.

Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
Cc: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Brian Vazquez <brianvv@google.com>
---
 tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
index 6cbeea7b4bf16..8547ecbdc61ff 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
@@ -195,7 +195,7 @@ static void run_test(int cgroup_fd)
 
 	if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
 				      (void *)&server_fd)))
-		goto close_bpf_object;
+		goto close_server_fd;
 
 	pthread_mutex_lock(&server_started_mtx);
 	pthread_cond_wait(&server_started, &server_started_mtx);
-- 
2.23.0.444.g18eeb5a265-goog


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf
  2019-10-01 17:37 [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Brian Vazquez
  2019-10-01 17:37 ` [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt Brian Vazquez
  2019-10-01 17:37 ` [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit Brian Vazquez
@ 2019-10-01 17:47 ` Stanislav Fomichev
  2019-10-01 23:02 ` Daniel Borkmann
  3 siblings, 0 replies; 12+ messages in thread
From: Stanislav Fomichev @ 2019-10-01 17:47 UTC (permalink / raw)
  To: Brian Vazquez
  Cc: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann,
	David S . Miller, Stanislav Fomichev, linux-kernel, netdev, bpf

On 10/01, Brian Vazquez wrote:
> This patch series fixes some fd leaks in tcp_rtt and
> test_sockopt_inherit bpf prof_tests.
Thanks! For the series:

Reviewed-by: Stanislav Fomichev <sdf@google.com>

> Brian Vazquez (2):
>   selftests/bpf: test_progs: don't leak server_fd in tcp_rtt
>   selftests/bpf: test_progs: don't leak server_fd in
>     test_sockopt_inherit
> 
>  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
>  tools/testing/selftests/bpf/prog_tests/tcp_rtt.c         | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)
> 
> -- 
> 2.23.0.444.g18eeb5a265-goog
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf
  2019-10-01 17:37 [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Brian Vazquez
                   ` (2 preceding siblings ...)
  2019-10-01 17:47 ` [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Stanislav Fomichev
@ 2019-10-01 23:02 ` Daniel Borkmann
  3 siblings, 0 replies; 12+ messages in thread
From: Daniel Borkmann @ 2019-10-01 23:02 UTC (permalink / raw)
  To: Brian Vazquez
  Cc: Brian Vazquez, Alexei Starovoitov, David S . Miller,
	Stanislav Fomichev, linux-kernel, netdev, bpf

On Tue, Oct 01, 2019 at 10:37:26AM -0700, Brian Vazquez wrote:
> This patch series fixes some fd leaks in tcp_rtt and
> test_sockopt_inherit bpf prof_tests.
> 
> Brian Vazquez (2):
>   selftests/bpf: test_progs: don't leak server_fd in tcp_rtt
>   selftests/bpf: test_progs: don't leak server_fd in
>     test_sockopt_inherit
> 
>  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
>  tools/testing/selftests/bpf/prog_tests/tcp_rtt.c         | 3 ++-
>  2 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt
  2019-10-01 17:37 ` [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt Brian Vazquez
@ 2019-10-02  3:17   ` Andrii Nakryiko
  0 siblings, 0 replies; 12+ messages in thread
From: Andrii Nakryiko @ 2019-10-02  3:17 UTC (permalink / raw)
  To: Brian Vazquez
  Cc: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

On Tue, Oct 1, 2019 at 10:39 AM Brian Vazquez <brianvv@google.com> wrote:
>
> server_fd needs to be closed if pthread can't be created.
>
> Fixes: 8a03222f508b ("selftests/bpf: test_progs: fix client/server race
> in tcp_rtt")

Fixes tag hast to be on single line, no wrapping. Besides that:

Acked-by: Andrii Nakryiko <andriin@fb.com>

> Cc: Stanislav Fomichev <sdf@google.com>
>
> Signed-off-by: Brian Vazquez <brianvv@google.com>
> ---
>  tools/testing/selftests/bpf/prog_tests/tcp_rtt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
> index a82da555b1b02..f4cd60d6fba2e 100644
> --- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
> +++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
> @@ -260,13 +260,14 @@ void test_tcp_rtt(void)
>
>         if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
>                                       (void *)&server_fd)))
> -               goto close_cgroup_fd;
> +               goto close_server_fd;
>
>         pthread_mutex_lock(&server_started_mtx);
>         pthread_cond_wait(&server_started, &server_started_mtx);
>         pthread_mutex_unlock(&server_started_mtx);
>
>         CHECK_FAIL(run_test(cgroup_fd, server_fd));
> +close_server_fd:
>         close(server_fd);
>  close_cgroup_fd:
>         close(cgroup_fd);
> --
> 2.23.0.444.g18eeb5a265-goog
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-01 17:37 ` [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit Brian Vazquez
@ 2019-10-02  3:20   ` Andrii Nakryiko
  2019-10-02  3:42     ` Brian Vazquez
  0 siblings, 1 reply; 12+ messages in thread
From: Andrii Nakryiko @ 2019-10-02  3:20 UTC (permalink / raw)
  To: Brian Vazquez
  Cc: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez <brianvv@google.com> wrote:
>

I don't think there is a need to add "test_progs:" to subject, "
test_sockopt_inherit" is specific enough ;)

> server_fd needs to be close if pthread can't be created.

typo: closed

>
> Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
> Cc: Stanislav Fomichev <sdf@google.com>
> Signed-off-by: Brian Vazquez <brianvv@google.com>
> ---

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
> index 6cbeea7b4bf16..8547ecbdc61ff 100644
> --- a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
> +++ b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
> @@ -195,7 +195,7 @@ static void run_test(int cgroup_fd)
>
>         if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
>                                       (void *)&server_fd)))
> -               goto close_bpf_object;
> +               goto close_server_fd;
>
>         pthread_mutex_lock(&server_started_mtx);
>         pthread_cond_wait(&server_started, &server_started_mtx);
> --
> 2.23.0.444.g18eeb5a265-goog
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-02  3:20   ` Andrii Nakryiko
@ 2019-10-02  3:42     ` Brian Vazquez
  2019-10-02  8:55       ` Daniel Borkmann
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Vazquez @ 2019-10-02  3:42 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Brian Vazquez, Alexei Starovoitov, Daniel Borkmann,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

Thanks for reviewing the patches Andrii!

Although Daniel fixed them and applied them correctly.

On Tue, Oct 1, 2019 at 8:20 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez <brianvv@google.com> wrote:
> >
>
> I don't think there is a need to add "test_progs:" to subject, "
> test_sockopt_inherit" is specific enough ;)
>
> > server_fd needs to be close if pthread can't be created.
>
> typo: closed
>
> >
> > Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
> > Cc: Stanislav Fomichev <sdf@google.com>
> > Signed-off-by: Brian Vazquez <brianvv@google.com>
> > ---
>
> Acked-by: Andrii Nakryiko <andriin@fb.com>
>
> >  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
> > index 6cbeea7b4bf16..8547ecbdc61ff 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c
> > @@ -195,7 +195,7 @@ static void run_test(int cgroup_fd)
> >
> >         if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
> >                                       (void *)&server_fd)))
> > -               goto close_bpf_object;
> > +               goto close_server_fd;
> >
> >         pthread_mutex_lock(&server_started_mtx);
> >         pthread_cond_wait(&server_started, &server_started_mtx);
> > --
> > 2.23.0.444.g18eeb5a265-goog
> >

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-02  3:42     ` Brian Vazquez
@ 2019-10-02  8:55       ` Daniel Borkmann
  2019-10-02 20:30         ` Andrii Nakryiko
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Borkmann @ 2019-10-02  8:55 UTC (permalink / raw)
  To: Brian Vazquez
  Cc: Andrii Nakryiko, Brian Vazquez, Alexei Starovoitov,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

On Tue, Oct 01, 2019 at 08:42:30PM -0700, Brian Vazquez wrote:
> Thanks for reviewing the patches Andrii!
> 
> Although Daniel fixed them and applied them correctly.

After last kernel/maintainer summit at LPC, I reworked all my patchwork scripts [0]
which I use for bpf trees in order to further reduce manual work and add more sanity
checks at the same time. Therefore, the broken Fixes: tag was a good test-case. ;-)

Thanks,
Daniel

  [0] https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/pw.git/

> On Tue, Oct 1, 2019 at 8:20 PM Andrii Nakryiko
> <andrii.nakryiko@gmail.com> wrote:
> >
> > On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez <brianvv@google.com> wrote:
> > >
> >
> > I don't think there is a need to add "test_progs:" to subject, "
> > test_sockopt_inherit" is specific enough ;)
> >
> > > server_fd needs to be close if pthread can't be created.
> >
> > typo: closed
> >
> > > Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
> > > Cc: Stanislav Fomichev <sdf@google.com>
> > > Signed-off-by: Brian Vazquez <brianvv@google.com>
> > > ---
> >
> > Acked-by: Andrii Nakryiko <andriin@fb.com>
> >
> > >  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-02  8:55       ` Daniel Borkmann
@ 2019-10-02 20:30         ` Andrii Nakryiko
  2019-10-02 21:50           ` Daniel Borkmann
  0 siblings, 1 reply; 12+ messages in thread
From: Andrii Nakryiko @ 2019-10-02 20:30 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Brian Vazquez, Brian Vazquez, Alexei Starovoitov,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

On Wed, Oct 2, 2019 at 1:56 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
>
> On Tue, Oct 01, 2019 at 08:42:30PM -0700, Brian Vazquez wrote:
> > Thanks for reviewing the patches Andrii!
> >
> > Although Daniel fixed them and applied them correctly.
>
> After last kernel/maintainer summit at LPC, I reworked all my patchwork scripts [0]
> which I use for bpf trees in order to further reduce manual work and add more sanity
> checks at the same time. Therefore, the broken Fixes: tag was a good test-case. ;-)

Do you scripts also capitalize first word after libbpf: prefix? Is
that intentional? Is that a recommended subject casing:

"libbpf: Do awesome stuff" vs "libbpf: do awesome stuff"?

>
> Thanks,
> Daniel
>
>   [0] https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/pw.git/
>
> > On Tue, Oct 1, 2019 at 8:20 PM Andrii Nakryiko
> > <andrii.nakryiko@gmail.com> wrote:
> > >
> > > On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez <brianvv@google.com> wrote:
> > > >
> > >
> > > I don't think there is a need to add "test_progs:" to subject, "
> > > test_sockopt_inherit" is specific enough ;)
> > >
> > > > server_fd needs to be close if pthread can't be created.
> > >
> > > typo: closed
> > >
> > > > Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
> > > > Cc: Stanislav Fomichev <sdf@google.com>
> > > > Signed-off-by: Brian Vazquez <brianvv@google.com>
> > > > ---
> > >
> > > Acked-by: Andrii Nakryiko <andriin@fb.com>
> > >
> > > >  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-02 20:30         ` Andrii Nakryiko
@ 2019-10-02 21:50           ` Daniel Borkmann
  2019-10-02 21:53             ` Andrii Nakryiko
  0 siblings, 1 reply; 12+ messages in thread
From: Daniel Borkmann @ 2019-10-02 21:50 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: Brian Vazquez, Brian Vazquez, Alexei Starovoitov,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

On Wed, Oct 02, 2019 at 01:30:14PM -0700, Andrii Nakryiko wrote:
> On Wed, Oct 2, 2019 at 1:56 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
> > On Tue, Oct 01, 2019 at 08:42:30PM -0700, Brian Vazquez wrote:
> > > Thanks for reviewing the patches Andrii!
> > >
> > > Although Daniel fixed them and applied them correctly.
> >
> > After last kernel/maintainer summit at LPC, I reworked all my patchwork scripts [0]
> > which I use for bpf trees in order to further reduce manual work and add more sanity
> > checks at the same time. Therefore, the broken Fixes: tag was a good test-case. ;-)
> 
> Do you scripts also capitalize first word after libbpf: prefix? Is
> that intentional? Is that a recommended subject casing:
> 
> "libbpf: Do awesome stuff" vs "libbpf: do awesome stuff"?

Right now we have a bit of a mix on that regard, and basically what the
pw-apply script from [0] is doing, is the following to provide some more
context:

- Pulls the series mbox specified by series id from patchwork, dumps all
  necessary information about the series, e.g. whether it's complete and
  all patches are present, etc.
- Pushes the mbox through mb2q which is a script that x86 maintainers and
  few others use for their patch management and spills out a new mbox.
  This is effectively 'normalizing' the patches from the mbox to bring in
  some more consistency, meaning it adds Link: tags to every patch based
  on the message id and checks whether the necessary mailing list aka
  bpf was in Cc, so we always have lore BPF archive links, sorts tags so
  they all have a consistent order, it allows to propagate Acked-by,
  Reviewed-by, Tested-by tags from cover letter into the individual
  patches, it also capitalizes the first word after the subsystem prefix.
- It applies and merges the resulting mbox, and performs additional checks
  for the newly added commit range, that is, it checks whether Fixes tags
  are correctly formatted, whether the commit exists at all in the tree or
  whether subject / sha is wrong, and throws warnings to me so I can fix
  them up if needed or toss out the series again worst case, as well as
  checks whether SOB from the patch authors is present and matches their
  name.
- It allows to set the patches from the series into accepted state in
  patchwork.

So overall less manual work / checks than what used to be before while
improving / ensuring more consistency in the commits at the same time.
If you have further suggestions / improvements / patches to pw.git,
happy to hear. :)

Thanks,
Daniel

> >   [0] https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/pw.git/
> >
> > > On Tue, Oct 1, 2019 at 8:20 PM Andrii Nakryiko
> > > <andrii.nakryiko@gmail.com> wrote:
> > > >
> > > > On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez <brianvv@google.com> wrote:
> > > > >
> > > >
> > > > I don't think there is a need to add "test_progs:" to subject, "
> > > > test_sockopt_inherit" is specific enough ;)
> > > >
> > > > > server_fd needs to be close if pthread can't be created.
> > > >
> > > > typo: closed
> > > >
> > > > > Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
> > > > > Cc: Stanislav Fomichev <sdf@google.com>
> > > > > Signed-off-by: Brian Vazquez <brianvv@google.com>
> > > > > ---
> > > >
> > > > Acked-by: Andrii Nakryiko <andriin@fb.com>
> > > >
> > > > >  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit
  2019-10-02 21:50           ` Daniel Borkmann
@ 2019-10-02 21:53             ` Andrii Nakryiko
  0 siblings, 0 replies; 12+ messages in thread
From: Andrii Nakryiko @ 2019-10-02 21:53 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Brian Vazquez, Brian Vazquez, Alexei Starovoitov,
	David S . Miller, Stanislav Fomichev, open list, Networking, bpf

On Wed, Oct 2, 2019 at 2:51 PM Daniel Borkmann <daniel@iogearbox.net> wrote:
>
> On Wed, Oct 02, 2019 at 01:30:14PM -0700, Andrii Nakryiko wrote:
> > On Wed, Oct 2, 2019 at 1:56 AM Daniel Borkmann <daniel@iogearbox.net> wrote:
> > > On Tue, Oct 01, 2019 at 08:42:30PM -0700, Brian Vazquez wrote:
> > > > Thanks for reviewing the patches Andrii!
> > > >
> > > > Although Daniel fixed them and applied them correctly.
> > >
> > > After last kernel/maintainer summit at LPC, I reworked all my patchwork scripts [0]
> > > which I use for bpf trees in order to further reduce manual work and add more sanity
> > > checks at the same time. Therefore, the broken Fixes: tag was a good test-case. ;-)
> >
> > Do you scripts also capitalize first word after libbpf: prefix? Is
> > that intentional? Is that a recommended subject casing:
> >
> > "libbpf: Do awesome stuff" vs "libbpf: do awesome stuff"?
>
> Right now we have a bit of a mix on that regard, and basically what the
> pw-apply script from [0] is doing, is the following to provide some more
> context:
>
> - Pulls the series mbox specified by series id from patchwork, dumps all
>   necessary information about the series, e.g. whether it's complete and
>   all patches are present, etc.
> - Pushes the mbox through mb2q which is a script that x86 maintainers and
>   few others use for their patch management and spills out a new mbox.
>   This is effectively 'normalizing' the patches from the mbox to bring in
>   some more consistency, meaning it adds Link: tags to every patch based
>   on the message id and checks whether the necessary mailing list aka
>   bpf was in Cc, so we always have lore BPF archive links, sorts tags so
>   they all have a consistent order, it allows to propagate Acked-by,
>   Reviewed-by, Tested-by tags from cover letter into the individual
>   patches, it also capitalizes the first word after the subsystem prefix.
> - It applies and merges the resulting mbox, and performs additional checks
>   for the newly added commit range, that is, it checks whether Fixes tags
>   are correctly formatted, whether the commit exists at all in the tree or
>   whether subject / sha is wrong, and throws warnings to me so I can fix
>   them up if needed or toss out the series again worst case, as well as
>   checks whether SOB from the patch authors is present and matches their
>   name.
> - It allows to set the patches from the series into accepted state in
>   patchwork.
>
> So overall less manual work / checks than what used to be before while
> improving / ensuring more consistency in the commits at the same time.
> If you have further suggestions / improvements / patches to pw.git,
> happy to hear. :)
>

"libbpf: Captilized subj" looks weird, but I can live with that. I'll
post subsequent patches with that casing. I'm glad a lot of that stuff
is semi-automated, it's terrible to have to always check all that
manually :)

> Thanks,
> Daniel
>
> > >   [0] https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/pw.git/
> > >
> > > > On Tue, Oct 1, 2019 at 8:20 PM Andrii Nakryiko
> > > > <andrii.nakryiko@gmail.com> wrote:
> > > > >
> > > > > On Tue, Oct 1, 2019 at 10:40 AM Brian Vazquez <brianvv@google.com> wrote:
> > > > > >
> > > > >
> > > > > I don't think there is a need to add "test_progs:" to subject, "
> > > > > test_sockopt_inherit" is specific enough ;)
> > > > >
> > > > > > server_fd needs to be close if pthread can't be created.
> > > > >
> > > > > typo: closed
> > > > >
> > > > > > Fixes: e3e02e1d9c24 ("selftests/bpf: test_progs: convert test_sockopt_inherit")
> > > > > > Cc: Stanislav Fomichev <sdf@google.com>
> > > > > > Signed-off-by: Brian Vazquez <brianvv@google.com>
> > > > > > ---
> > > > >
> > > > > Acked-by: Andrii Nakryiko <andriin@fb.com>
> > > > >
> > > > > >  tools/testing/selftests/bpf/prog_tests/sockopt_inherit.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-10-02 21:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 17:37 [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Brian Vazquez
2019-10-01 17:37 ` [PATCH bpf 1/2] selftests/bpf: test_progs: don't leak server_fd in tcp_rtt Brian Vazquez
2019-10-02  3:17   ` Andrii Nakryiko
2019-10-01 17:37 ` [PATCH bpf 2/2] selftests/bpf: test_progs: don't leak server_fd in test_sockopt_inherit Brian Vazquez
2019-10-02  3:20   ` Andrii Nakryiko
2019-10-02  3:42     ` Brian Vazquez
2019-10-02  8:55       ` Daniel Borkmann
2019-10-02 20:30         ` Andrii Nakryiko
2019-10-02 21:50           ` Daniel Borkmann
2019-10-02 21:53             ` Andrii Nakryiko
2019-10-01 17:47 ` [PATCH bpf 0/2] selftests/bpf: test_progs: don't leak fd in bpf Stanislav Fomichev
2019-10-01 23:02 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).