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: <20220520172244.1f17f736@fixe.home>
Date:   Fri, 20 May 2022 17:22:44 +0200
From:   Clément Léger <clement.leger@...tlin.com>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     "Russell King (Oracle)" <linux@...linux.org.uk>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Magnus Damm <magnus.damm@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Herve Codina <herve.codina@...tlin.com>,
        Miquèl Raynal <miquel.raynal@...tlin.com>,
        Milan Stevanovic <milan.stevanovic@...com>,
        Jimmy Lalande <jimmy.lalande@...com>,
        Pascal Eberhard <pascal.eberhard@...com>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v5 05/13] net: pcs: add Renesas MII converter
 driver

Le Fri, 20 May 2022 11:49:14 +0300,
Vladimir Oltean <olteanv@...il.com> a écrit :

> On Fri, May 20, 2022 at 09:52:41AM +0200, Clément Léger wrote:
> > > Also, as a request to unbind this driver would be disasterous to users,
> > > I think you should set ".suppress_bind_attrs = true" to prevent the
> > > sysfs bind/unbind facility being available. This doesn't completely
> > > solve the problem.  
> > 
> > Acked. What should I do to make it more robust ? Should I use a
> > refcount per pdev and check that in the remove() callback to avoid
> > removing the pdev if used ?  
> 
> I wonder, if you call device_link_add(ds->dev, miic->dev, DL_FLAG_AUTOREMOVE_CONSUMER),
> wouldn't that be enough to auto-unbind the DSA driver when the MII
> converter driver unbinds?

I looiked at that a bit and I'm not sure how to achieve that cleanly. If
I need to create this link, then I need to do it once for the dsa switch
device. However, currently, the way I get the references to the MII
converter are via the pcs-handle properties which are for each port.

So, I'm not sure creating the link multiple times in miic_create() would
be ok and also, I'm not sure how to create the link once without adding
a specific property which points on the MII converter node and use that
to create the link by adding miic_device_add_link() for instance.

Do you have any preference ?

Thanks,

-- 
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ