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
 
[an error occurred while processing this directive]
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36bfb8da08b90fb14108e99853f49d0f@manjaro.org>
Date: Mon, 29 Jul 2024 06:43:40 +0200
From: Dragan Simic <dsimic@...jaro.org>
To: Andrew Lunn <andrew@...n.ch>
Cc: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>,
 UNGLinuxDriver@...rochip.com, davem@...emloft.net, edumazet@...gle.com,
 f.fainelli@...il.com, gregkh@...uxfoundation.org, 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,
 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 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ