lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdXJr33KNq2C6+qPMF0WNkQAkn=hN5TeQLczQvDcQZE+eA@mail.gmail.com>
Date:   Tue, 22 Nov 2022 20:01:49 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Saeed Mahameed <saeed@...nel.org>
Cc:     Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org,
        Tariq Toukan <tariqt@...dia.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Matthieu Baerts <matthieu.baerts@...sares.net>,
        Jamie Bainbridge <jamie.bainbridge@...il.com>
Subject: Re: [PATCH net-next] tcp: Fix build break when CONFIG_IPV6=n

Hi Saeed,

On Tue, Nov 22, 2022 at 7:30 PM Saeed Mahameed <saeed@...nel.org> wrote:
> On 22 Nov 08:42, Eric Dumazet wrote:
> >On Tue, Nov 22, 2022 at 1:37 AM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> >> On Tue, Nov 22, 2022 at 10:31 AM Saeed Mahameed <saeed@...nel.org> wrote:
> >> > From: Saeed Mahameed <saeedm@...dia.com>
> >> >
> >> > The cited commit caused the following build break when CONFIG_IPV6 was
> >> > disabled
> >> >
> >> > net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
> >> > include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
> >> >
> >> > Fix by using inet6_rcv_saddr() macro which handles this situation
> >> > nicely.
> >> >
> >> > Fixes: d9282e48c608 ("tcp: Add listening address to SYN flood message")
> >> > Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
> >>
> >> Thanks for your patch!
> >>
> >> > --- a/net/ipv4/tcp_input.c
> >> > +++ b/net/ipv4/tcp_input.c
> >> > @@ -6843,9 +6843,9 @@ static bool tcp_syn_flood_action(const struct sock *sk, const char *proto)
> >> >
> >> >         if (!READ_ONCE(queue->synflood_warned) && syncookies != 2 &&
> >> >             xchg(&queue->synflood_warned, 1) == 0) {
> >> > -               if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
> >> > +               if (sk->sk_family == AF_INET6) {
> >>
> >> I think the IS_ENABLED() should stay, to make sure the IPV6-only
> >> code is optimized away when IPv6-support is disabled.
> >
> >Agreed.
>
> sending V2.
>
> but for the record, I don't think such a user exist. Simply if you care
> about such micro optimization, then you are serious enough not to disable
> IPv6.

Sure we do. It's not a micro-optimization, as it gets rid of a printed string.
Several defconfig disable CONFIG_IPV6. People who disable IPv6
because of limited memory welcome the removal of such unused code.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ