Lista para version 5.18

Linux 5.18 was released

Summary: This release includes support for user events, which allow processes to create and write to trace events that are isolated from kernel trace level events and will only provide trace information when the trace is enabled; support for Intel Indirect Branch Tracking on Intel CPUs, which helps to prevent some kinds of exploits; stricter memcpy() compile-time bounds checking, better process scheduling performance on AMD Zen processors; support for fprobe, which allows faster probing of function calls; some preparation work for header rearchitecting that will provide faster compilation times; support for Btrfs encoded I/O, cross-mount reflink/dedupe and performance improvements; and switch to the C11 standard. As always, there are many other features, new drivers, improvements and fixes.

Support for Indirect Branch Tracking on Intel CPUs

Indirect Branch Tracking

Recommended LWN article: Indirect branch tracking for Intel CPUs

User events

Linux already has a method that allows tracing user space processes with the kernel tracing tools (uprobes). This release adds a new ABI that allow processes to create and write to trace events that are isolated from kernel trace level events. This enables a faster path for tracing from user mode data as well as opens managed code to participate in trace events, where stub locations are dynamic.

Processes often want to trace only when it's useful. A process can register an event describing the format of the event to the kernel. The kernel will create the event. The process will then receive a byte in a page mapping from a mapped tracefs file that it can check against. A privileged task can enable that event, which will change the mapped byte to true. The process can then start writing the event to the tracing buffer.

Links: Documentation

Better process scheduling performance on AMD Zen

Some CPUs, like AMD Zen, have multiple Last Level Caches per node with local memory channels and due to the allowed imbalance, it's far harder to tune some workloads to run optimally than it is on hardware that has 1 LLC per node. This release adjusts the imbalance on multi-LLC machines to allow an imbalance up to the point where LLCs should be balanced between nodes, which improves significantly the performance in some workloads.

fprobe, for probing multiple functions with a single probe handler

Linux already provices ways to probe function calls. This release includes a new one, fprobe, which is based on ftrace. The reasons why this new probe API exists is that it doesn't use the ftrace full features, it just provides a way to attach callbacks on function entry and exit. Unlike kprobes and kretprobes, fprobe gives faster+instrumentation for multiple functions with single handler.

Documentation: Fprobe - Function entry/exit probe

Headers rearchitecturing preparations for faster compilation times

A major rearchitecting of the kernel headers for significantly faster builds has been proposed

Btrfs: Encoded I/O, cross-mount reflink/dedupe and performance improvements

The Btrfs file system supports transparent compression. When using send/receive, the sending side decompresses the data and the receiving side recompresses it before writing it out. This release lets user space tools avoid the extra decompression/compression by letting send/receive read and write compressed extents directly.

This release also adds support for cross-mount reflink/dedupe support, and several substantial performance improvements, especially for fsync-based workloads. There also are some preparations for the future extent tree v2

Stricter memcpy() compile-time bounds checking

This release implements stricter (no struct member overflows) bounds checking for memcpy(), memmove(), and memset()

under {{{CONFIG_FORTIFY_SOURCE}}}. In order to eliminate a large class of common buffer overflow flaws that continue to persist in the kernel, these changes perform bounds checking of the destination struct member when they have a known size. This would have caught all of the memcpy()-related buffer write overflow flaws identified in at least the last three years

Recommended LWN article: Strict memcpy() bounds checking for the kernel

Switch to C11

The Linux kernel has relied until now on the C89 for various reasons. This release will switch to the C11 standard.

Recommended LWN article: https://lwn.net/Articles/885941/