Re: 2.1.105: 8390.h allergic to MODVERSIONS

Paul Gortmaker (linux@rasty.ph.unimelb.edu.au)
Wed, 10 Jun 1998 13:08:28 +1000 (EST)


> The changes to drivers/net/8390.h in 2.1.105 cause problems with
> CONFIG_MODVERSIONS. In particular, the calls to get_module_symbol at

Known problem and already discussed here - see below if you missed it.

Thanks,
Paul.
---------------

Subject: Re: kmod & 2.1.105
To: gaz@andrew.cmu.edu (Greg Zornetzer)
Date: Wed, 10 Jun 1998 03:07:45 +1000 (EST)

> On Mon, 8 Jun 1998, Javier Kohen wrote:
> >
> > I'm having problems at boot time, when the eth0 interface gets configured. Eth0 references ne2k-pci in modules.conf (though
> > the same happened with ne2000), and when it's to get loaded, it shows a message about kmod not active and not being able to
> > load the 8390 module. Despite that message, kmod works just fine for every other module (ie: vfat fs). My quickhack (well, the
> > eth module suggested it :)) was to insert a 'modprobe 8390' in my boot script before ne2k-pci gets loaded by ... kmod.
> Hi Javier,
>
> Are you running depmod -a anywhere in your startup scripts (before
> ethernet initialization)? Kmod still depends on having a list of module
> dependencies. What is the exact error message?

Actually the above happens when you enable CONFIG_MODVERSIONS along with
CONFIG_KMOD. The part of my patch that included the matching to versioned
kernel symbols from Richard Henderson wasn't included in 2.1.105 for some
reason.

I am waiting to see if it appears in 2.1.10x (Alan currently has it in
his diff set), and if not then I'll have to stick a __MODULE_STRING into
all the get_module_symbol calls to make versioned kernels do the Right Thing.

Paul.

diff -u --new-file --recursive --exclude-from ../exclude linux.vanilla/kernel/module.c linux/kernel/module.c
--- linux.vanilla/kernel/module.c Sun Jun 7 20:03:45 1998
+++ linux/kernel/module.c Sun Jun 7 20:23:46 1998
@@ -946,6 +946,23 @@
return len;
}

+/*
+ * String comparison for non-co-versioned kernel and module.
+ */
+static int
+ncv_strcmp(const char *a, const char *b)
+{
+ size_t alen = strlen(a), blen = strlen(b);
+
+ if (blen == alen + 10 && b[alen] == '_' && b[alen+1] == 'R')
+ return strncmp(a, b, alen);
+ else if (alen == blen + 10 && a[blen] == '_' && a[blen+1] == 'R')
+ return strncmp(a, b, blen);
+ else
+ return strcmp(a, b);
+}
+
+
/*
* Gets the address for a symbol in the given module. If modname is
* NULL, it looks for the name in any registered symbol table. If the
@@ -966,7 +983,7 @@
for (i = mp->nsyms, sym = mp->syms;
i > 0; --i, ++sym) {

- if (strcmp(sym->name, symname) == 0) {
+ if (ncv_strcmp(sym->name, symname) == 0) {
return sym->value;
}
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu