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: <2bad372ce42a06254c7767fd658d2a66@walle.cc>
Date:   Fri, 28 Oct 2022 11:17:40 +0200
From:   Michael Walle <michael@...le.cc>
To:     Vladimir Oltean <vladimir.oltean@....com>
Cc:     netdev@...r.kernel.org, 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>,
        Heiko Thiery <heiko.thiery@...il.com>
Subject: Re: [RFC PATCH net-next 0/3] Autoload DSA tagging driver when
 dynamically changing protocol

Am 2022-10-27 23:08, schrieb Vladimir Oltean:
> This patch set solves the issue reported by Michael and Heiko here:
> https://lore.kernel.org/lkml/20221027113248.420216-1-michael@walle.cc/
> making full use of Michael's suggestion of having two modaliases: one
> gets used for loading the tagging protocol when it's the default one
> reported by the switch driver, the other gets loaded at user's request,
> by name.
> 
>   # modinfo tag_ocelot_8021q
>   filename:       
> /lib/modules/6.1.0-rc2+/kernel/net/dsa/tag_ocelot_8021q.ko
>   alias:          dsa_tag-ocelot-8021q
>   alias:          dsa_tag-20

I know that name clashes are not to be expected because one is a 
numerical id
and the other is a string, but it might still make sense to have a 
different
prefix so the user of modinfo can figure that out more easily.

Presuming that backwards compatibility is not an issue, maybe:
dsa_tag-ocelot-8021q
dsa_tag-id-20

>   license:        GPL v2
>   depends:        dsa_core
>   intree:         Y
>   name:           tag_ocelot_8021q
>   vermagic:       6.1.0-rc2+ SMP preempt mod_unload modversions aarch64
> 
> Tested on NXP LS1028A-RDB with the following device tree addition:
> 
> &mscc_felix_port4 {
> 	dsa-tag-protocol = "ocelot-8021q";
> };
> 
> &mscc_felix_port5 {
> 	dsa-tag-protocol = "ocelot-8021q";
> };
> 
> CONFIG_NET_DSA and everything that depends on it is built as module.
> Everything auto-loads, and "cat /sys/class/net/eno2/dsa/tagging" shows
> "ocelot-8021q". Traffic works as well.
> 
> Note: I included patch 1/3 because I secretly want to see if the
> patchwork build tests pass :) But I also submitted it separately to
> "net" already, and without it, patch 3/3 doesn't apply to current 
> net-next.
> So if you want to leave comments on 1/3, make sure to leave them here:
> https://patchwork.kernel.org/project/netdevbpf/patch/20221027145439.3086017-1-vladimir.oltean@nxp.com/
> 
> Vladimir Oltean (3):
>   net: dsa: fall back to default tagger if we can't load the one from 
> DT
>   net: dsa: provide a second modalias to tag proto drivers based on
>     their name
>   net: dsa: autoload tag driver module on tagging protocol change
> 
>  include/net/dsa.h          |  5 +++--
>  net/dsa/dsa.c              |  8 +++++---
>  net/dsa/dsa2.c             | 15 +++++++++++----
>  net/dsa/dsa_priv.h         |  4 ++--
>  net/dsa/master.c           |  4 ++--
>  net/dsa/tag_ar9331.c       |  6 ++++--
>  net/dsa/tag_brcm.c         | 16 ++++++++++------
>  net/dsa/tag_dsa.c          | 11 +++++++----
>  net/dsa/tag_gswip.c        |  6 ++++--
>  net/dsa/tag_hellcreek.c    |  6 ++++--
>  net/dsa/tag_ksz.c          | 21 +++++++++++++--------
>  net/dsa/tag_lan9303.c      |  6 ++++--
>  net/dsa/tag_mtk.c          |  6 ++++--
>  net/dsa/tag_ocelot.c       | 11 +++++++----
>  net/dsa/tag_ocelot_8021q.c |  6 ++++--
>  net/dsa/tag_qca.c          |  6 ++++--
>  net/dsa/tag_rtl4_a.c       |  6 ++++--
>  net/dsa/tag_rtl8_4.c       |  7 +++++--
>  net/dsa/tag_rzn1_a5psw.c   |  6 ++++--
>  net/dsa/tag_sja1105.c      | 11 +++++++----
>  net/dsa/tag_trailer.c      |  6 ++++--
>  net/dsa/tag_xrs700x.c      |  6 ++++--
>  22 files changed, 116 insertions(+), 63 deletions(-)

FWIW
Tested-by: Michael Walle <michael@...le.cc> # on kontron-sl28 w/ 
ocelot_8021q

Thanks,
-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ