Re: [PATCH] fix os release detection in module-init-tools-0.9.6

Rusty Russell (rusty@rustcorp.com.au)
Sun, 29 Dec 2002 16:54:58 +1100


In message <957BD1C2BF3CD411B6C500A0C944CA2601AA1378@pdsmsx32.pd.intel.com> you
write:
> > Now, why do you want /proc/ksyms exactly? I'm not hugely opposed to
> > it, but it's rarely what people actually want, since it contains only
> > exported symbols.
> The two things make me want ksyms... ;-)

> First, if I'm a stranger to a system, how can I know if a feature
> (preemptive, for example) is on/off on that?

Um, you read the .config, which hopefully is stored somewhere.
(Although you could resurrect the /proc/config patch which goes around
every so often). There are many things you can't tell by reading
/proc/ksyms.

> Second, when module version is back, how can I know what is the magic
> version number on the system?

Well, the new version system is a little different. (I've been
distracted by other things, but un-bitrotting that patch is on my TODO
list). The idea is that modules have a ".versions" section, which
contains the versions of all the symbols it exports and requires.
When the module is loaded into a kernel with version support, the
version of each symbol is compared: if it's different, the module
can't be loaded. If it's missing (or the entire section is missing),
the module can be loaded, but taints the kernel.

This allows versioned modules to be loaded into an unversioned kernel
and vice versa, which might be useful. modprobe just needs a
--strip-version option to rename the .versions section (or remove it,
or whatever), and the picture is complete.

Hope that clarifies,
Rusty.

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/