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: <32be761b-cebc-48e4-a36f-bbf90654df82@gmail.com>
Date: Wed, 24 Jul 2024 21:42:48 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Lucas De Marchi <lucas.demarchi@...el.com>, Andrew Lunn <andrew@...n.ch>
Cc: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>,
 UNGLinuxDriver@...rochip.com, davem@...emloft.net, edumazet@...gle.com,
 gregkh@...uxfoundation.org, kuba@...nel.org, linux-kernel@...r.kernel.org,
 linux-usb@...r.kernel.org, mcgrof@...nel.org, netdev@...r.kernel.org,
 pabeni@...hat.com, woojung.huh@...rochip.com
Subject: Re: [PATCH] net: usb: lan78xx: add weak dependency with micrel phy
 module



On 7/24/2024 9:25 PM, Lucas De Marchi wrote:
> On Thu, Jul 25, 2024 at 12:57:05AM GMT, Andrew Lunn wrote:
>>> For the commented case, I have included only one phy because it is 
>>> the hardware
>>> that I have, but other phy devices (modules) are possible and they 
>>> can be some.
>>
>> So this the whole whacker a mole problem. It works for you but fails
>> for 99% of users. How is this helping us?
> 
> no, this is the first instance that was found/added.
> 
> if you declare a softdep what happens is that the dep is loaded first
> (needed or not) and your module is loaded after that
> 
> if you declare a weakdep, you are just instructing the tools that the
> module may or may not be needed.  Any module today that does a
> request_module("foo") could be a candidate to migrate from
> MODULE_SOFTDEP("pre: foo") to the new weakdep, as long as it handles
> properly the module being loaded ondemand as opposed to using
> request_module() to just synchronize the module being loaded.
> 
>>
>> Maybe a better solution is to first build an initramfs with
>> everything, plus the kitchen sink. Boot it, and then look at what has
>> been loaded in order to get the rootfs mounted. Then update the
>> initramfs with just what is needed? That should be pretty generic,
>> with throw out networking ig NFS root is not used, just load JFFS2 and
>> a NAND driver if it was used for the rootfs, etc.
> 
> that works for development systems or if you are fine tuning it for each
> system you have. It doesn't work for a generic distro with the kitchen
> sink of modules and still trying to minimize the initrd without end user
> intervention. So it works for 99% of users.

OK, but 'config USB_LAN78XX' does have a number of 'select' meaning 
those are hard functional dependencies, and so those should be more than 
a hint that these modules are necessary. Why should we encode that 
information twice: once in Kconfig and another time within the module .c 
file itself? Cannot we have better tooling to help build an initramfs 
which does include everything that has been selected?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ