From: Tejun Heo <htejun@gmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Sam Ravnborg <sam@ravnborg.org>,
linux-kbuild@vger.kernel.org,
Bill Nottingham <notting@redhat.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Kay Sievers <kay.sievers@vrfy.org>,
Jon Masters <jonathan@jonmasters.org>
Subject: Re: [PATCH 12/77] kbuild: implement modules.order
Date: Sat, 26 Jan 2008 13:22:21 +0900 [thread overview]
Message-ID: <479AB57D.3080805@gmail.com> (raw)
In-Reply-To: <200801261501.56198.rusty@rustcorp.com.au>
Hello, Rusty.
Rusty Russell wrote:
> On Friday 25 January 2008 14:29:12 Tejun Heo wrote:
>> Rusty Russell wrote:
>>> On Friday 25 January 2008 09:02:53 Sam Ravnborg wrote:
>>>> From: Tejun Heo <htejun@gmail.com>
>>>>
>>>> When driver modules are loaded by udev, what comes first in
>>>> modules.alias file is selected.
>>> Actually, I had occasion to look at this the other day, and in the
>>> modprobe version here every match is selected.
>> What do you mean by "every match is selected"?
>
> (I really can't tell if you're being facecious here, or you really don't know
> this, so I'll assume the latter...)
The third, actually. Somehow it wasn't clear to me what you meant by
'match', 'selected' and 'loaded'.
> modules.alias contains wildcards for what devices this module might match, eg.
>
> alias pci:v00008086d00002829sv*sd*bc*sc*i* ahci
>
> modprobe gets called to insert
> eg 'pci:v00008086d00002829sv000017AAsd000020A7bc01sc06i01'.
>
> After finding nothing in the normal config files, it looks for all matches in
> modules.alias, and inserts all those modules in the kernel.
Thanks for the clarification.
>>> And they'll be loaded in reverse order of the module.alias file.
>> What do you mean by 'loaded'?
>
> I mean modprobe loads the moduled into the kernel. Each module is loaded into
> memory, then sys_init_module() called to load the module, with args chosen
> from the modprobe.conf/modprobe.d files.
>
>>> Looks like Jon's latest git tree does the same.
>>>
>>> So, what does this patch actually fix?
>> This patch makes kbuild generate modules.order and another patch makes
>> depmod generate modules.alias or whatever else according to the order
>> specified in modules.order, so that modprobe prefer modules which is
>> earlier in the linking order.
>
> That's what the patch does, and you've explained that clearly multiple times.
>
> But I can only ask again, "what does this patch actually fix?". ie. what
> system got messed up because of the current behaviour? Where's the problem
> we're fixing? This might fix it as a side effect, but let's try harder than
> that, OK?
There was a non-deterministic behavior involving ata_piix and ahci
drivers on ich6. Both drivers support the chipset but ata_piix is less
capable while ahci might misbehave (chip bug). Generally, ahci should
be preferred as it seems the problem cases seem to be rare. When
drivers are linked in, this is forced by link order. When module is
loaded via udev, depending on how modules.alias is generated, sometimes
ata_piix is loaded and at other times ahci, causing 'oops,
hotplugging/NCQ doesn't work after kernel update' - 'what? it was
security update one liner'.
More generally, occasionally some feature or hardware is supported in
more than one ways. Maybe new driver is under development or the
feature has inherent dualism. Link order isn't a complete solution but
can cover most usual cases and at least gives configurable (by
developers) deterministic priority. So, these changes try to extend
link order to module loading too.
>> So, are you saying that modprobe chooses modules in the reverse order of
>> modules.alias file?
>
> That is precisely what I'm saying, and more.
Oops, then modprobe needs to be updated too. Jon, can you please put
this onto your to-do list too?
Thanks.
--
tejun
next prev parent reply other threads:[~2008-01-26 4:22 UTC|newest]
Thread overview: 100+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 21:58 kbuild: Preparing for merge window Sam Ravnborg
2008-01-24 22:00 ` Sam Ravnborg
2008-01-24 22:02 ` [PATCH 01/77] kernel-doc: fix xml output mode Sam Ravnborg
2008-01-24 22:02 ` [PATCH 02/77] kernel-doc: init kernel version Sam Ravnborg
2008-01-24 22:02 ` [PATCH 03/77] kernel-doc: single DOC: selection Sam Ravnborg
2008-01-24 22:02 ` [PATCH 04/77] kernel-doc: process functions, not DOC: Sam Ravnborg
2008-01-24 22:02 ` [PATCH 05/77] kernel-doc: use no-doc option Sam Ravnborg
2008-01-24 22:02 ` [PATCH 06/77] kernel-doc: new P directive for DOC: sections Sam Ravnborg
2008-01-24 22:02 ` [PATCH 07/77] kbuild: add 'includecheck' help text Sam Ravnborg
2008-01-24 22:02 ` [PATCH 08/77] kbuild: document versioncheck in make help Sam Ravnborg
2008-01-24 22:02 ` [PATCH 09/77] kbuild: Add missing srctree prefix for includecheck and versioncheck Sam Ravnborg
2008-01-24 22:02 ` [PATCH 10/77] convert drivers/base/power/Makefile to ccflags Sam Ravnborg
2008-01-24 22:02 ` [PATCH 11/77] aic7(3*x): fix firmware build Sam Ravnborg
2008-01-24 22:02 ` [PATCH 12/77] kbuild: implement modules.order Sam Ravnborg
2008-01-24 22:46 ` Greg KH
2008-01-25 3:19 ` Rusty Russell
2008-01-25 3:29 ` Tejun Heo
2008-01-25 5:00 ` Jon Masters
2008-01-26 4:01 ` Rusty Russell
2008-01-26 4:22 ` Tejun Heo [this message]
2008-01-26 4:28 ` Jon Masters
2008-01-26 4:52 ` Tejun Heo
2008-01-26 9:25 ` Rusty Russell
2008-01-27 4:33 ` Jon Masters
2008-01-28 1:47 ` Tejun Heo
2008-01-28 1:45 ` Tejun Heo
2008-01-28 3:20 ` Jon Masters
2008-01-29 3:29 ` Rusty Russell
2008-01-24 22:02 ` [PATCH 13/77] kconfig: if ncurses-devel is missing then say so Sam Ravnborg
2008-01-24 22:02 ` [PATCH 14/77] kbuild: declare the modpost error functions as printf like Sam Ravnborg
2008-01-24 22:02 ` [PATCH 15/77] kbuild: fix format string warnings in modpost Sam Ravnborg
2008-01-24 22:02 ` [PATCH 16/77] kbuild: fix a buffer overflow " Sam Ravnborg
2008-01-24 22:02 ` [PATCH 17/77] kconfig: use getopt() in conf.c for handling command line arguments Sam Ravnborg
2008-01-24 22:02 ` [PATCH 18/77] kbuild: support mercurial in setlocalversion Sam Ravnborg
2008-01-24 22:03 ` [PATCH 19/77] Kbuild: Clarify the rpm-related make packaging targets Sam Ravnborg
2008-01-24 22:03 ` [PATCH 20/77] kbuild: fix buglet in gcc-version.sh Sam Ravnborg
2008-01-24 22:03 ` [PATCH 21/77] kbuild: ignore *.order files Sam Ravnborg
2008-01-24 23:05 ` Tejun Heo
2008-01-24 22:03 ` [PATCH 22/77] kbuild: fixup genksyms usage/getopt Sam Ravnborg
2008-01-24 22:03 ` [PATCH 23/77] Remove references to "make dep" Sam Ravnborg
2008-01-24 22:03 ` [PATCH 24/77] A few corrections to include/linux/Kbuild Sam Ravnborg
2008-01-24 22:03 ` [PATCH 25/77] kbuild: fix installing external modules Sam Ravnborg
2008-01-24 22:03 ` [PATCH 26/77] CRIS: Remove 'TOPDIR' from Makefiles Sam Ravnborg
2008-01-25 9:38 ` Jesper Nilsson
2008-01-24 22:03 ` [PATCH 27/77] INFINIBAND: " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 28/77] FRV: Drop " Sam Ravnborg
2008-01-29 0:22 ` David Howells
2008-01-29 5:14 ` Sam Ravnborg
2008-01-24 22:03 ` [PATCH 29/77] FS: Remove dead code Sam Ravnborg
2008-01-24 22:03 ` [PATCH 30/77] kbuild: eradicate bashisms in scripts/patch-kernel Sam Ravnborg
2008-01-24 22:03 ` [PATCH 31/77] kbuild: change CONFIG_LOCALVERSION_AUTO to use a git-describe-ish format Sam Ravnborg
2008-01-24 22:03 ` [PATCH 32/77] kbuild: fix scripts/setlocalversion to avoid erroneous -dirty tag Sam Ravnborg
2008-01-24 22:03 ` [PATCH 33/77] kbuild: fix false positive -dirty tag caused by make-kpkg Sam Ravnborg
2008-01-24 22:03 ` [PATCH 34/77] kconfig: add hints/tips/tricks to Documentation/kbuild/kconfig-language.txt Sam Ravnborg
2008-01-24 22:03 ` [PATCH 35/77] kconfig: make kconfig MinGW friendly Sam Ravnborg
2008-01-24 22:03 ` [PATCH 36/77] kconfig: allow overriding symbols Sam Ravnborg
2008-01-24 22:03 ` [PATCH 37/77] kconfig: rename E_OR & friends to avoid name clash Sam Ravnborg
2008-01-24 22:03 ` [PATCH 38/77] kconfig: delete unused FILE_ and SYMBOL_ flags Sam Ravnborg
2008-01-24 22:03 ` [PATCH 39/77] kbuild: ignore cache modifiers for generating the tags files Sam Ravnborg
2008-01-24 22:03 ` [PATCH 40/77] kconfig: fix whitespace and sort includes in conf.c Sam Ravnborg
2008-01-24 22:03 ` [PATCH 41/77] kconfig: use C89 random functions " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 42/77] kbuild: clean up modpost.c Sam Ravnborg
2008-01-24 22:03 ` [PATCH 43/77] kbuild: scripts/mkmakefile: dynamic determination of output directory Sam Ravnborg
2008-01-24 22:03 ` [PATCH 44/77] kbuild: document 'make prepare' in 'make help' Sam Ravnborg
2008-01-24 22:03 ` [PATCH 45/77] kconfig: update-po-config info Sam Ravnborg
2008-01-24 22:03 ` [PATCH 46/77] kconfig: whitespace removing Sam Ravnborg
2008-01-24 22:03 ` [PATCH 47/77] kconfig: missing macros in gconfig Sam Ravnborg
2008-01-24 22:03 ` [PATCH 48/77] kconfig: gettext support for gconfig Sam Ravnborg
2008-01-24 22:03 ` [PATCH 49/77] kconfig: macro fix in menu.c Sam Ravnborg
2008-01-24 22:03 ` [PATCH 50/77] kconfig: gettext support for xconfig Sam Ravnborg
2008-01-24 22:03 ` [PATCH 51/77] kconfig: gettext support for menuconfig Sam Ravnborg
2008-01-24 22:03 ` [PATCH 52/77] kconfig: gettext support for lxdialog Sam Ravnborg
2008-01-24 22:03 ` [PATCH 53/77] kconfig: gettext support for config Sam Ravnborg
2008-01-24 22:03 ` [PATCH 54/77] kconfig: gconfig: symbol fix Sam Ravnborg
2008-01-24 22:03 ` [PATCH 55/77] kconfig: explicitly introduce expression list Sam Ravnborg
2008-01-24 22:03 ` [PATCH 56/77] kconfig: environment symbol support Sam Ravnborg
2008-01-24 22:03 ` [PATCH 57/77] kconfig: use environment option Sam Ravnborg
2008-01-24 22:03 ` [PATCH 58/77] kbuild: minor scripts/decodecode update Sam Ravnborg
2008-01-24 22:03 ` [PATCH 59/77] kbuild: fix so modpost can now check any .o file Sam Ravnborg
2008-01-24 22:03 ` [PATCH 60/77] kbuild: try harder to find symbol names in modpost Sam Ravnborg
2008-01-24 22:03 ` [PATCH 61/77] kbuild: code refactoring " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 62/77] kbuild: introduce blacklisting " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 63/77] kbuild: check section names consistently " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 64/77] all archs: consolidate init and exit sections in vmlinux.lds.h Sam Ravnborg
2008-01-24 22:03 ` [PATCH 65/77] compiler.h: introduce __section() Sam Ravnborg
2008-01-24 22:03 ` [PATCH 66/77] Use separate sections for __dev/__cpu/__mem code/data Sam Ravnborg
2008-01-24 22:03 ` [PATCH 67/77] kbuild: introduce new option to enhance section mismatch analysis Sam Ravnborg
2008-01-24 22:03 ` [PATCH 68/77] kbuild: link vmlinux.o before kallsyms passes Sam Ravnborg
2008-01-24 22:03 ` [PATCH 69/77] kbuild: use simpler section mismatch warnings in modpost Sam Ravnborg
2008-01-24 22:03 ` [PATCH 70/77] kbuild: introduce a few helpers " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 71/77] kbuild: simplified warning report " Sam Ravnborg
2008-01-24 22:03 ` [PATCH 72/77] kconfig: remove "enable" Sam Ravnborg
2008-01-24 22:03 ` [PATCH 73/77] kbuild: support ARCH=x86 in buildtar Sam Ravnborg
2008-01-24 22:03 ` [PATCH 74/77] remove __attribute_used__ Sam Ravnborg
2008-01-24 22:03 ` [PATCH 75/77] asm-generic/vmlix.lds.h: simplify __mem{init,exit}* dependencies Sam Ravnborg
2008-01-24 22:03 ` [PATCH 76/77] kconfig: tristate choices with mixed tristate and boolean values Sam Ravnborg
2008-01-24 22:03 ` [PATCH 77/77] kbuild: add verbose option to Section mismatch reporting in modpost Sam Ravnborg
2008-01-24 22:04 ` kbuild: Preparing for merge window Randy Dunlap
2008-01-24 22:09 ` Sam Ravnborg
2008-01-28 21:29 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=479AB57D.3080805@gmail.com \
--to=htejun@gmail.com \
--cc=gregkh@suse.de \
--cc=jonathan@jonmasters.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=notting@redhat.com \
--cc=rusty@rustcorp.com.au \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).