Messages in this thread | | | Date | Mon, 11 Jan 1999 09:27:37 -0600 | From | Michael Elizabeth Chastain <> | Subject | Re: 2.2.0-pre6: Problem with module versions since... |
| |
Hi Martijn,
> Anyway, insmod detects a "versioned" kernel by looking for a symbol > "Using_Versions", defined in kernel/ksyms.c. The symbol is not in > /proc/ksyms, /System.map nor anywhere else in the source tree. insmod > can't find it either.
Yes, this has been broken since 2.1.21 (not 121, *21*), released in January, 1997. I noticed it in December 1997. Here's a reprint of the bug report I filed with linux-kernel. All the information in it is still current.
Specifically, 2.1.21 changed Rules.make so that LX_OBJS and OX_OBJS no longer get compiled with -DMODVERSIONS. So kernel/ksyms.c never turns on 'Using_Versions'. Every kernel built since 2.1.21 appears to insmod as a non-versioned kernel.
As soon as someone fixes this, two years of accumulated untested CONFIG_MODVERSIONS funkiness will spring out.
Michael Elizabeth Chastain <mailto:mec@shout.net> "love without fear"
===
From mec Mon Dec 29 23:25:46 1997 To: linux-kernel@vger.rutgers.edu Subject: CONFIG_MODVERSIONS bug
Hello kernel hackers,
I think I've found a long-standing bug with CONFIG_MODVERSIONS.
Take a look at this paragraph from kernel/ksyms.c, 2.1.76:
#ifdef MODVERSIONS const struct module_symbol __export_Using_Versions __attribute__((section("__ksymtab"))) = { 1 /* Version version */, "Using_Versions" }; #endif
The problem is that MODVERSIONS is defined only when compiling *modules*. It's not defined when compiling kernel/ksyms.c because kernel/ksyms.c is part of the resident kernel.
This construction has been in the kernel for a long time. It's also in 2.1.76, 2.1.50, 2.1.32, 2.1.16, 2.0.33, and 2.0. Back in the 2.0.XX kernels, Rules.make said -DMODVERSIONS for $(LX_OBJS) and $(OX_OBJS). But it doesn't any more. And it probably shouldn't. The right fix is probably to change MODVERSIONS above to CONFIG_MODVERSIONS.
I have no patch for this one because I've got enough patches in progress already.
How I found this: I was chasing some other potential bugs in insmod 2.1.71 when I noticed that new_get_kernel_symbols returned 0. Then I checked /proc/ksyms, and there was no "Using_Versions" there.
Michael Chastain <mailto:mec@shout.net> "love without fear"
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |