2021-01-25 00:21:46

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the bpf-next tree with the net-next tree

Hi all,

Today's linux-next merge of the bpf-next tree got a conflict in:

net/ipv4/tcp.c

between commit:

7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.")

from the net-next tree and commit:

9cacf81f8161 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE")

from the bpf-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc net/ipv4/tcp.c
index e1a17c6b473c,26aa923cf522..000000000000
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@@ -4160,18 -4098,13 +4160,20 @@@ static int do_tcp_getsockopt(struct soc
if (copy_from_user(&zc, optval, len))
return -EFAULT;
lock_sock(sk);
- err = tcp_zerocopy_receive(sk, &zc);
+ err = tcp_zerocopy_receive(sk, &zc, &tss);
+ err = BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sk, level, optname,
+ &zc, &len, err);
release_sock(sk);
- if (len >= offsetofend(struct tcp_zerocopy_receive, err))
- goto zerocopy_rcv_sk_err;
+ if (len >= offsetofend(struct tcp_zerocopy_receive, msg_flags))
+ goto zerocopy_rcv_cmsg;
switch (len) {
+ case offsetofend(struct tcp_zerocopy_receive, msg_flags):
+ goto zerocopy_rcv_cmsg;
+ case offsetofend(struct tcp_zerocopy_receive, msg_controllen):
+ case offsetofend(struct tcp_zerocopy_receive, msg_control):
+ case offsetofend(struct tcp_zerocopy_receive, flags):
+ case offsetofend(struct tcp_zerocopy_receive, copybuf_len):
+ case offsetofend(struct tcp_zerocopy_receive, copybuf_address):
case offsetofend(struct tcp_zerocopy_receive, err):
goto zerocopy_rcv_sk_err;
case offsetofend(struct tcp_zerocopy_receive, inq):


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-01-25 16:13:44

by Stanislav Fomichev

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net-next tree

Thanks, the merge resolution looks good to me!

On Sun, Jan 24, 2021 at 4:12 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> net/ipv4/tcp.c
>
> between commit:
>
> 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.")
>
> from the net-next tree and commit:
>
> 9cacf81f8161 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE")
>
> from the bpf-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc net/ipv4/tcp.c
> index e1a17c6b473c,26aa923cf522..000000000000
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@@ -4160,18 -4098,13 +4160,20 @@@ static int do_tcp_getsockopt(struct soc
> if (copy_from_user(&zc, optval, len))
> return -EFAULT;
> lock_sock(sk);
> - err = tcp_zerocopy_receive(sk, &zc);
> + err = tcp_zerocopy_receive(sk, &zc, &tss);
> + err = BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sk, level, optname,
> + &zc, &len, err);
> release_sock(sk);
> - if (len >= offsetofend(struct tcp_zerocopy_receive, err))
> - goto zerocopy_rcv_sk_err;
> + if (len >= offsetofend(struct tcp_zerocopy_receive, msg_flags))
> + goto zerocopy_rcv_cmsg;
> switch (len) {
> + case offsetofend(struct tcp_zerocopy_receive, msg_flags):
> + goto zerocopy_rcv_cmsg;
> + case offsetofend(struct tcp_zerocopy_receive, msg_controllen):
> + case offsetofend(struct tcp_zerocopy_receive, msg_control):
> + case offsetofend(struct tcp_zerocopy_receive, flags):
> + case offsetofend(struct tcp_zerocopy_receive, copybuf_len):
> + case offsetofend(struct tcp_zerocopy_receive, copybuf_address):
> case offsetofend(struct tcp_zerocopy_receive, err):
> goto zerocopy_rcv_sk_err;
> case offsetofend(struct tcp_zerocopy_receive, inq):

2021-01-25 18:17:01

by Arjun Roy

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net-next tree

On Sun, Jan 24, 2021 at 4:12 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> net/ipv4/tcp.c
>
> between commit:
>
> 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.")
>
> from the net-next tree and commit:
>
> 9cacf81f8161 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE")
>
> from the bpf-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>

The fix looks good, thank you.

-Arjun

> --
> Cheers,
> Stephen Rothwell
>
> diff --cc net/ipv4/tcp.c
> index e1a17c6b473c,26aa923cf522..000000000000
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@@ -4160,18 -4098,13 +4160,20 @@@ static int do_tcp_getsockopt(struct soc
> if (copy_from_user(&zc, optval, len))
> return -EFAULT;
> lock_sock(sk);
> - err = tcp_zerocopy_receive(sk, &zc);
> + err = tcp_zerocopy_receive(sk, &zc, &tss);
> + err = BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sk, level, optname,
> + &zc, &len, err);
> release_sock(sk);
> - if (len >= offsetofend(struct tcp_zerocopy_receive, err))
> - goto zerocopy_rcv_sk_err;
> + if (len >= offsetofend(struct tcp_zerocopy_receive, msg_flags))
> + goto zerocopy_rcv_cmsg;
> switch (len) {
> + case offsetofend(struct tcp_zerocopy_receive, msg_flags):
> + goto zerocopy_rcv_cmsg;
> + case offsetofend(struct tcp_zerocopy_receive, msg_controllen):
> + case offsetofend(struct tcp_zerocopy_receive, msg_control):
> + case offsetofend(struct tcp_zerocopy_receive, flags):
> + case offsetofend(struct tcp_zerocopy_receive, copybuf_len):
> + case offsetofend(struct tcp_zerocopy_receive, copybuf_address):
> case offsetofend(struct tcp_zerocopy_receive, err):
> goto zerocopy_rcv_sk_err;
> case offsetofend(struct tcp_zerocopy_receive, inq):

2021-02-14 21:16:42

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net-next tree

Hi all,

On Mon, 25 Jan 2021 11:12:23 +1100 Stephen Rothwell <[email protected]> wrote:
>
> Today's linux-next merge of the bpf-next tree got a conflict in:
>
> net/ipv4/tcp.c
>
> between commit:
>
> 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.")
>
> from the net-next tree and commit:
>
> 9cacf81f8161 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE")
>
> from the bpf-next tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc net/ipv4/tcp.c
> index e1a17c6b473c,26aa923cf522..000000000000
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@@ -4160,18 -4098,13 +4160,20 @@@ static int do_tcp_getsockopt(struct soc
> if (copy_from_user(&zc, optval, len))
> return -EFAULT;
> lock_sock(sk);
> - err = tcp_zerocopy_receive(sk, &zc);
> + err = tcp_zerocopy_receive(sk, &zc, &tss);
> + err = BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sk, level, optname,
> + &zc, &len, err);
> release_sock(sk);
> - if (len >= offsetofend(struct tcp_zerocopy_receive, err))
> - goto zerocopy_rcv_sk_err;
> + if (len >= offsetofend(struct tcp_zerocopy_receive, msg_flags))
> + goto zerocopy_rcv_cmsg;
> switch (len) {
> + case offsetofend(struct tcp_zerocopy_receive, msg_flags):
> + goto zerocopy_rcv_cmsg;
> + case offsetofend(struct tcp_zerocopy_receive, msg_controllen):
> + case offsetofend(struct tcp_zerocopy_receive, msg_control):
> + case offsetofend(struct tcp_zerocopy_receive, flags):
> + case offsetofend(struct tcp_zerocopy_receive, copybuf_len):
> + case offsetofend(struct tcp_zerocopy_receive, copybuf_address):
> case offsetofend(struct tcp_zerocopy_receive, err):
> goto zerocopy_rcv_sk_err;
> case offsetofend(struct tcp_zerocopy_receive, inq):

With the merge window about to open, this is a reminder that this
conflict still exists.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-02-14 21:57:09

by Arjun Roy

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net-next tree

On Sun, Feb 14, 2021 at 1:13 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> On Mon, 25 Jan 2021 11:12:23 +1100 Stephen Rothwell <[email protected]> wrote:
> >
> > Today's linux-next merge of the bpf-next tree got a conflict in:
> >
> > net/ipv4/tcp.c
> >
> > between commit:
> >
> > 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.")
> >
> > from the net-next tree and commit:
> >
> > 9cacf81f8161 ("bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE")
> >
> > from the bpf-next tree.
> >
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging. You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> >
> > diff --cc net/ipv4/tcp.c
> > index e1a17c6b473c,26aa923cf522..000000000000
> > --- a/net/ipv4/tcp.c
> > +++ b/net/ipv4/tcp.c
> > @@@ -4160,18 -4098,13 +4160,20 @@@ static int do_tcp_getsockopt(struct soc
> > if (copy_from_user(&zc, optval, len))
> > return -EFAULT;
> > lock_sock(sk);
> > - err = tcp_zerocopy_receive(sk, &zc);
> > + err = tcp_zerocopy_receive(sk, &zc, &tss);
> > + err = BPF_CGROUP_RUN_PROG_GETSOCKOPT_KERN(sk, level, optname,
> > + &zc, &len, err);
> > release_sock(sk);
> > - if (len >= offsetofend(struct tcp_zerocopy_receive, err))
> > - goto zerocopy_rcv_sk_err;
> > + if (len >= offsetofend(struct tcp_zerocopy_receive, msg_flags))
> > + goto zerocopy_rcv_cmsg;
> > switch (len) {
> > + case offsetofend(struct tcp_zerocopy_receive, msg_flags):
> > + goto zerocopy_rcv_cmsg;
> > + case offsetofend(struct tcp_zerocopy_receive, msg_controllen):
> > + case offsetofend(struct tcp_zerocopy_receive, msg_control):
> > + case offsetofend(struct tcp_zerocopy_receive, flags):
> > + case offsetofend(struct tcp_zerocopy_receive, copybuf_len):
> > + case offsetofend(struct tcp_zerocopy_receive, copybuf_address):
> > case offsetofend(struct tcp_zerocopy_receive, err):
> > goto zerocopy_rcv_sk_err;
> > case offsetofend(struct tcp_zerocopy_receive, inq):
>
> With the merge window about to open, this is a reminder that this
> conflict still exists.
>
Sorry, I was confused from the prior email. Is any action required at
the moment, or not?

Thanks,
-Arjun

> --
> Cheers,
> Stephen Rothwell

2021-02-14 23:34:48

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: manual merge of the bpf-next tree with the net-next tree

Hi Arjun,

On Sun, 14 Feb 2021 13:40:38 -0800 Arjun Roy <[email protected]> wrote:
>
> Sorry, I was confused from the prior email. Is any action required at
> the moment, or not?

No. This is just something that the net-next and bpf-next maintainers
need to sort out when they merge their trees.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature