[lkml]   [1997]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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:

const struct module_symbol __export_Using_Versions
__attribute__((section("__ksymtab"))) = {
1 /* Version version */, "Using_Versions"

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

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
"love without fear"

 \ /
  Last update: 2005-03-22 13:40    [W:0.015 / U:6.004 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site