LWN.net Logo

What will that kernel be called?

When Linus announced the 3.0-rc1 kernel at the end of May, he noted that it was actually identifying itself as "3.0.0". There were enough scripts out there expecting that third digit to exist that he didn't want to break them from the outset. Still, he was hopeful that the final ".0" could go away:

We'll have the usual 6-7 weeks to wrestle it into submission, and get scripts etc cleaned up, and the final release should be just "3.0". The -stable team can use the third number for their versioning.

Fast forward to 3.0-rc7, and the kernel is still identifying itself as 3.0.0. While hard information is relatively scarce, it seems that there are still some programs and scripts out there that will break without that final number. In a sense, the three-number versioning scheme has become a part of the kernel ABI over the years. One can argue that anything which breaks was written in a silly way to begin with, but the goal is still to avoid breaking user space. So, while no definitive answer has been given, it looks like we're going to have three-number mainline releases for some time. It would be most surprising to see the stable updates starting with anything other than 3.0.1, though.

There is one related question, though: what about programs that cannot cope with anything other than "2.6.x" as the kernel version number? Evidently such programs exist. Saying that kernel releases must start with "2.6" forevermore stretches even the firmest commitment to binary compatibility; it's not something that is going to happen. In an attempt to make life easier for people stuck with such programs, Andi Kleen has implemented a new system personality that pretends the 3.0 change never happened. If a program is run under that personality, it will think that the kernel version is 2.6.40; 3.1 will look like 2.6.41, etc.

Andi says "I know this is somewhat ugly, but I didn't find a better workaround, and compatibility to existing programs is important." As of this writing, though, the patch has not made it into the mainline.


(Log in to post comments)

And thus, years later, Linux catches up to Windows.

Posted Jul 14, 2011 2:02 UTC (Thu) by cesarb (subscriber, #6266) [Link]

Microsoft Windows has, for a long time, had application compatibility shims, small pieces of code which are injected into a process and modify the behavior of some functions to fix compatibility problems.

The most common of them (as mentioned in passing on this blog post) is the Version Lie shim. All it does is report a different operating system version (AFAIK, there are several Version Lie shims, one for each faked operating system version). It seems a lot of programs get it wrong.

And thus, years later, Linux catches up to Windows.

Posted Jul 14, 2011 23:07 UTC (Thu) by gerdesj (subscriber, #5446) [Link]

As you say, Windows has a pretty insane versioning scheme as far as I can tell as a sysadmin. It seems Win 2008R2SP1 calls itself 6.1 for example and has various other names for itself depending on context and time of day and possibly the phase of the moon.

I don't see why Linux can't have an arbitrary scheme either but it should IMNSHO only have one version reporting back for a given package (distribution) of code.

Back in the day (I started with Linux at v. 1.something) it was x.y.z where y being odd was developmental and y being even was "stable". That all changed with the 2.6 series. So the "kernel versioning ABI" has changed at least once already.

Anyone insane enough to rely on 2.6 being in a version string deserves to have their script break.

I'm not much of a coder but I suspect that if you are looking for a particular feature then test for that feature rather than relying on a version string. In Windows a version string (personally I'd go for a build number and not a version) could reasonably be used to test for a facility, but in the land of Linux where a kernel could be customized to a serious degree, that will probably fail in amusing ways.

I say sod the shit coders and call the bloody thing whatever you like. A version string should just be a moniker and not have more meaning attached to it than is justifiable. Also there should only be one version reported by a particular lump of code.

I'm almost looking forward to see how Gentoo fares with a new kernel versioning scheme. Compared to its other foibles, this should be a doddle to fix ...

Cheers
Jon

And thus, years later, Linux catches up to Windows.

Posted Jul 15, 2011 18:39 UTC (Fri) by Julie (guest, #66693) [Link]

Anyone insane enough to rely on 2.6 being in a version string deserves to have their script break.

Well, yes, I would agree with you if the problem was just restricted to a few 'shit coders' learning a valuable lesson in sane programming, but from what I understand there is an unquantifiable number of users who might get bitten by this and not be in a position to fix it or even know what is going on when something they're relying on suddenly becomes unusable.

Yes, Andi's workaround is ugly and yes, it shouldn't be necessary (and I certainly hope it's not permanent), but I for one am relieved that the kernel devs think far enough to alleviate the pain of 'normal' users even when it's not their responsibility.

What will that kernel be called?

Posted Jul 14, 2011 6:22 UTC (Thu) by Lumag (subscriber, #22579) [Link]

What will that kernel be called?

Posted Jul 14, 2011 19:29 UTC (Thu) by aleXXX (subscriber, #2742) [Link]

The same kernel reporting two different version numbers ?
Won't that be similar to the crazy versioning of SunOS/Solaris, where they juggled version numbers and each release had at least two different version numbers ?

Alex

SunOS/Solaris version numbers

Posted Jul 14, 2011 20:56 UTC (Thu) by clugstj (subscriber, #4020) [Link]

AFAIK, the only version that software should have paid any attention to has always been reasonable.
SunOS 3 was the last pre-UNIX System V.4 (BSD based version)
SunOS 4 was Solaris 1
SunOS 5 is Solaris 2
SunOS 5.10 is Solaris 10 (or 2.10 if you are old fashioned)

The "Solaris" version numbers have always been at the whim of marketing.

SunOS/Solaris version numbers

Posted Jul 15, 2011 0:41 UTC (Fri) by viro (subscriber, #7872) [Link]

Er... SunOS 4 *was* a BSD derivative. Solaris 1 is pure marketing BS - early versions of their Missed'em'V branch had been unstable as hell (up to 2.4 or so - 2.5 had been more or less tolerable, 2.3 a complete disaster) and marketdroids tried to hide the break in continuity by declaring Missed'em'V versions Solaris 2 and retroactively[*] describing SunOS 4 as Solaris 1. The break is between SunOS 4 and SunOS 5; the honest thing to do would be to rename the OS at 5.0 (and hold the release back for three years or so, until they got it into more tolerable shape).

[*] Actually, they started to slap Solaris 1.* on SunOS 4.1.* updates - strictly speaking, older releases were not renamed. 4.1.x is still 4.3BSD, though, same as 4.0.x is...

What will that kernel be called?

Posted Jul 15, 2011 3:40 UTC (Fri) by leonov (subscriber, #6295) [Link]

That's a real shame...

What will that kernel be called?

Posted Jul 15, 2011 21:22 UTC (Fri) by jengelh (subscriber, #33263) [Link]

I don't see a reason to map {3.0 => 2.6.40, 3.1 => 2.6.41} when you can just map everything >=3 to 2.6.40. Those broken programs would not know the difference between 40 and 41 anyway because at the time of their release, at most 39 existed.

What will that kernel be called?

Posted Jul 18, 2011 10:10 UTC (Mon) by nye (guest, #51576) [Link]

>just map everything >=3 to 2.6.40

This would also strongly discourage new code from using this option since it would be completely useless for anyone wanting to check for newer versions; that sounds like a good idea.

What will that kernel be called?

Posted Jul 16, 2011 3:33 UTC (Sat) by pr1268 (subscriber, #24648) [Link]

I wonder what's going to happen when someone first applies Andi's personality hack and then runs uname -r?

What will that kernel be called?

Posted Aug 2, 2011 6:00 UTC (Tue) by smowton (guest, #57076) [Link]

If at least some programs are breaking when this change is made, and an unknown number of others will break but haven't seen the RC kernel yet, and there's nothing to be gained from the change... remind me why it's happening again?

Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds