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: <20231120134818.e2k673xsjec5scy5@skbuf>
Date: Mon, 20 Nov 2023 15:48:18 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Luiz Angelo Daros de Luca <luizluca@...il.com>, netdev@...r.kernel.org,
	linus.walleij@...aro.org, alsi@...g-olufsen.dk, andrew@...n.ch,
	f.fainelli@...il.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, arinc.unal@...nc9.com
Subject: Re: [net-next 2/2] net: dsa: realtek: load switch variants on demand

Hi Krzysztof,

On Mon, Nov 20, 2023 at 10:20:13AM +0100, Krzysztof Kozlowski wrote:
> No, why do you need it? You should not need MODULE_ALIAS() in normal
> cases. If you need it, usually it means your device ID table is wrong
> (e.g. misses either entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is
> not a substitute for incomplete ID table.
> 
> Entire abstraction/macro is pointless and make the code less readable.

Are you saying that the line

MODULE_DEVICE_TABLE(of, realtek_common_of_match);

should be put in all of realtek-mdio.c, realtek-smi.c, rtl8365mb.c and
rtl8366rb.c, but not in realtek-common.c?

There are 5 kernel modules involved, 2 for interfaces and 2 for switches.

Even if the same OF device ID table could be used to load multiple
modules, I'm not sure
(a) how to avoid loading the interface driver which will not be used
    (SMI if it's a MDIO-connected switch, or MDIO if it's an SMI
    connected switch)
(b) how to ensure that the drivers are loaded in the right order, i.e.
    the switch drivers are loaded before the interface drivers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ