What’s new in the Linux kernel ?

Niraaj Ojha
8 min readJul 2, 2021

--

Join our discord server !!

Join our discord server and subreddit for more intellect discussions.

Follow our blog “Big Brains”, if you like the content we post.

After all these years, the core developers of Linux keep innovating. New versions are going to be faster and more stable.

Linux runs just about everything: all 500 of the world’s 500 fastest supercomputers; most of the general public cloud, even on Microsoft Azure; and 74 percent of smartphones. Indeed, because of Android, Linux is that the hottest end-user OS , nudging out Windows by 4 percent (39% vs. 35%).
So, where does Linux go next? After covering Linux just about “> for nearly all 29 years of its history and knowing pretty much anyone who’s anyone in Linux development circles, up to and including Linus Torvalds, i feel I even have a clue.

Recent Linux kernel improvements

The biggest recent improvement — and zip else is even close — is Linux will now become the platform for virtual private networks (VPNs). While Linux, thanks largely to OpenVPN, has long been a crucial VPN player, the addition of WireGuard, a revolutionary approach to VPNs, changes everything.
Torvalds really, really likes WireGuard: “Can I just one occasion again state my love for it and hope it gets merged soon?” he wrote. What Linus wants, Linus gets. Wireguard was merged into the Linux 5.6 kernel in March 2020.
Why is it such an enormous deal? WireGuard features a rare quality during a security program: Its code is clean and straightforward . It also comes with state-of-the-art cryptography technology support for the Noise protocol framework, Curve25519, ChaCha20, Poly1305, BLAKE2, SipHash24, and HKDF.

What’s even more important for users is it’s much faster than its rivals. Benchmarks have shown WireGuard is quite twice as fast as OpenVPN. It’s also cross-platform, so while you’ll run on a Linux server, your clients are often on Windows, macOS, BSD, iOS, Android, and in fact , the Linux desktop.

“Rust is totally memory safe.”

RYAN LEVICK (MICROSOFT PRINCIPAL CLOUD DEVELOPER ADVOCATE)

The Linux 5.6 kernel also boasted several other major improvements. First, for those still running 32-bit systems, Linux solved its “end of time” problem. You see, at 03:14:08 Greenwich mean solar time (GMT, a.k.a. Coordinated Universal Time) on Tuesday, Jan. 19, 2038, the planet ends.
What will happen is that the value for time in 32-bit-based Unix-based operating systems, like Linux and older versions of macOS, will run out of 32-bit numbers. they might then start counting time backward with negative numbers. And you thought the Y2K bug was scary!

It all began because Unix, Linux’s dad, dates the start of your time in seconds from the Epoch: 00:00:00 GMT on Jan. 1, 1970. The rub was, since Unix started as a 32-bit OS , it kept time as one signed 32-bit integer number. Those are tons of seconds, but it’s not enough. The fix retrofits even 32-bit Linux to use 64-bit numbers. Of course, this only delays the matter until 5:30:08 GMT Sunday, Dec. 4, 29,227,702,659. I’m comfortable with that.

Android and Linux get into sync

Everyone who pays attention to operating systems knows that Android may be a mobile-specialized Linux distribution. What might not be known is that, for several years, Android was a Linux fork. Even now, 10 years after Android and core Linux developers began to work and play nicely with one another again, they’re almost on an equivalent page. That’s changing.

As Jonathan Corbet, Linux kernel developer and writer, said in his annual Linux Kernel Report, the “latest stable kernel is on its thanks to becoming a part of the Android generic system image, then they’re going to track the stable updates. this may mean they’re much closer to the present state of the art.”

That may not sound sort of a big deal to you, but it is.

Here’s why. Today, before Linux finishes up thereon shiny new Android phone in your hand, it goes through three separate, time-consuming stages. First, Google takes an extended Term Support (LTS) kernel and adds in Android-specific code to form the Android common kernel. Next, Google ships that Android common kernel to a system-on-a-chip (SoC) manufacturer, like Qualcomm. The OEM then customizes the kernel to a selected SoC and chipset. Finally, the SoC kernel goes to the smartphone manufacturer. The manufacturer, in turn, adds its home brew, proprietary drivers for the display, camera, and Wi-Fi/cellular modem. This device kernel is what’s on your phone.

Along the way, every phone picks up literally many lines of kernel code not a part of the quality distribution. Most of this is often device drivers. Each smartphone or Android tablet comes with its own blend of drivers. That’s why making a real universal Android smartphone distribution, like the /e/ OS , is so hard. The result? That sharp new phone in your pocket features a 2-year-old Linux kernel. It’s due to these ancient kernels that Linux LTS kernels now accompany six years of support.

Google and therefore the vendors are not any more eager than you’d be to backport security patches to dusty, old kernels. So Google, along side the developer community, is trying to bring the shipping versions of Android in line with mainline, current Linux kernels.

This is getting to take a short time . A pair of eternal Android problems — the refusal of Linux developers to support a stable application binary interface (ABI) and therefore the equally firm refusal of hardware vendors to open source their drivers — are still with us for the nonce . An ABI defines how a program works with hardware once you don’t skills to figure with it at an application code level. Open source developers want to figure at an API level, while vendors only too often want to stay their devices mysterious hidden data which will be reached only by an ABI. Despite this, we’re finally closer to speeding up the mixing of Linux within the Android production pipeline. this suggests Android are going to be safer out of the box.

eBPF: The network firewall that became a Linux debugger

Corbet also talked about the continued rise of the extended Berkeley Packet Filter (eBPF) as a strong Linux kernel debugger tool. How could that possibly happen you ask? Like this.

While eBPF, like all firewall, can capture, filter, and block network packets, it does this by running user-space code inside an in-kernel virtual machine. Ah, you start to ascertain .

You can make eBPF run in response to activities on tracepoints, kprobes, and perf events. this permits you to debug kernel problems and run performance analysis. Better still, since eBPF programs can access kernel data structures, you’ll write, add, and test new debugging code without recompiling the kernel. this is often a serious time-saver for busy developers. Now, system administrators and programmers outside of the Linux kernel’s clique are starting to use eBPF’s power.

Rust becomes Linux’s second language

Since day one, if you wanted to develop within the Linux kernel, or anything that runs on the brink of it, you had to try to to it in C. Indeed, you’ll argue Linux is that the reason why C remains a well-liked language. Not anymore.
At the virtual 2020 Linux Plumbers Conference, where the highest Linux kernel developers discuss Linux’s future, they talked about introducing Rust because the kernel’s second language. Rust may be a high-level system language that’s sponsored by Mozilla, Firefox’s parent organization. Believe it or not, this notion is receiving widespread support. Torvalds himself is certain Linux won’t find yourself being written in Rust. But then, that’s not the goal. No one’s getting to rewrite the kernel’s 25 million lines of C in Rust.

Led by Josh Triplett, Rust language lead, and Nick Desaulniers, a Google engineer, they proposed using the system-level Rust language inside the kernel. Why? Because, it’s much safer than C, especially when it involves handling memory.

As Ryan Levick, a Microsoft principal cloud developer advocate, explained, “Rust is totally memory safe.” Since roughly two-thirds of security issues are often traced back to handling memory badly, this is often a serious improvement. additionally , “Rust prevents those issues usually without adding any runtime overhead,” he said.

Torvalds sees the benefits . While he’s encouraging a slow but steady approach to introducing Rust into Linux, he has also said that using Rust interfaces for drivers and other non-core kernel programs makes sense: “I’m convinced it’s getting to happen. it’d not be Rust, but it’s getting to happen that we’ll have different models for writing these sorts of things, and C won’t be the sole one.”

While the core kernel developers are moving slowly, other Linux distribution developers have wasted no time in adopting Rust. Amazon Web Services (AWS) has announced that its just-released Bottlerocket Linux for containers is essentially written in Rust.

Like Microsoft and Firefox, to call two others incorporating Rust into their development plans, AWS likes Rust for its memory security measures . Samartha Chandrashekar, an AWS product manager, said it “helps ensure thread safety and stop memory-related errors, like buffer overflows which will cause security vulnerabilities.”

Looking ahead, it’s clear that Rust will soon be playing a serious role in both Linux kernel and distribution development. Who would have ever thought that C would be displaced in even alittle way in these programming circles?
Linux 6.0 Kernel and beyond

By the top of the year, Linux 6.0 will appear. But don’t get too excited about the amount . As Torvalds said about the 5.0 release, “I’d wish to means (yet again) that we don’t do feature-based releases, which ‘5.0’ doesn’t mean anything quite that the 4.x numbers started getting large enough that I ran out of fingers and toes.”

Looking ahead, most of Linux 6, like most Linux releases, will contains new and improved hardware drivers. One prospective change, however, are going to be noticed by everyone: Linux will finally support the AMD and Intel FSGSBASE instruction set. OK, unless you’re a seriously hard-core developer, I’ve just lost you. Here’s the important thing about Linux supporting this chip instruction set: Your machine will run significantly faster.

How much faster?

Early benchmarks with the primary Linux 5.9 beta show significant I/O improvements. With Redis, the open source, in-memory arrangement store, which is usually used as a database, there was quite a 50 percent performance boost. That’s none too shabby!

So what it all comes right down to is Linux is constant to enhance both its speed and security. And, as amazing because it could seem , Linux is constant to expand its markets, because of its newly integrated WireGuard VPN.
Who knows? Perhaps, 2021 are going to be the year of the Linux desktop. After all, 2020 was the year of Linux on the Windows desktop.

What’s new in Linux: Lessons for leaders

  • Systems running on old software are probably not running as well as they might.
  • New generations of software, certainly including Linux, create new technology and business opportunities.
  • Operating systems are not a completely mature technology; there are still big improvements to be made.
Big Brains

Follow our Blog and join us on our Discord Server and Subreddit!!

--

--

Niraaj Ojha
Niraaj Ojha

Responses (1)