Re: CONFIG_MODVERSIONS problem identified

From: Stuart MacDonald (stuartm@connecttech.com)
Date: Thu Jul 27 2000 - 09:33:39 EST


From: "Mikael Pettersson" <mikpe@csd.uu.se>
> This is what happens when the bug hits you:
> 5. `make fastdep' visits lib/ and updates modversions.h;
> modversions.h gets modification time T0 = CURRENT_TIME.

**

> 6. `make fastdep' next visits arch/i386/kernel/;
> i386_ksyms.ver is made (and perhaps a few other),
> and gets modification time T1 = CURRENT_TIME; however,
> on a fast machine, T1 == T0 with non-zero probability.
> 7. `make' now compares T0 with T1; since !(T1 > T0), `make'
> concludes that modversions.h doesn't need to be updated.
> (See remake.c:check_dep() in the GNU make sources.)
> 8. arch/i386/kernel/ is the last subdir with exported symbols
> visited by `make fastdep', so we have no further opportunities
> to remake modversions.h in other subdirs; thus, modversions.h
> remains incomplete without #including i386_ksyms.ver.
> 9. The kernel's symbol table will now have have unexpanded version
> fields for the i386_ksyms symbols, leading to symbol mismatches
> at attempts to load modules.
>
> Possible solutions:
> A. Increase the resolution of file modification times to microseconds.
> Probably not practical right now (2.4 release, glibc binary compat.),
> but IMHO necessary in the near future.
> B. Change GNU make to use >= instead of > when comparing modification
> times. Not an option -- incompatible semantic change.
> C. Change the Linux kernel to work around this problem. We either:
> C1. forcibly remake modversions.h in each subdir's `fastdep', or
> C2. don't create modversions.h at all in the subdirs, but only
> once in the toplevel Makefile after doing dep-files.
>
> I'll do a patch to implement solution C1, unless someone has
> a much better idea.

At ** insert a sleep(1) or a sleep(2) (just in case).

..Stu

-
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/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:23 EST