-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is the kernel version still v3.4 and not higher? #1244
Comments
Hi @maorui2014 -- what version do you think it should be? |
I think it should be 3.10+. |
We should probably be reporting whatever Ubuntu 16.10 expects. |
@maorui2014: Just to clarify: it is not really a linux kernel; it is the Windows Subsystem for Linux "pretending" to be that linux kernel (and for the most part, succeeding). So anything it reports is at least a bit fictional. Obviously, as @benhillis says, the WSL should report itself (and behave) as whatever kernel Ubuntu 16.10 expects. In a fantasy world, if you install some other distribution of Linux, the WSL should behave (and report itself) as whatever kernel that distro expects. |
ubuntu: |
@rodrymbo -- one challenge with that fantasy world (and, indeed, with Ubuntu itself) is that a single distribution release can support multiple kernels. For example, Ubuntu 14.04 ships official kernel packages based on Linux 3.13, 3.16, 3.19, 4.2, and 4.4 on x86_64 (the list is longer on arm). They have a Wiki page about their kernel-version support strategy here. @benhillis -- I believe Ubuntu 16.10 uses a Linux 4.8 kernel. Also, for what it's worth, to my knowledge, no version of Ubuntu has ever packaged WSL's currently-selected kernel version of "3.4". Follow-on question, @benhillis -- do y'all plan to support packages such as linux-tools? Those tools are rebuilt every time Ubuntu ships a kernel bugfix patch; they're tied to a very specific kernel version. I'd love to be able to use |
@aseering -- Well, if it reports itself (and/or behaves) as the distro expects, then it is okay, right? The only problem would come from some behavior the distro doesn't expect (or I suppose if the distro did something the kernel didn't expect). @maorui2014 -- so what features of a differently-numbered kernel are you missing with what we are currently seeing? Obviously security enhancements and fixes aren't relevant in the same way. I wasn't able to determine whether the original question was reporting WSL as being somehow deficient at pretending to be Ubuntu 16.10, or about wanting some feature or other of a later version of the kernel, perhaps even later than the kernel(s) available with 16.10. Either way, at some point it might be good to start thinking of WSL as a whole different kind of kernel, not as just pretending to be a specific linux kernel -- like linux supporting different CPU architectures, only moreso. So Ubuntu could add "WSL 3.4" to the list of (linux) kernels it supports, rather than WSL 3.4 pretending to be linux kernel 4.2 or whatever. I'm not familiar with how or when or if a userspace app might want to query the kernel to learn its version, but as Adam says, if WSL reports 3.4 and there is no extant linux kernel 3.4, that would at least be a clue that it's not in Kansas any more. |
Could report Kernel as 10.buildnumber (although I did read that FreeBSD had big problems (like y2k lol) with their build numbers going up a digit when FreeBSD 10 released. |
@rodrymbo The Linux Kernel Hidden Inside Windows 10 on Black Hat 2016 https://www.youtube.com/watch?v=BgVGxWMu5W4 https://www.blackhat.com/us-16/briefings.html#the-linux-kernel-hidden-inside-windows-10
|
@Zx-EvM - Hi Dimitry Are you saying that the video reveals that the "Ring 0 driver" it talks about is made up mostly of code from the linux kernel project, simply signed by Microsoft and set up to run as a Windows system driver? I was under the impression that it is Microsoft code from Microsoft developers. Maybe the video (that I don't have time to watch right now) says differently? The thing is, code we might run in bash-on-ubuntu-on-windows is not able to tell that it is not an actual linux kernel (except when it runs into a beta-level bug that will get fixed), nor prove conclusively that it is. I get that it quacks like the proverbial duck. Still, unless you are saying that a Microsoft developer reveals in that video that they took most of the code from the linux kernel project, I'll continue to conclude that it is a Microsoft Windows system driver made to look and behave like a linux kernel. Not that it matters a whole lot; my point was that when we (humans) look at the version number, it should reveal that it is WSL's version of linux, not Ubuntu's or Debian's or whatever. |
At best WSL could indicate the version that MS' implementation of Linux is targeting. My Android phone is kernel version Not that targeting means much, other than that MS implicitly says "we think Xenial mostly works". Nor does the kernel version number itself tell you much, because what a given Linux version can do is determined more by its configuration than its version. Userspace interaction with the kernel is defined by the syscall signatures, the kernel netlink protocol, ioctls on Which is why userspace software must probe for existence of kernel features (of or lack thereof) themselves, or, at their sole discretion, just break horribly. Which is why almost nothing, not even |
@therealkenc -- good point regarding |
@rodrymbo but if it is as you say GCC should compile to PE (Windows) instead of ELF (Linux). You can see this StackOverflow Question http://stackoverflow.com/questions/38786014/how-to-compile-executable-for-windows-with-gcc-with-linux-subsystem Linux Subsystem works as a Linux-computer. In my previous message is a summary of the video: Key:
|
@aseering Understood. WSL doesn't, and can't, depend on the Ubuntu kernel-image-generic aptitude package. So it isn't that surprising For what it's worth, |
@Zx-EvM "full blown" in that sentence isn't meant to be taken literally. Better:
|
@Zx-EvM It's more of a kernel extension/add-on than a full kernel. At least for the moment, all hardware access still has to go through the NT Kernel (although there is no usermode-kernelmode context change going on, since the translation to NT happens in the lxss kernelmode). Alex has done some more research more recently and found a new kernelmode driver interface on the lxcore (extend the module out by some more modules), but it's not clear if this is going to be documented for third parties to write drivers or if Microsoft is going to use the interface to write generic shim drivers in between the real Windows driver stack and the lxcore driver. If they could write a generic interface for, say, graphics driver ioctls being transformed into a generic Windows kernelmode interface for graphics, this would mean MS would probably have to distribute their own libgl for that driver shim. On the other hand, MS might leave it up to the graphics card companies, in which case they might document it for them. We'll see. It could be even easier, depending on how Windows and Windows driver-makers implement OpenGL. It's hard to say because neither side of the interface in Windows is open source or (freely?) documented, and I'm not a reverse engineer. |
@Zx-EvM Here's another statement from a MSDN blog, which includes a diagram:
I suspect the statements you are quoting are from journalists or researchers or enthusiasts who aren't constrained by being Microsoft employees to stating things clearly and accurately. It's easier to summarize as "it's a linux kernel" into an article than to say that "lxss.sys and lxcore.sys drivers translate the Linux system calls to emulate the Linux kernel". And as I said, it doesn't matter a whole lot, since software running in WSL can't tell the difference (when everything is working right, since it is beta-level still). So back to the original question: what features or characteristics of 4.8 or whatever does the OP miss in the current release, besides it reporting it is 3.4? Is something not working as expected, or is it too slow, or is there a security risk that is not addressed in Microsoft's implementation of 3.4, or what? |
@rodrymbo Alex Ionescu knows what he is talking about, but maybe his talk's abstract took liberties in the expectation that any lack of clarity would be remediated by watching the actual talk. I've watched the video of that talk and he is absolutely crystal clear. |
This seems to be fixed by reporting as 4.4 since build 14986. |
Correct. In creators update we report 4.4. |
So how do I get perf (usually provided by linux-tools) installed?! :) Seriously, I'm trying to profile a node.js app and find myself wondering if I need to build a custom kernel (which I now know can't be done) because I cannot figure out how to install @therealkenc Back to this thread yet again. Finally got perf compiled/installed manually, and this I hit another wall which brought me right back here (not just a coincidence I'm sure). CONFIG_PERF_EVENTS apparently isn't implemented in the pseudo-kernel behind WSL. This makes profiling a node.js app on WSL quite next to impossible. Here's the issue I filed with that project (knowing it may be entirely dependant on WSL): davidmarkclements/0x#68 |
@rainabba - Yep CONFIG_PERF_EVENTS is #329 #1577, maybe others. I don't know if anyone ever did a User Voice. |
Since we're speaking about linux kernels here, can the WSL simulated kernel keep up with all the stable releases the Linux kernel team creates? For instance: Linux 4.14 has been released on 12 Nov 2017. Linux 4.14 has been released on 12 Nov 2017. I think supporting the features of the linux kernel should be something that's looked at and considering a stable release is issued every 2 to 3 months, we would simply see the changes upon the next update for stable Windows (this would include at least 2 versions worth of feature enhancements). I'm not sure how much work would be involved and obviously some features would be prioritized over others but supporting kernel changes would probably attract more people over to Windows to use WSL instead (especially when UserAsks such as FUSE and GUI support is finally a reality). I personally see a day in which we don't see any differences whatsoever between running a WSL environment and a real Linux environment but understandably that day is long in coming (though perhaps the rise of quantum computing once publicly released can help speed things up). |
Why is the kernel version still v3.4 and not higher?
The text was updated successfully, but these errors were encountered: