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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8a2831c4f2d49469d5af04c03bb1a5b@manjaro.org>
Date: Mon, 29 Jul 2024 08:29:13 +0200
From: Dragan Simic <dsimic@...jaro.org>
To: Greg KH <gregkh@...uxfoundation.org>, mcgrof@...nel.org,
 jtornosm@...hat.com
Cc: Andrew Lunn <andrew@...n.ch>, UNGLinuxDriver@...rochip.com,
 davem@...emloft.net, edumazet@...gle.com, f.fainelli@...il.com,
 kuba@...nel.org, linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-usb@...r.kernel.org, lucas.demarchi@...el.com, masahiroy@...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

Hello Greg, Jose and Luis,

On 2024-07-29 08:13, Greg KH wrote:
> On Mon, Jul 29, 2024 at 06:43:40AM +0200, Dragan Simic wrote:
>> On 2024-07-28 22:57, Andrew Lunn wrote:
>> > > In other words, this patch doesn't subtract anything.  Instead, it
>> > > just
>> > > adds a weakdep link between the lan78xx and micrel modules, so the
>> > > kernel
>> > > itself can report that dependency, which may actually result in one
>> > > more
>> > > PHY driver added to a generated initial ramdisk.
>> >
>> > So at the moment, does the initramfs contain all PHY modules? I guess
>> > it does, because you have no knowledge which are actually needed. And
>> > this does not help you in any way, as you said, it does not subtract
>> > anything.
>> 
>> Basically, an initial ramdisk shouldn't contain any PHY modules that
>> aren't automatically detected as needed on a particular system, for
>> which the initial ramdisk is built.  That's how selecting modules
>> while building the initial ramdisks works.  On the other hand, if it's
>> some initial ramdisk built by a Linux distribution and intended to
>> support multiple systems or boards, it may contain whatever the
>> distribution sees fit.
>> 
>> Having weakdeps defined actually does help here.  For example, a Linux
>> distribution mentioned above no longer needs to hand-craft the rules
>> for initial ramdisk generation for the PHY modules that should be put
>> into an initial ramdisk together with the lan78xx driver, if the Linux
>> distribution chooses to include the lax78xx driver.  Having weakdep(s)
>> defined makes the kernel do that instead.  Also, there's no point in
>> including every single PHY driver module, because not all of them are
>> needed for a particular selection of MAC drivers, which comes from the
>> intended purpose of the initial ramdisk built by a Linux distribution,
>> i.e. the target architecture, supported board category, etc.
>> 
>> Let's also keep in mind that including all PHY modules into an initial
>> ramdisk inevitably makes it larger, which often isn't an option for
>> resource-constrained embedded systems.
> 
> resource-constrained embedded systems know their dependancies and their
> hardware configurations, so I don't see how the weak-deps help at all
> here.
> 
> You are arguing two different things it seems, neither of which this
> change helps out at all with, so I will provide a:
> 
>   Nacked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> here until it gets straightened out.

Quite frankly, all this makes me wonder why weakdeps were merged into
the mainline kernel [1] with no real consumers?  Perhaps this is good
time for Jose and Luis to chime in.

[1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/module.h?id=61842868de13aa7fd7391c626e889f4d6f1450bf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ