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: <CANn89iLefNuOXBdf2Cg8SbwAXCm=X+qZ-Cqkx8CQ=vESv-LYSg@mail.gmail.com>
Date: Wed, 28 Feb 2024 10:28:28 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, 
	David Ahern <dsahern@...nel.org>, Jiri Pirko <jiri@...dia.com>, netdev@...r.kernel.org, 
	eric.dumazet@...il.com
Subject: Re: [PATCH v2 net-next 03/15] ipv6: addrconf_disable_ipv6() optimizations

On Wed, Feb 28, 2024 at 9:51 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> On Wed, Feb 28, 2024 at 3:52 AM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > On Tue, 27 Feb 2024 15:01:48 +0000 Eric Dumazet wrote:
> > > +     if (p == &net->ipv6.devconf_dflt->disable_ipv6) {
> > > +             WRITE_ONCE(*p, newf);
> > > +             return 0;
> > > +     }
> > > +
> > >       if (!rtnl_trylock())
> > >               return restart_syscall();
> > >
> > > -     net = (struct net *)table->extra2;
> > >       old = *p;
> > >       WRITE_ONCE(*p, newf);
> > >
> > > -     if (p == &net->ipv6.devconf_dflt->disable_ipv6) {
> > > -             rtnl_unlock();
> > > -             return 0;
> > > -     }
> > > -
> > > -     if (p == &net->ipv6.devconf_all->disable_ipv6) {
> > > -             WRITE_ONCE(net->ipv6.devconf_dflt->disable_ipv6, newf);
> >
> > Why is this line going away? We pulled up the handling of devconf_all
> > not devconf_dflt
> >
>
> Good catch, I simply misread the line.

I note that addrconf_disable_policy() does not have a similar write.

When writing on net->ipv6.devconf_all->disable_policy, we loop over all idev
to call addrconf_disable_policy_idev(),
but we do _not_ change net->ipv6.devconf_dflt->disable_policy

This seems quite strange we change net->ipv6.devconf_dflt->disable_ipv6 when
user only wanted to change net->ipv6.devconf_all->disable_policy

Oh well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ