News for hackers. Stuff that matters.
Re:Ubuntu on Windows by captainmuon on Wednesday March 30, 2016 @04:35PM (#11392769)
From the screenshots, it seems there is a full kernel in there - e.g. you have /proc/cpuinfo, and it identifies as Linux 3.4.0.

If they just implemented all Linux syscalls on top of NT, that would replace a Linux kernel. There would be no Linux kernel running on top. But in that case they would also need to emulate stuff like /proc. (This is the "reverse Wine" scenario.)

So I personally think it is either: - There is no new subsystem, this is just a linux.exe running the Linux kernel as a process, like CoLinux does or - There is a new subsystem. One way to do this is to port Linux to a new "architecture", namely the NT HAL. You'd call into the NT native API from the linux kernel, which would mean you'd have to put the headers with the native APIs you use under the GPL.

Armchair kernel development is fun :-)

Re:Ubuntu on Windows by jclulow on Wednesday March 30, 2016 @05:05PM (#11393006)
Speaking from experience working on the LX brand (the Linux emulation layer for Joyent SmartOS), we would not have gotten very far with our emulation layer if we did not also faithfully emulate quite a lot of /proc. For example:

    $ grep DESC /etc/lsb-release
    DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
    $ uname -a
    Linux kappa 3.13.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux
    $ wc -l /proc/cpuinfo
    608 /proc/cpuinfo
    $ /native/usr/bin/uname -a
    SunOS kappa 5.11 joyent_20160204T173314Z i86pc i386 i86pc
Re:Ubuntu on Windows by zzzcpan on Wednesday March 30, 2016 @05:35PM (#11393220)
There is a link to a full demo someone posted here [1].

They don't run the linux kernel at all. That /proc/cpuinfo is a part of a limited subset from what procfs usually offers. They enter their linux compatible "subsystem" via a bash binary, which could probably be any linux elf binary, since they run them unmodified. So, it looks like they actually implemented most of the syscalls with some of them emulating necessary parts of linux environment, like procfs.

[1] https://sec.ch9.ms/ch9/5db6/8ee786b7-9fc5-45bf-94d0-16ea9176...

Re:Ubuntu on Windows by teacup50 on Wednesday March 30, 2016 @05:52PM (#11393332)
FreeBSD's linux compatibility layer does exactly this; it reports as "Linux", there's a linprocfs implementation that provides a Linux /proc, etc.

It's a lot easier to emulate syscalls than it is to do something like CoLinux. Additionally, I can't imagine Microsoft would EVER let GPL'd Linux code into their kernel.

Re:Ubuntu on Windows by xorblurb on Wednesday March 30, 2016 @05:14PM (#11393062)
There is no need to use actual Linux code to implement its interface, so no GPL'ing of NT, and implementing /proc is not a big deal compared to other things.

And this seems to be implemented as an NT subsystem, which makes tons of sense.