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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89i+c5yGoVV5t34diRrita=D1X_Aj-+fXJ2pw7jusnKGL3w@mail.gmail.com>
Date:   Tue, 12 Jul 2022 19:51:02 +0200
From:   Eric Dumazet <edumazet@...gle.com>
To:     Kuniyuki Iwashima <kuniyu@...zon.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>,
        Kuniyuki Iwashima <kuni1840@...il.com>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2 net] tcp/udp: Make early_demux back namespacified.

On Tue, Jul 12, 2022 at 7:38 PM Kuniyuki Iwashima <kuniyu@...zon.com> wrote:
>
> Commit e21145a9871a ("ipv4: namespacify ip_early_demux sysctl knob") made
> it possible to enable/disable early_demux on a per-netns basis.  Then, we
> introduced two knobs, tcp_early_demux and udp_early_demux, to switch it for
> TCP/UDP in commit dddb64bcb346 ("net: Add sysctl to toggle early demux for
> tcp and udp").  However, the .proc_handler() was wrong and actually
> disabled us from changing the behaviour in each netns.
>

>  static int proc_tfo_blackhole_detect_timeout(struct ctl_table *table,
>                                              int write, void *buffer,
>                                              size_t *lenp, loff_t *ppos)
> @@ -695,14 +640,18 @@ static struct ctl_table ipv4_net_table[] = {
>                 .data           = &init_net.ipv4.sysctl_udp_early_demux,
>                 .maxlen         = sizeof(u8),
>                 .mode           = 0644,
> -               .proc_handler   = proc_udp_early_demux
> +               .proc_handler   = proc_dou8vec_minmax,
> +               .extra1         = SYSCTL_ZERO,
> +               .extra2         = SYSCTL_ONE,

This does not belong to this patch.

It is IMO too late, some users might use:

echo 2 >/proc/sys/net/ipv4/udp_early_demux


>         },
>         {
>                 .procname       = "tcp_early_demux",
>                 .data           = &init_net.ipv4.sysctl_tcp_early_demux,
>                 .maxlen         = sizeof(u8),
>                 .mode           = 0644,
> -               .proc_handler   = proc_tcp_early_demux
> +               .proc_handler   = proc_dou8vec_minmax,
> +               .extra1         = SYSCTL_ZERO,
> +               .extra2         = SYSCTL_ONE,

Same here.

Again, fix the bug, and only the bug. Do not hide 'fixes' in an innocent patch.

There is a reason for that, we want each commit to have a clear description,
and we want to be able to revert a patch without having to think about
what needs
to be re-written.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ