LOCALVERSION_AUTO considered harmful
LOCALVERSION_AUTO has nasty interaction with modules, warn about it.
init/Kconfig +5 -1
@@ -88,7 +88,6 @@ config LOCALVERSION config LOCALVERSION_AUTO bool "Automatically append version information to the version string" - default y help This will try to automatically determine if the current tree is a release tree by looking for git tags that belong to the current
@@ -99,6 +98,11 @@ config LOCALVERSION_AUTO appended after any matching localversion* files, and after the value set in CONFIG_LOCALVERSION. + Unfortunately, such finegrained versioning will mean that you will + not be able to use modules for development; even "make modules" + will change module versions, making recompiled modules impossible + to insert into old kernel. + (The actual string used here is the first eight characters produced by running the command:
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
init/Kconfig config LOCALVERSION_AUTO · line 104
Quoted 8 lines · Pavel Machek
init/Kconfig +4
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTO appended after any matching localversion* files, and after the value set in CONFIG_LOCALVERSION. + Unfortunately, such finegrained versioning will mean that you will + not be able to use modules for development; even "make modules" + will change module versions, making recompiled modules impossible + to insert into old kernel.
That's conditional BS.
Turn off CONFIG_MODVERSIONS already.
Quoted 5 lines · Alexey Dobriyan
Quoted 4 lines · Pavel Machek
(quoted diff) +0
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTOappended after any matching localversion* files, and after the value set in
CONFIG_LOCALVERSION.
Quoted 7 lines
Quoted 4 lines
+ Unfortunately, such finegrained versioning will mean that you will
+ not be able to use modules for development; even "make modules"
+ will change module versions, making recompiled modules impossible
+ to insert into old kernel.That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.
Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper)
I had hard times inserting modules...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 14 lines · Geert Uytterhoeven
Quoted 5 lines · Alexey Dobriyan
Quoted 4 lines · Pavel Machek
(quoted diff) +0
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTOappended after any matching localversion* files, and after the value set in
CONFIG_LOCALVERSION.Quoted 7 lines
Quoted 4 lines
+ Unfortunately, such finegrained versioning will mean that you will
+ not be able to use modules for development; even "make modules"
+ will change module versions, making recompiled modules impossible
+ to insert into old kernel.That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.
Quoted 3 lines
Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper)
I had hard times inserting modules...
I _had_ it off
# CONFIG_MODVERSIONS is not set
It seems some checking survives CONFIG_MODVERSIONS unset and that checking is strict enough to refuse module load after one "make modules" with LOCALVERSION_AUTO on...
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 19 lines · Pavel Machek
Quoted 14 lines · Geert Uytterhoeven
Quoted 5 lines · Alexey Dobriyan
Quoted 4 lines · Pavel Machek
(quoted diff) +0
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTOappended after any matching localversion* files, and after the value set in
CONFIG_LOCALVERSION.Quoted 7 lines
Quoted 4 lines
+ Unfortunately, such finegrained versioning will mean that you will
+ not be able to use modules for development; even "make modules"
+ will change module versions, making recompiled modules impossible
+ to insert into old kernel.That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.Quoted 3 lines
Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper)
I had hard times inserting modules...
Quoted 7 lines
I _had_ it off
#
CONFIG_MODVERSIONSis not setIt seems some checking survives
CONFIG_MODVERSIONSunset and that checking is strict enough to refuse module load after one "make modules" withLOCALVERSION_AUTOon...
So instead of fixing the CONFIG_MODVERSIONS=n case you go the easy way of killing LOCALVERSION_AUTO ? Brilliant.
Thanks,
tglx
Quoted 36 lines · Thomas Gleixner
Quoted 33 lines · Pavel Machek
Quoted 21 lines · Geert Uytterhoeven
Quoted 7 lines · Alexey Dobriyan
Quoted 5 lines · Pavel Machek
(quoted diff) +0
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTOappended after any matching localversion* files, and after the value set in
CONFIG_LOCALVERSION.Quoted 10 lines
Quoted 6 lines
+ Unfortunately, such finegrained versioning will mean that you will + not be able to use modules for development; even "make modules"
+ will change module versions, making recompiled modules impossible + to insert into old kernel.That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.Quoted 3 lines
Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper) I had hard times inserting modules...
I _had_ it off
#
CONFIG_MODVERSIONSis not set
Quoted 6 lines
Quoted 3 lines
It seems some checking survives
CONFIG_MODVERSIONSunset and that checking is strict enough to refuse module load after one "make modules" withLOCALVERSION_AUTOon...So instead of fixing the
CONFIG_MODVERSIONS=ncase you go the easy way of killingLOCALVERSION_AUTO? Brilliant.
so it works for you? how so, please?
Quoted 1 line
Thanks,
(saving bits)
~Randy
Quoted 36 lines · Thomas Gleixner
Quoted 33 lines · Pavel Machek
Quoted 21 lines · Geert Uytterhoeven
Quoted 7 lines · Alexey Dobriyan
Quoted 5 lines · Pavel Machek
(quoted diff) +0
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTOappended after any matching localversion* files, and after the value set in
CONFIG_LOCALVERSION.Quoted 10 lines
Quoted 6 lines
+ Unfortunately, such finegrained versioning will mean that you will + not be able to use modules for development; even "make modules"
+ will change module versions, making recompiled modules impossible + to insert into old kernel.That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.Quoted 3 lines
Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper) I had hard times inserting modules...
I _had_ it off
#
CONFIG_MODVERSIONSis not set
Quoted 6 lines
Quoted 3 lines
It seems some checking survives
CONFIG_MODVERSIONSunset and that checking is strict enough to refuse module load after one "make modules" withLOCALVERSION_AUTOon...So instead of fixing the
CONFIG_MODVERSIONS=ncase you go the easy way of killingLOCALVERSION_AUTO? Brilliant.
Pavel's original example (afaik) was on April 5:
Subject: 2.6.34-rc3: Can't insmod after make, because versions now differ?!
Apr 5 07:33:16 amd kernel: udlfb: version magic
'2.6.34-rc3-00345-ge8240f9-dirty SMP mod_unload CORE2 ' should be '2.6.34-rc3-00344-g548fc0a-dirty SMP mod_unload CORE2 '
So what do you suggest? If the "magic" strings contain "-dirty ", then ignore that and the 2 preceding hyphen-separated fields?
That could be dangerous if some kernel internal structures have changed. I.e., user/developer beware.
Maybe ignore those strings iff some override has been set somewhere?
---
~Randy
Quoted 52 lines · On 04/11/10 19:56, [email protected] wrote:
Quoted 36 lines · Thomas Gleixner
Quoted 33 lines · Pavel Machek
Quoted 21 lines · Geert Uytterhoeven
Quoted 7 lines · Alexey Dobriyan
Quoted 5 lines · Pavel Machek
(quoted diff) +0
-0@@ -99,6 +98,11 @@ config LOCALVERSION_AUTO appended after any matching localversion* files, and afterthe value set in
CONFIG_LOCALVERSION.Quoted 10 lines
Quoted 6 lines
+ Unfortunately, such finegrained versioning will mean that
you will + not be able to use modules for development; even
"make modules"
+ will change module versions, making recompiled modules
impossible + to insert into old kernel.That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.Quoted 3 lines
Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper) I had hard times inserting modules...
I _had_ it off
#
CONFIG_MODVERSIONSis not setQuoted 6 lines
Quoted 3 lines
It seems some checking survives
CONFIG_MODVERSIONSunset and that checking is strict enough to refuse module load after one "make modules" withLOCALVERSION_AUTOon...So instead of fixing the
CONFIG_MODVERSIONS=ncase you go the easy way of killingLOCALVERSION_AUTO? Brilliant.Pavel's original example (afaik) was on April 5:
Subject: 2.6.34-rc3: Can't insmod after make, because versions now differ?!Apr 5 07:33:16 amd kernel: udlfb: version magic'2.6.34-rc3-00345-ge8240f9-dirty SMP
mod_unloadCORE2 ' should be '2.6.34-rc3-00344-g548fc0a-dirty SMPmod_unloadCORE2 '
Quoted 7 lines
So what do you suggest? If the "magic" strings contain "-dirty ", then ignore that and the 2 preceding hyphen-separated fields?
That could be dangerous if some kernel internal structures have changed. I.e., user/developer beware.
Maybe ignore those strings iff some override has been set somewhere?
Pavel, does "modprobe --force" work?
Signature · 1 line
~Randy
Quoted 3 lines · On Apr 11, 2010, at 10:56 PM, [email protected] wrote:
So what do you suggest? If the "magic" strings contain "-dirty ", then ignore that and the 2 preceding hyphen-separated fields?
I have a standard local patch that I've been carrying for I-don't-know-how-long which just nukes the "-dirty" suffix, which I needed because make-kpkg modifies some kernel build files, so the version string would always have -dirty.
It's not hard to fix...
-- Ted
Hi!
Quoted 9 lines
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper)
I had hard times inserting modules...I _had_ it off
Quoted 8 lines
Quoted 5 lines
#
CONFIG_MODVERSIONSis not setIt seems some checking survives
CONFIG_MODVERSIONSunset and that checking is strict enough to refuse module load after one "make modules" withLOCALVERSION_AUTOon...So instead of fixing the
CONFIG_MODVERSIONS=ncase you go the easy way of killingLOCALVERSION_AUTO? Brilliant.
In previous discussion, I was told that there's no bug to fix, that everything works as intended.
I believe current behaiour is stupid, and I'd prefer *some* fix.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 17 lines · Pavel Machek
Hi!
Quoted 15 lines
Quoted 14 lines
Quoted 6 lines
Quoted 2 lines
That's conditional BS.
Turn offCONFIG_MODVERSIONSalready.Yeah, I disabled it ages ago. Even then (before git, probably even before bitkeeper)
I had hard times inserting modules...I _had_ it off
#
CONFIG_MODVERSIONSis not setIt seems some checking survives
CONFIG_MODVERSIONSunset and that checking is strict enough to refuse module load after one "make modules" withLOCALVERSION_AUTOon...
Quoted 5 lines
Quoted 2 lines
So instead of fixing the
CONFIG_MODVERSIONS=ncase you go the easy way of killingLOCALVERSION_AUTO? Brilliant.In previous discussion, I was told that there's no bug to fix, that everything works as intended.
The problem is that you guys are looking at CONFIG_MODVERSIONS the wrong way around.
It's the _off_ case that is broken. Always was, always will be.
If CONFIG_MODVERSIONS is off, we remove the symbol versioning, and replace it with the _insane_ kernel version check. That is never valid. The fact that the kernel version is the same doesn't mean that the module will work, since we often do lots of changes within the same version.
So the solution is to say CONFIG_MODVERSIONS=y, and everybody is happy. Your modules will actually test things that _matter_, and will stop loading if the data types or function prototypes have changed.
Linus