Linux Kernel 6.1 is out with Initial Rust Support. This is What’s New

4 min


A new Linux Kernel 6.1 arrived with the modern Rust language initial structure.

Linus Torvalds released Linux Kernel 6.1 on Dec 11, 2022, as the final mainline Kernel release of 2022. For many reasons, this release is important. Perhaps the most important one is the initial Rust language support in mainline Kernel for better security and memory-safe codes in the coming days. Which is bound to reduce the number of Kernel vulnerabilities the more we move towards Rust from C.

This also means all downstream mainline kernel-derived operating systems become more secure and reduction in memory unsafe edge cases in the coming days. This release is an iconic one in Kernel history.

That being said, Linux Kernel 6.1 is a little delayed by a week due to several bugs and issues during the release testing phase in the past couple of weeks. In addition, Linus also warned that he would be strict about merging new changes in the upcoming 6.2 due to the “holiday” seasons. Anyone who is submitting patches without a basic test might get dropped.

And because of that “we all want to have a calm holiday season”, I want to re-iterate that I’m going to be pretty strict about the merge window rules. The rules are that the pull requests sent to me during the merge window should have been ready before the merge window, and have seen some time in linux-next. No last-minute batch of experimental new development that hasn’t been seen by our test automation.

So to make my life easier, I will just drop any pull requests that come in late, or that look like they haven’t been in linux-next. This time of year, we’re all going to be much happier to deal with the stress of the season without having to deal with the stress of any late development. So if you already realize that work hasn’t been in linux-next, let’s just all agree to not even send me the pull request at all, and we’ll all be happy with the calm end-of-the-year season.
Ok?

Linus on the announcement

Let’s take a look at what’s new.

Linux Kernel 6.1: What’s New

Rust infra and key items

The most important change in the Linux Kernel 6.1 is introducing the initial Rust framework code. A whopping 12k lines of code brings only the basic infrastructure for Rust. With this base, new drivers, subsystems, and kernel modules are expected to land in Kernel via Rust programming language. 

The primary support includes the following four areas:

  • Kernel internals
  • Rust build rules and scripts
  • Rust crates and bindings for minimal possible build
  • Documentation and Rust samples

Secondly, the highly anticipated MGLUR (Multi-gen least recently used) algorithm lands in this version. Google engineers primarily developed this work and are already out in the wild for Android and Chrome OS. Hence it’s merged in 6.1, hoping to be enabled by default in the coming days. This algorithm expects to perform better than the LRU algorithm in high-pressure memory situations.

If you want to learn more about MGLUR, visit this page and check out the LPC 2022 conference presentation in the video below.

Graphics and Processors

AMD processors are now armed with Cache to Cache and memory reporting for better control and diagnosis. Also coming in this Kernel LbrExtV2 support (Last Branch Record Extension v2 functionality) for Zen 4 processors will improve overall performance.

Intel’s Meteor Lake family of processors get Thunderbolt support.

Intel brings additional work for DG2/Alchemist discrete graphics support for consumer graphics cards. The support is currently experimental since it is still maturing in the Kernel.

Furthermore, LoongArch CPU support arrived with more updates which started in Kernel 5.19. This version brings EFI-boot support, performance events and kdump handling, and cache operations for TLB. This Chinese CPU support will continue for several kernel releases until the mainline kernel fully supports it.

Also, this version gets a feature where Kernel now prints the CPU core when there is a segmentation fault error, which is a generic fault. This may benefit multi-core CPU situations and single-cores as well.

More work continues to arrive on the graphics card space for Intel’s Meteor Lake, which is planned to be released in the second half of 2023. Elsewhere AMD gets similar codes for RDNA2 and RDNA3 GPUs.

File system

The btrfs filesystem gets continuous performance improvements in all kernel releases. Kernel 6.1 introduces async buffer writes with more than 2x throughput improvement in file operations.

Good ol’ ext4 seems to have some minor improvements and bug fixes.

Also, the XFS file system and F2FS (Flash-friendly file system) get minor updates and bug fixes.

Other updates

PinePhone keyboard driver arrives that supports the keypad and its functionalities. PinePhone keyboard runs entirely open-source firmware. It is primarily used as an external keyboard for PinePhones.

In addition, a considerable number of Wi-Fi vulnerabilities in Kernel are fixed in 6.1. While these are mainlined in 6.1, also these are backported in the past supported Kernel versions at the moment. These are the CVEs that got fixed.

  • CVE-2022-41674
  • CVE-2022-42719
  • CVE-2022-42720
  • CVE-2022-42721
  • CVE-2022-42722

IBM folks bring its ibm-panel keyboard support for server interfaces.

A handful of sound driver updates arrive in Linux Kernel 6.1, including AMD, Apple M1 and M2, Mediatek and others.

How to Download and Install Linux Kernel 6.1

Remember that using the bleeding-edge mainline Linux Kernel in your production systems/daily-drive laptops/desktops is not wiser unless you have a specific requirement. Or have the latest GPU, CPU, which requires support.

For general users, it’s always best to wait for a few weeks until all the major Linux Distributions bring this version via their official stable channel after proper testing.

That being said, if you still want to install this version, go ahead and follow the below instructions, which I lined up here.

  • Firstly, visit the mainline kernel page.
    • There are two types of builds available: generic and lowlatency. You can download generic builds that work most of the time for standard systems.
    • For audio recordings and other setups that require low latency (like real-time feeds), download the lowlatency one.

Note: As of publishing this, the compiled .deb packages are unavailable due to automated build failure on the above page. Once it is available, I will update this section with the instructions to install it in Ubuntu.

Distro support

Arch Linux users should get this version by December-end/1st week of January via monthly ISO refresh.

Due to a schedule mismatch, Ubuntu 23.04 Luna Lobster should get this version in April and Fedora 38, which is also due at the same time frame.

Wrapping Up

This release opens the merge window for the following Linux Kernel 6.2, which is expected to bring more Rust changes and other hardware updates.

Cheers.


Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments