Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1731271 > unrolled thread
| Started by | Laura Abbott <labbott@redhat.com> |
|---|---|
| First post | 2017-09-13 00:40 +0200 |
| Last post | 2017-09-13 22:20 +0200 |
| Articles | 13 — 5 participants |
Back to article view | Back to linux.kernel
319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Laura Abbott <labbott@redhat.com> - 2017-09-13 00:40 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 01:20 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Laura Abbott <labbott@redhat.com> - 2017-09-13 17:50 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 19:30 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-13 19:50 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-13 21:20 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 21:50 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-14 00:50 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-15 20:00 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Cole Robinson <crobinso@redhat.com> - 2017-09-17 15:20 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Marc Haber <mh+linux-kernel@zugschlus.de> - 2017-09-18 10:30 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Chuck Ebbert <cebbert.lkml@gmail.com> - 2017-09-13 21:50 +0200
Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression Josef Bacik <jbacik@fb.com> - 2017-09-13 22:20 +0200
| From | Laura Abbott <labbott@redhat.com> |
|---|---|
| Date | 2017-09-13 00:40 +0200 |
| Subject | 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <up20x-7jY-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi,
Fedora got a bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1432684 of a regression with
automatic spice port
assignment. The libvirt team reduced this to the attached test
case run as follows:
In a separate terminal, qemu-kvm -vnc 127.0.0.1:0 to grab port 5900.
Then do this:
$ gcc bind-collision.c && ./a.out
bind: Address already in use
AF_INET check failed.
$ gcc -D CHECK_IPV6 bind-collision.c && ./a.out
AF_INET6 success
AF_INET success
$ gcc bind-collision.c && ./a.out
AF_INET success
Bisection showed this behavior to be caused by
commit 319554f284dda9f2737d09df82ba3610bd8ddea3
Author: Josef Bacik <jbacik@fb.com>
Date: Thu Jan 19 17:47:46 2017 -0500
inet: don't use sk_v6_rcv_saddr directly
When comparing two sockets we need to use inet6_rcv_saddr so we get
a NULL
sk_v6_rcv_saddr if the socket isn't AF_INET6, otherwise our
comparison function
can be wrong.
Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a
reuseport sk")
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
And reverting fixed both the standalone test case and the spice issue.
Any ideas?
Thanks,
Laura
[toc] | [next] | [standalone]
| From | Josef Bacik <jbacik@fb.com> |
|---|---|
| Date | 2017-09-13 01:20 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <up2Df-7P4-1@gated-at.bofh.it> |
| In reply to | #1731271 |
[Multipart message — attachments visible in raw view] — view raw
First I’m super sorry for the top post, I’m at plumbers and I forgot to upload my muttrc to my new cloud instance, so I’m screwed using outlook.
I have a completely untested, uncompiled patch that I think will fix the problem, would you mind giving it a go? Thanks,
Josef
On 9/12/17, 3:36 PM, "Laura Abbott" <labbott@redhat.com> wrote:
Hi,
Fedora got a bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1432684 of a regression with
automatic spice port
assignment. The libvirt team reduced this to the attached test
case run as follows:
In a separate terminal, qemu-kvm -vnc 127.0.0.1:0 to grab port 5900.
Then do this:
$ gcc bind-collision.c && ./a.out
bind: Address already in use
AF_INET check failed.
$ gcc -D CHECK_IPV6 bind-collision.c && ./a.out
AF_INET6 success
AF_INET success
$ gcc bind-collision.c && ./a.out
AF_INET success
Bisection showed this behavior to be caused by
commit 319554f284dda9f2737d09df82ba3610bd8ddea3
Author: Josef Bacik <jbacik@fb.com>
Date: Thu Jan 19 17:47:46 2017 -0500
inet: don't use sk_v6_rcv_saddr directly
When comparing two sockets we need to use inet6_rcv_saddr so we get
a NULL
sk_v6_rcv_saddr if the socket isn't AF_INET6, otherwise our
comparison function
can be wrong.
Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a
reuseport sk")
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
And reverting fixed both the standalone test case and the spice issue.
Any ideas?
Thanks,
Laura
[toc] | [prev] | [next] | [standalone]
| From | Laura Abbott <labbott@redhat.com> |
|---|---|
| Date | 2017-09-13 17:50 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <upi5j-Mv-3@gated-at.bofh.it> |
| In reply to | #1731277 |
On 09/12/2017 04:12 PM, Josef Bacik wrote: > First I’m super sorry for the top post, I’m at plumbers and I forgot to upload my muttrc to my new cloud instance, so I’m screwed using outlook. > > I have a completely untested, uncompiled patch that I think will fix the problem, would you mind giving it a go? Thanks, > > Josef Thanks for the quick turnaround. Unfortunately, the problem is still reproducible according to the reporter. Thanks, Laura
[toc] | [prev] | [next] | [standalone]
| From | Josef Bacik <jbacik@fb.com> |
|---|---|
| Date | 2017-09-13 19:30 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <upjE5-1RR-11@gated-at.bofh.it> |
| In reply to | #1731687 |
[Multipart message — attachments visible in raw view] — view raw
Sorry I thought I had made this other fix, can you apply this on top of the other one and try that? I have more things to try if this doesn’t work, sorry you are playing go between, but I want to make sure I know _which_ fix actually fixes the problem, and then clean up in followup patches. Thanks, Josef On 9/13/17, 8:45 AM, "Laura Abbott" <labbott@redhat.com> wrote: On 09/12/2017 04:12 PM, Josef Bacik wrote: > First I’m super sorry for the top post, I’m at plumbers and I forgot to upload my muttrc to my new cloud instance, so I’m screwed using outlook. > > I have a completely untested, uncompiled patch that I think will fix the problem, would you mind giving it a go? Thanks, > > Josef Thanks for the quick turnaround. Unfortunately, the problem is still reproducible according to the reporter. Thanks, Laura
[toc] | [prev] | [next] | [standalone]
| From | Cole Robinson <crobinso@redhat.com> |
|---|---|
| Date | 2017-09-13 19:50 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <upjXr-1Yv-17@gated-at.bofh.it> |
| In reply to | #1731738 |
On 09/13/2017 01:28 PM, Josef Bacik wrote: > Sorry I thought I had made this other fix, can you apply this on top of the other one and try that? I have more things to try if this doesn’t work, sorry you are playing go between, but I want to make sure I know _which_ fix actually fixes the problem, and then clean up in followup patches. Thanks, > I'm the bug reporter. I'll combine the two patches and report back Thanks, Cole
[toc] | [prev] | [next] | [standalone]
| From | Cole Robinson <crobinso@redhat.com> |
|---|---|
| Date | 2017-09-13 21:20 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <uplmy-2Zr-21@gated-at.bofh.it> |
| In reply to | #1731752 |
On 09/13/2017 01:40 PM, Cole Robinson wrote: > On 09/13/2017 01:28 PM, Josef Bacik wrote: >> Sorry I thought I had made this other fix, can you apply this on top of the other one and try that? I have more things to try if this doesn’t work, sorry you are playing go between, but I want to make sure I know _which_ fix actually fixes the problem, and then clean up in followup patches. Thanks, >> > > I'm the bug reporter. I'll combine the two patches and report back > Nope, issue is still present with both patches applied. Tried my own build and a package Laura provided Thanks, Cole
[toc] | [prev] | [next] | [standalone]
| From | Josef Bacik <jbacik@fb.com> |
|---|---|
| Date | 2017-09-13 21:50 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <uplPA-3aF-11@gated-at.bofh.it> |
| In reply to | #1731799 |
[Multipart message — attachments visible in raw view] — view raw
Alright thanks, this should fix it. Josef On 9/13/17, 12:14 PM, "Cole Robinson" <crobinso@redhat.com> wrote: On 09/13/2017 01:40 PM, Cole Robinson wrote: > On 09/13/2017 01:28 PM, Josef Bacik wrote: >> Sorry I thought I had made this other fix, can you apply this on top of the other one and try that? I have more things to try if this doesn’t work, sorry you are playing go between, but I want to make sure I know _which_ fix actually fixes the problem, and then clean up in followup patches. Thanks, >> > > I'm the bug reporter. I'll combine the two patches and report back > Nope, issue is still present with both patches applied. Tried my own build and a package Laura provided Thanks, Cole
[toc] | [prev] | [next] | [standalone]
| From | Cole Robinson <crobinso@redhat.com> |
|---|---|
| Date | 2017-09-14 00:50 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <upoDL-4Z2-3@gated-at.bofh.it> |
| In reply to | #1731818 |
On 09/13/2017 03:44 PM, Josef Bacik wrote: > Alright thanks, this should fix it. > Still no luck with all three patches applied to fedora 4.12.8-300 RPM. Pretty sure I didn't mess up the testing but since I rarely do kernel builds it's not impossible... Thanks, Cole
[toc] | [prev] | [next] | [standalone]
| From | Josef Bacik <jbacik@fb.com> |
|---|---|
| Date | 2017-09-15 20:00 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <uq34d-6fT-1@gated-at.bofh.it> |
| In reply to | #1731967 |
[Multipart message — attachments visible in raw view] — view raw
Finally got access to a box to run this down myself. This patch on top of the other patches fixes the problem for me, could you verify it works for you? Thanks, Josef On 9/13/17, 3:49 PM, "Cole Robinson" <crobinso@redhat.com> wrote: On 09/13/2017 03:44 PM, Josef Bacik wrote: > Alright thanks, this should fix it. > Still no luck with all three patches applied to fedora 4.12.8-300 RPM. Pretty sure I didn't mess up the testing but since I rarely do kernel builds it's not impossible... Thanks, Cole
[toc] | [prev] | [next] | [standalone]
| From | Cole Robinson <crobinso@redhat.com> |
|---|---|
| Date | 2017-09-17 15:20 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <uqHEl-8rI-9@gated-at.bofh.it> |
| In reply to | #1732989 |
On 09/15/2017 01:51 PM, Josef Bacik wrote: > Finally got access to a box to run this down myself. This patch on top of the other patches fixes the problem for me, could you verify it works for you? Thanks, > Yup I can confirm that patch fixes things when applied on top of the previous 3 patches. Thanks! Please tag those patches for stable releases if appropriate, this is affecting a decent amount of libvirt users Thanks, Cole
[toc] | [prev] | [next] | [standalone]
| From | Marc Haber <mh+linux-kernel@zugschlus.de> |
|---|---|
| Date | 2017-09-18 10:30 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <uqZBf-3G0-11@gated-at.bofh.it> |
| In reply to | #1733446 |
On Sun, Sep 17, 2017 at 09:17:13AM -0400, Cole Robinson wrote: > On 09/15/2017 01:51 PM, Josef Bacik wrote: > > Finally got access to a box to run this down myself. This patch on top of the other patches fixes the problem for me, could you verify it works for you? Thanks, > > > > Yup I can confirm that patch fixes things when applied on top of the > previous 3 patches. Thanks! Please tag those patches for stable releases > if appropriate, this is affecting a decent amount of libvirt users I can also confirm that these four patches fix things for me (on Debian) as well. Thanks! I would love to have this in one of Greg's next 4.13 releases. Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
[toc] | [prev] | [next] | [standalone]
| From | Chuck Ebbert <cebbert.lkml@gmail.com> |
|---|---|
| Date | 2017-09-13 21:50 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <uplPz-3aF-3@gated-at.bofh.it> |
| In reply to | #1731738 |
On Wed, 13 Sep 2017 17:28:25 +0000
Josef Bacik <jbacik@fb.com> wrote:
> Sorry I thought I had made this other fix, can you apply this on top
> of the other one and try that? I have more things to try if this
> doesn’t work, sorry you are playing go between, but I want to make
> sure I know _which_ fix actually fixes the problem, and then clean up
> in followup patches. Thanks,
>
> Josef
>
> On 9/13/17, 8:45 AM, "Laura Abbott" <labbott@redhat.com> wrote:
>
> On 09/12/2017 04:12 PM, Josef Bacik wrote:
> > First I’m super sorry for the top post, I’m at plumbers and I
> > forgot to upload my muttrc to my new cloud instance, so I’m screwed
> > using outlook.
> >
> > I have a completely untested, uncompiled patch that I think will
> > fix the problem, would you mind giving it a go? Thanks,
> >
> > Josef
>
> Thanks for the quick turnaround. Unfortunately, the problem is still
> reproducible according to the reporter.
>
> Thanks,
> Laura
I am confused by the patch that originally caused this:
if (sk->sk_family == AF_INET6)
return ipv6_rcv_saddr_equal(&sk->sk_v6_rcv_saddr,
- &sk2->sk_v6_rcv_saddr,
+ inet6_rcv_saddr(sk2),
sk->sk_rcv_saddr,
sk2->sk_rcv_saddr,
Shouldn't the first argument also be changed to use inet6_rcv_saddr()?
[toc] | [prev] | [next] | [standalone]
| From | Josef Bacik <jbacik@fb.com> |
|---|---|
| Date | 2017-09-13 22:20 +0200 |
| Subject | Re: 319554f284dd ("inet: don't use sk_v6_rcv_saddr directly") causes bind port regression |
| Message-ID | <upmiB-3zs-9@gated-at.bofh.it> |
| In reply to | #1731815 |
> On Sep 13, 2017, at 12:46 PM, Chuck Ebbert <cebbert.lkml@gmail.com> wrote: > > On Wed, 13 Sep 2017 17:28:25 +0000 > Josef Bacik <jbacik@fb.com> wrote: > >> Sorry I thought I had made this other fix, can you apply this on top >> of the other one and try that? I have more things to try if this >> doesn’t work, sorry you are playing go between, but I want to make >> sure I know _which_ fix actually fixes the problem, and then clean up >> in followup patches. Thanks, >> >> Josef >> >> On 9/13/17, 8:45 AM, "Laura Abbott" <labbott@redhat.com> wrote: >> >> On 09/12/2017 04:12 PM, Josef Bacik wrote: >>> First I’m super sorry for the top post, I’m at plumbers and I >>> forgot to upload my muttrc to my new cloud instance, so I’m screwed >>> using outlook. >>> >>> I have a completely untested, uncompiled patch that I think will >>> fix the problem, would you mind giving it a go? Thanks, >>> >>> Josef >> >> Thanks for the quick turnaround. Unfortunately, the problem is still >> reproducible according to the reporter. >> >> Thanks, >> Laura > > I am confused by the patch that originally caused this: > > if (sk->sk_family == AF_INET6) > return ipv6_rcv_saddr_equal(&sk->sk_v6_rcv_saddr, > - &sk2->sk_v6_rcv_saddr, > + inet6_rcv_saddr(sk2), > sk->sk_rcv_saddr, > sk2->sk_rcv_saddr, > > Shouldn't the first argument also be changed to use inet6_rcv_saddr()? No we know sk is IPv6 so it's alright to use directly. Thanks, Josef
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web