KernelNewbies:

Linux 5.17 was released on Sun, 20 Mar 2022.

Summary: Among other changes this release includes support for recursive id-mapped mounts; CO-RE support that makes compiled BPF programs more portable; a new P-state driver for modern AMD CPUs; the random number generator switched to BLAKE2s and got much faster; a new Real-Time Linux Analysis tool; the fscache networking caching backend was rewritten; new fanotify flag to replace some inotify patterns; support for giving names to anonymous memory mappings. As always, there are many other features, new drivers, improvements and fixes.

1. Prominent features

1.1. Support recursive id-mapped mounts

Linux 5.12 added support for id-mapped mounts, that is, creating a mount of an existing file system with the user and group IDs mapped to different ones. This is very useful for containers, where you might want to mount a directory with some random user ID as the user ID expected by the container. This feature, however, required that the base file system was a file system that was not id-mapped itself. This release supports recursive id-mapped mounts.

1.2. BPF CO-RE support and other improvements

The nature of BPF programs makes hard for them to be portable: The position of a member in a data structure can change depending from version to version and even on the same kernel depending on the compiler options. This requires compiling BPF programs in the target computer. In order to make BPF programs more portable, a few features are required; some have already been merged, like BTF, which was introduced in Linux 4.18 and provides type information of all kernel data structures. This release introduces "CO-RE" -Compile Once, Run Everywhere- support. Along with other pieces in the userspace BPF infrastructure, this helps to create BPF programs that can be run in different kernels without requiring compilation.

Recommended article: BPF CO-RE reference guide.

This release also adds the bpf_loop helper, which helps to move loop logic of BPF programs into the kernel and thereby guarantee that the loop will always terminate

Recommended article: A different approach to BPF loops

1.3. New P-State driver for modern AMD cpus

This release includes a new AMD P-State driver. AMD P-State is the AMD CPU performance scaling driver that introduces a new CPU frequency control mechanism on AMD Zen based CPU series in Linux kernel. The new mechanism is based on Collaborative Processor Performance Control (CPPC) which is finer grain frequency management than legacy ACPI hardware P-States. Current AMD CPU platforms are using the ACPI P-states driver to manage CPU frequency and clocks with switching only in three P-states. AMD P-State leverages the Linux kernel governors such as schedutil, ondemand, etc. to manage the performance hints which are provided by CPPC hardware functionality. AMD P-State is supported on recent AMD Zen base CPU series include some of Zen 2 and Zen 3 processors.

1.4. Random number generator improvements

This release switches the entropy extractor in the RNG from SHA-1 to BLAKE2s. This change improves the backtracking security from 80 bits to 128 bits. Some additional changes have also drastically improved performance.

Recommended post: Random number generator enhancements for Linux 5.17 and 5.18

1.5. Rewrite of the networking caching backend for networking file systems

Linux networking file systems (e.g. NFS) can optionally use a networking cache layer called fscache and cachefiles. This layer has been rewritten in this release, significantly simplifying the code compared to what's upstream, removing the complex operation scheduling and object state machine in favour of something much smaller and simpler

1.6. New Real-Time Linux Analysis (RTLA) tool

As part of the efforts to get PREEMPT_RT into mainline, this release includes a Real-Time Linux Analysis (RTLA) tool. rtla is a meta-tool that includes a set of commands that aims to analyze the real-time properties of Linux. But instead of testing Linux as a black box, rtla leverages kernel tracing capabilities to provide precise information about the properties and root causes of unexpected results, making it easier for users and developers to collect performance and trace data, and helping fine-tune their systems/algorithms.

Recommended blog: And now Linux has a Real-Time Linux Analysis (RTLA) tool!

1.7. New fanotify FAN_RENAME flag

This release adds a FAN_RENAME event to the fanotify interfaces to report extra info records about new and old parent+name details. This new event was designed as a replacement for the "inotify way" of joining the MOVED_FROM/MOVED_TO events using a cookie

1.8. Support giving names to anonymous memory

Anonymous memory (not backed by a file, e.g. malloc) is, as the name says, anonymous, and it's not easy to debug anonymous memory usage coming from various system components. This release allows to give a name to anonymous memory mappings. It adds a field to /proc/pid/maps and /proc/pid/smaps to show a userspace-provided name for anonymous vmas. The names of named anonymous vmas are shown as [anon:<name>]. Userspace can set the name for a region of memory by calling prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, start, len, (unsigned long)name);.

Recommended LWN article: Not-so-anonymous virtual memory areas

1.9. Mitigate straight-line speculation attacks

A new attack for CPUs has been found, called "Straight-line speculation"; this release adds some mitigations for it.

Recommended LWN article: Blocking straight-line speculation — eventually. commit, commit, commit, commit, commit, commit

2. Core (various)

3. File systems

4. Memory management

5. Block layer

6. Tracing, perf and BPF

7. Virtualization

8. Cryptography

9. Networking

10. Architectures

10.1. ARM

10.2. x86

10.3. PowerPC

10.4. RISC-V

10.5. MIPS

10.6. PA-RISC

10.7. S390

10.8. UML

10.9. M68K

11. Drivers

11.1. Graphics

11.2. Power management

11.3. Storage

11.4. Drivers in the Staging area

11.5. Networking

11.6. Audio

11.7. Tablets, touch screens, keyboards, mouses

11.8. TV tuners, webcams, video capturers

11.9. Universal Serial Bus

11.10. Serial Peripheral Interface (SPI)

11.11. Watchdog

11.12. CPU Frequency scaling

11.13. Device Voltage and Frequency Scaling

11.14. Voltage, current regulators, power capping, power supply

11.15. Real Time Clock (RTC)

11.16. Pin Controllers (pinctrl)

11.17. Multi Media Card (MMC)

11.18. Memory Technology Devices (MTD)

11.19. Industrial I/O (iio)

11.20. Multi Function Devices (MFD)

11.21. Inter-Integrated Circuit (I2C + I3C)

11.22. Hardware monitoring (hwmon)

11.23. General Purpose I/O (gpio)

11.24. Leds

11.25. DMA engines

11.26. Cryptography hardware acceleration

11.27. PCI

11.28. Non-Transparent Bridge (NTB)

11.29. Thunderbolt

11.30. Clock

11.31. PHY ("physical layer" framework)

11.32. EDAC (Error Detection And Correction)

11.33. Various

12. List of Pull Requests

13. Other news sites

KernelNewbies: Linux_5.17 (last edited 2022-03-23 21:49:11 by AaronToponce)