Linux 6.4 was released
Summary: This release includes support for Intel's Linear Address Masking; stall pressure information can be polled by unprivileged users; a API for User-space trace events has been added; safer Kernel Samepage Merging with a new process/cgroup API; more scalable memory management with per-VMA locks and faster context switching between user and kernel threads, new BPF features, and removal of the SELinux runtime disable capability. As always, there are many other features, new drivers, improvements and fixes.
Enable Intel's Linear Address Masking
Enable Address Masking on Intel chips. This is similar to ARM's Top Byte Ignore and allows userspace to use some bits of pointers without masking it out before use, allowing sofware to use these untranslated address bits for metadata. The capability can be used for efficient address sanitizers (ASAN) implementation and for optimizations in JITs and virtual machines
Recommended LWN article: Support for Intel's Linear Address Masking
Unprivileged Pressure Stall Information
This release allows for unprivileged PSI
New API for User-space trace events
A new API has been added for user-space trace events. In this new model during the event registration from user programs 3 new values are specified. The first is the address to update when the event is either enabled or disabled. The second is the bit to set/clear to reflect the event being enabled. The third is the size of the value at the specified address
Recommended LWN article: User trace events, one year later
Safer Kernel Samepage Merging with a new process/cgroup API
So far KSM can only be enabled by calling `madvise()` for memory regions, but this API is too insecure. To be able to use KSM for more workloads, KSM needs to have the ability to be enabled and disabled at the process / cgroup level. This release adds two new options to the prctl system call. The first one allows to enable KSM at the process level and the second one to query the setting
Recommended LWN article: Process-level kernel samepage merging control
More scalable memory management with per-VMA locks
The memory management subsystem has added a new kind of locks in each VMA (Virtual Memory Area, a data structure that representes virtual memory) which means that some operations will no longer use the `mmap_lock`. This improves scalability in a number of scenarios. For example, startup of Android apps with a large number of threads.
Recommended LWN article: Concurrent page-fault handling with per-VMA locks|
More scalable context switching between user and kernel threads
This release improves scalability of context switching between user and kernel threads on large systems with a threaded process spread across a lot of CPUs
This takes lazy tlb mm shootdown IPI interrupts from 314 to 3 on a 144 POWERPC CPU system doing a kernel compile.
New BPF features
As usual, this release brings new
BPF open-coded iterators, support for kptrs in more BPF maps, kptr RCU, shared ownership for local kptrs, support 64-bit pointers to kfuncs, or first class support for attaching uprobes to functions inside ELF objects containers in Android APKs.
Recommended LWN article: Generic iterators for BPF
Removal of the SELinux runtime disable capability
For security reasons, the ability to diable SELinux at runtime has been removed.
Recommended LWN article: Disabling SELinux's runtime disable