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: <CAJq09z7QBMq9sV9pU7OuGEynndso_n6m2-uQ1WaeKskwBQizAg@mail.gmail.com>
Date: Thu, 21 Dec 2023 00:45:43 -0300
From: Luiz Angelo Daros de Luca <luizluca@...il.com>
To: Alvin Šipraga <ALSI@...g-olufsen.dk>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, 
	"linus.walleij@...aro.org" <linus.walleij@...aro.org>, "andrew@...n.ch" <andrew@...n.ch>, 
	"f.fainelli@...il.com" <f.fainelli@...il.com>, "olteanv@...il.com" <olteanv@...il.com>, 
	"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>, 
	"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>, 
	"arinc.unal@...nc9.com" <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next v2 7/7] Revert "net: dsa: OF-ware slave_mii_bus"

> > This reverts commit fe7324b932222574a0721b80e72c6c5fe57960d1.
> >
> > The use of user_mii_bus is inappropriate when the hardware is described
> > with a device-tree [1].
> >
> > Since all drivers currently implementing ds_switch_ops.phy_{read,write}
> > were not updated to utilize the MDIO information from OF with the
> > generic "dsa user mii", they might not be affected by this change.
>
> /might/ not? I think this paragraph could be more precisely worded.

Yes, it should be "should". That's what I get from working instead of
sleeping. I checked all changes that have happened since that commit
touching drivers with the ds_switch_ops.phy_{read,write}. How about:

  The generic "dsa user mii" driver will only be utilized by drivers
implementing ds_switch_ops.phy_{read,write} and leaving
ds.user_mii_bus unallocated. For these drivers, no commits have been
made since the one being reverted that altered the usage of
ds.user_mii_bus. Consequently, these drivers should not be affected by
this change.

> > [1] https://lkml.kernel.org/netdev/20231213120656.x46fyad6ls7sqyzv@skbuf/T/#u
> >
> > Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
> > ---
> >  net/dsa/dsa.c | 7 +------
> >  1 file changed, 1 insertion(+), 6 deletions(-)
> >
> > diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> > index ac7be864e80d..cea364c81b70 100644
> > --- a/net/dsa/dsa.c
> > +++ b/net/dsa/dsa.c
> > @@ -15,7 +15,6 @@
> >  #include <linux/slab.h>
> >  #include <linux/rtnetlink.h>
> >  #include <linux/of.h>
> > -#include <linux/of_mdio.h>
> >  #include <linux/of_net.h>
> >  #include <net/dsa_stubs.h>
> >  #include <net/sch_generic.h>
> > @@ -626,7 +625,6 @@ static void dsa_switch_teardown_tag_protocol(struct dsa_switch *ds)
> >
> >  static int dsa_switch_setup(struct dsa_switch *ds)
> >  {
> > -     struct device_node *dn;
> >       int err;
> >
> >       if (ds->setup)
> > @@ -666,10 +664,7 @@ static int dsa_switch_setup(struct dsa_switch *ds)
> >
> >               dsa_user_mii_bus_init(ds);
> >
> > -             dn = of_get_child_by_name(ds->dev->of_node, "mdio");
> > -
> > -             err = of_mdiobus_register(ds->user_mii_bus, dn);
> > -             of_node_put(dn);
> > +             err = mdiobus_register(ds->user_mii_bus, dn);

This patch also has an obvious compile error that I didn't catch
during my builds. I might have built just a subtree and during each
step in a rebase, missing the last one. Sorry. It should be

            err = mdiobus_register(ds->user_mii_bus);

> >               if (err < 0)
> >                       goto free_user_mii_bus;
> >       }
> > --
> > 2.43.0
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ