Linux kernel 5.0 RC1 is available with ARM big.LITTLE EAS support, F2FS fixes, and much more
While we don’t typically cover what happens in the mainline Linux kernel realm, it’s important for us to keep track of what’s going on with each new kernel release since Google mandates a minimum Linux kernel version requirement with each new release of Android. The recent decision to extend LTS releases from 2 to 6 years will play a major role in reducing security patch fragmentation since device makers will have to do less work in backporting security patches. Plus, the mainline kernel does often integrate new features that are relevant to mobile devices.
For example, the first Release Candidate build for the next LTS version of the kernel was recently released—Linux kernel 5.0 RC1. There is still a month or two left before the stable release, but we can already take a peek at what’s coming in the upcoming release. I’ll highlight some of the updates that are relevant to mobile devices, but I recommend you look over the full changelog if you’re at all interested in open source development and the Linux kernel.
ARM big.LITTLE EAS support
Energy Aware Scheduling has been a thing on Android devices ever since the release of the original Pixel. EAS is one of the reasons why Google Pixel devices are generally snappier than their competitors. Support has been already enabled Qualcomm’s release of the Snapdragon 845 kernel, so any device with this SoC (or newer) will support EAS. Although, Linux hasn’t had upstream support of Energy Aware Scheduling, until now. Upstream support should theoretically make it easier for silicon and device manufacturers to implement the technology into their devices. For the end users though, upstream support doesn’t really mean much.
Speck is an NSA (National Security Administration) developed encryption algorithm which works well on low-end hardware. Google intended to add support for speck as it offers data encryption support for budget devices with SoCs lacking hardware-accelerated encryption extensions. The adoption of Speck was widely criticized due to its ties to the NSA. Support for speck was removed in Linux kernel 4.20, and its replacement, Adiantum, performs just as well, if not better, on low-end hardware with the EXT4/F2FS file systems.
F2FS and EXT4 fixes
Flash-Friendly File-System, or F2FS, is widely used in Android devices. The Google Pixel 3 and Pixel 3 XL officially support F2FS, for example. Apparently, Jaegeuk Kim, the original developer of F2FS sent in a merge request for a lot of fixes for the file system to the Linux repository. These changes take care of encryption issues and idle time management, alongside garbage collection fixes. You can see all of the details in this pull request. Overall, fixing F2FS improves stability and reliability on the Android smartphones which support it, or will support it.
Similarly, the popular EXT4 file system has received just over a dozen patches. EXT4 is used on many Android devices like the latest OnePlus devices (including the OnePlus 5T, OnePlus 6, and OnePlus 6T).
New ARM hardware support
GNU/Linux distributions are arguably the best operating systems to run on ARM-based hardware. They offer reliable multi-tasking based on the open source model. ARM processors are specifically designed to perform a lot of tasks at once. That’s why it’s important for the OS to keep pace with the hardware. As some of you know, the majority of Android smartphones and tablets use chipsets with the ARM architecture. RISC-based chips are perfect for running everyday tasks(that you do on your smartphone. Linux kernel 5.0 is adding support for lots of new ARM hardware. Here are some of them:
- Tegra X2
- Tegra Xavier
- Allwinner F1C100
- Qualcomm QCS404
- Allwinner T3
- NXP Layerscape LX2160
Apart from the universal compatibility support for specific ARM hardware, Linux kernel 5.0 also has improved power management.
Android uses Binder to interchange arguments between different processes in the system. Applications, activities, and processes use Binder for launching and managing processes. Security on Android is highly based on UID permissions. Binder checks the UIDs provided by the applications using two-way IPC calls to confirm that it has access to a feature it wants to use. BinderFS is an updated version of Binder, but it’s more specialized and compatible with the system. Support for BinderFS won’t change much for an end-user, but it will solve some implementation problems for developers in the long run. Here is the relevant commit.
Energy Model Management Framework
Yet another addition is support for Energy Model Management Framework. This change is mainly for ARM and kernel developers. It offers a new layer of standardized energy use information from different sources, such as the device tree or the drivers. Energy consumption and reporting are handled differently by the hardware and software alike. Energy Model Management Framework will provide a standard API that can be used by another driver in the kernel to access information about energy consumption. This will theoretically make it easier for software engineers and developers to get the relevant information from the hardware. You can read more about this framework in this commit.
ARM64 Pointer Authentication support
Every relevant hardware and software solutions, especially on mobile, need strong security protocols. That’s what Linux kernel 5.0 is offering with the support of ARM64 Pointer Authentication. Since most smartphones have chipsets based on ARM64, it is crucial that attackers can’t exploit pointers, which are used in the Linux kernel for accessing memory addresses. The new authentication protocol compares pointers against secret keys. Pointer Authentication will attempt to avoid Return Oriented Programming (ROP) and other kinds of attacks.
There are a lot more updates to the Linux 5.0 kernel that we didn’t cover. Most of them don’t really mean much for Android devices, so that’s why we had to cherry pick the changelog. If you want to see the full ‘changelog’, check out Phoronix’s coverage.
Thanks to XDA Recognized Developer flar2 for assisting with this article.
Want more posts like this delivered to your inbox? Enter your email to be subscribed to our newsletter.