微軟 Microsoft 今夏 Windows 將開始內建 Linux 核心
微軟 Microsoft 今夏 Windows 將開始內建 Linux 核心
News from: iThome &
微軟為適用於Linux的Windows子系統打造專屬核心,預計將加入到夏天的Windows Insiders版本。
2014年Satya Nadella上任微軟執行長喊出的「微軟愛Linux」,看來不是口號而是真的深深愛上了,微軟宣布從今年夏天的Windows Insiders版本,將開始內含Linux核心,用來支援最新版本適用於Linux的Windows子系統(Windows Subsystem for Linux,WSL),微軟提到,這是Linux核心首次成為Windows的元件共同發布。
WSL是微軟2016年推出的功能,讓開發者可以在Windows上執行GNU/Linux環境,包括Bash shell等命令列工具、公用程式甚至是X視窗系統等應用程式,WSL提供由微軟開發的Linux相容核心介面,開發者可以在其上執行GNU使用者空間,像是Ubuntu、openSUSE與Kali等Linux版本,而現在微軟乾脆直接讓Windows附帶Linux,並且同時發表了名為WSL 2的最新WSL架構。
這個版本的Linux核心使用最新長期穩定版4.19,為確保WSL核心始終維持最新的版本,因此當新的Linux長期穩定版本釋出,微軟會對核心進行衍合(Rebase)。這個Linux核心使用來自Kernel.org的長期支援版本來源外,也應用許多微軟客製的補丁,目的是要縮短啟動時間、減少記憶體使用,以打造出小而輕量的WSL 2核心。
微軟提到,他們現在聘用越來越多的Linux貢獻者,除了可以獲得更多的Linux技術支援外,他們也從上游直接對Linux做出更新,在使用Linux的過程同時對Linux做出貢獻。雖然微軟仍有多項針對核心的更新,尚未包含在這次使用的Linux核心中,但是會包含在未來使用的核心版本,微軟表示,維護下游的補丁不只增加複雜度,也並非開源社群的標準做法,因此他們傾向開發產品需要的補丁,並與社群合作整合上游程式碼。
在安全性上,WSL核心微軟使用自家的CI/CD系統建置,並透過Windows Update提供更新服務,確保核心能夠持續維持最新穩定版本,免受Linux漏洞影響安全。WSL 2提供的內核是完全開源的,在Windows Insider版本中發布的WSL 2,也將會在GitHub釋出說明,有興趣的開發者甚至可以開發自己的核心。
-----------------------------------------------------------------------
News from: iThome &
微軟為適用於Linux的Windows子系統打造專屬核心,預計將加入到夏天的Windows Insiders版本。
2014年Satya Nadella上任微軟執行長喊出的「微軟愛Linux」,看來不是口號而是真的深深愛上了,微軟宣布從今年夏天的Windows Insiders版本,將開始內含Linux核心,用來支援最新版本適用於Linux的Windows子系統(Windows Subsystem for Linux,WSL),微軟提到,這是Linux核心首次成為Windows的元件共同發布。
WSL是微軟2016年推出的功能,讓開發者可以在Windows上執行GNU/Linux環境,包括Bash shell等命令列工具、公用程式甚至是X視窗系統等應用程式,WSL提供由微軟開發的Linux相容核心介面,開發者可以在其上執行GNU使用者空間,像是Ubuntu、openSUSE與Kali等Linux版本,而現在微軟乾脆直接讓Windows附帶Linux,並且同時發表了名為WSL 2的最新WSL架構。
這個版本的Linux核心使用最新長期穩定版4.19,為確保WSL核心始終維持最新的版本,因此當新的Linux長期穩定版本釋出,微軟會對核心進行衍合(Rebase)。這個Linux核心使用來自Kernel.org的長期支援版本來源外,也應用許多微軟客製的補丁,目的是要縮短啟動時間、減少記憶體使用,以打造出小而輕量的WSL 2核心。
微軟提到,他們現在聘用越來越多的Linux貢獻者,除了可以獲得更多的Linux技術支援外,他們也從上游直接對Linux做出更新,在使用Linux的過程同時對Linux做出貢獻。雖然微軟仍有多項針對核心的更新,尚未包含在這次使用的Linux核心中,但是會包含在未來使用的核心版本,微軟表示,維護下游的補丁不只增加複雜度,也並非開源社群的標準做法,因此他們傾向開發產品需要的補丁,並與社群合作整合上游程式碼。
在安全性上,WSL核心微軟使用自家的CI/CD系統建置,並透過Windows Update提供更新服務,確保核心能夠持續維持最新穩定版本,免受Linux漏洞影響安全。WSL 2提供的內核是完全開源的,在Windows Insider版本中發布的WSL 2,也將會在GitHub釋出說明,有興趣的開發者甚至可以開發自己的核心。
-----------------------------------------------------------------------
Shipping a Linux Kernel with Windows
Beginning with Windows Insiders builds this Summer, we will include an in-house custom-built Linux kernel to underpin the newest version of the Windows Subsystem for Linux (WSL). This marks the first time that the Linux kernel will be included as a component in Windows. This is an exciting day for all of us on the Linux team at Microsoft and we are thrilled to be able to tell you a little bit about it.
Tuned for WSL
The term “Linux” is often used to refer both to the Linux kernel as well as the GNU userspace. As with WSL1, WSL2 will not provide any userspace binaries. Instead, the Microsoft kernel will interface with a userspace selected by the user. This will generally come through installation via the Windows store but can also be “sideloaded” through the creation of a custom distribution package. The only exception to this rule is a small init script that is injected to bootstrap the startup process, forming the connections between Windows and Linux that make WSL so magical.
The kernel itself will initially be based on version 4.19, the latest long-term stable release of Linux. The kernel will be rebased at the designation of new long-term stable releases to ensure that the WSL kernel always has the latest Linux goodness.
In addition to the LTS source from Kernel.org, a number of local patches are being applied. These patches tune the resulting binary for use in WSL2 by improving launch times, reducing the memory footprint and curating a minimal set of supported devices. The result is a small, lightweight kernel that is purpose built for WSL2 to be a drop-in replacement for the emulation architecture featured in the design of WSL1.
Code goes upstream
Microsoft employs a growing number of Linux contributors who have brought industry leading Linux knowhow into the company. For years now, these Linux developers have enabled Microsoft to support new platform features in the wide number of distributions provided in the Azure Marketplace.
An important philosophy of Linux at Microsoft is that all changes go upstream. Maintaining downstream patches adds complexity and is not standard practice in the open source community. In leveraging Linux, we are making a commitment to be good citizens and contribute back the changes that we make.
However, during development it is necessary to work with local patches that enable new features or address issues in upstream. In these cases, we either create, or find patches that fulfill our product requirements and then work with the community to get that code integrated as soon as possible. To protect the stability of the LTS branches, some patches – such as for new features – might only be included in future versions of the kernel, and not be back-ported to the current LTS version.
When the WSL kernel source becomes available it will consist of links to a set of patches in addition to the long-term stable source. Over time, we hope this list will shrink as patches make it upstream and grow as we add new local patches to support new WSL features.
Security
The WSL kernel will be built using Microsoft’s world-class CI/CD systems and serviced through Windows Update in an operation transparent to the user. The kernel will stay up to date with the newest features and fixes in the latest stable branch of Linux. To ensure the provenance of our sources we mirror repositories locally. We continually monitor Linux security mailing lists and partner with several CVE database companies to help ensure that our kernel has the most recent fixes and mitigations.
One of the great things about Linux is its stable and backwards compatible system call interface. This will enable us to ship the latest stable branch of the Linux kernel to all versions of WSL2. We will rebase the kernel when a new LTS is established and when we have sufficiently validated it.
Open Source
The kernel provided for WSL2 will be fully open source! When WSL2 is released in Windows Insider builds, instructions for creating your own WSL kernel will be made available on Github. We will work with developers interested in contributing to help get changes upstream. Check back in a few weeks for more information.
Thanks!
This is the culmination of years of effort from the Linux Systems Group as well as multiple other teams across Microsoft. We are excited to be able to share the result and look forward to the new and interesting ways in which you will use WSL. If you are interested in positions at Microsoft working with Linux check out this job listing.
留言
張貼留言