Re: depmod searches in dictionary order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 25, 2022 at 09:21:07AM +0800, Yang Yanchao wrote:
Hello,

depmod uses readdir to traverse /lib/modules/`uname -r`/,
but readdir sorts files by d_off.

It means that if I create two links with the same name in the weak-updates
directory, for example:

weak-updates/opt/kernel1/extra/a.ko ->/ opt/kernel1/extra/a.ko
weak-updates/opt/kernel2/extra/a.ko ->/ opt/kernel2/extra/a.ko

what are these kernel1 and kernel2?

depmod respects the priority configured in depmod.d for searching,
but here it seems you have only weak-updates configured in your depmod.d
so both of them have the same priority.

Looks rather like you want this in your config rather than using
symlinks:

	external * /opt/kernel1/extra /opt/kernel2/extra

but I don't know what kernel1 and kernel2 are in your setup.


Lucas De Marchi


Even with the same kernel, the same module may generate different
modules.dep on different machines, and it is impossible to predict which ko will be used

Maybe we can cache the directory name first and sort it?
If can develop in this direction, I will try to make a patch

Best Regards,
Yang Yanchao



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux