Re: [PATCH 00/14] new modprobe, depmod features for alternative module dirs

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

 



Hi Michal,

The problem we're trying to solve is rebootless updates of modules
that aren't loaded.  While the Ksplice Uptrack software will update a
loaded module in memory, it also needs to update modules on disk so
that a later invocation of "modprobe" will find the updated code.

However, if you reboot the system, you want to revert to the modules
that came with the original kernel.  The updated modules might, for
example, rely on a symbol that wasn't exported by the original kernel.

Our strategy to make this work is that Uptrack doesn't touch
/lib/modules/`uname -r` at all.  Instead it maintains a separate tree
of modules.  However, we don't require that the distro's scripts or
the user are aware of our parallel modules tree.  We also don't run a
persistent daemon which could actively synchronize the two trees.
This means that invoking "modprobe" or "depmod" in the usual way needs
to do the right thing automatically.

As you correctly pointed out, this can be accomplished with thin
wrapper scripts around modprobe and depmod.  That's exactly what we do
at present.  The modprobe wrapper configures modprobe to use the
Ksplice modules tree.  The depmod wrapper runs depmod twice, once for
/lib/modules and once for our tree. We update both since a user who
installs a new third-party module will run "depmod -a" and then want
to use the module both currently and after the next time they reboot.

However, we'd like to eventually get Uptrack included in official
distro repositories, which probably means we can't divert core system
utilities.  After some conversations with Jon Masters, we worked out a
way to make module-init-tools configurable to our needs.
Specifically:

- We want to configure modprobe to look in our module tree, but only
if the Uptrack software is actually in use.
- We want to configure depmod to maintain dependency information for both trees.

This patch series implements most of what we need, though there's an
additional small change to depmod that I'll be sending soon.

Let me know if there's anything else I can clarify.

keegan

2010/12/20 Michal Marek <mmarek@xxxxxxx>:
> On 19.12.2010 09:51, Keegan McAllister wrote:
>> This patch series implements several new features for modprobe and depmod.
>>
>> modprobe gains a 'moduledir' config option, which can be used to override the
>> default path /lib/modules.
>>
>> depmod gains the ability to maintain dependency information for several
>> independent kernel module trees, with a separate config file for each.
>>
>> Automated tests are included.  The new features are documented in the
>> respective manpages.
>>
>> These features will be useful in simplifying the installation and packaging of
>> Ksplice Uptrack.  They may also be of more general interest.
>
> Can you expand on the ksplice use case a bit? Making hardcoded strings
> configurable is certainly useful, but the "alternatives" feature looks
> like it could be easily implemented with a script.
>
> Michal
>
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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