Linux Kernel 5.12 Release

After two months of development, Linus Torvalds has announced the release of Linux Kernel 5.12. Among the most notable changes are: support for zoned block devices in Btrfs, user ID mapping for filesystems, removal of outdated ARM architectures, 'impatient' write mode in NFS, the LOOKUP_CACHED mechanism for determining file paths from cache, support for atomic instructions in BPF, the KFENCE debugging system for identifying memory-related errors, a kernel thread mode for NAPI polling in the network stack, the ACRN hypervisor, the ability to change the preemption model on-the-fly in the scheduler, and support for LTO optimizations during Clang builds.

The new version includes 14,170 fixes (compared to 15,480 in the previous release) from 1,946 (1,991) developers, the patch size is 38 MB (changes affected 12,102 (12,090) files, with 538,599 (868,025) lines of code added and 333,377 (261,456) lines removed). Approximately 43% of all changes in 5.12 are related to device drivers, about 17% pertain to updates to architecture-specific code, 12% relates to the network stack, 5% to file systems, and 4% to the kernel's internal subsystems.

Key innovations:

  • Disk subsystem, input/output, and file systems
    • User ID mapping for mounted file systems has been implemented (it allows mapping files of one user on a mounted foreign partition to another user in the current system). Mapping is supported for FAT, ext4, and XFS filesystems. This functionality simplifies file sharing among different users and across various computers, as the mapping will also be applied in the systemd-homed portable home directory mechanism, enabling users to move their home directories to external storage and use them on different computers where the user ID layouts do not match. Another useful application is the organization of shared file access from external hosts without actually changing the ownership data of the files in the filesystem.
    • The LOOKUP_CACHED patches have been accepted into the kernel, allowing user space to perform file path resolution operations without locking, solely based on the cached data available. The LOOKUP_CACHED mode is activated in the openat2() call by passing the RESOLVE_CACHED flag, where the data is returned only from the cache, and if path resolution requires accessing the storage, the error EAGAIN is returned.
    • The Btrfs file system has added initial support for zoned block devices (devices on hard disk drives or NVMe SSDs, where the storage space is divided into zones composed of groups of blocks or sectors, which allow only sequential additions of data with updates to the entire group of blocks). In read-only mode, support for blocks with metadata and data smaller than a page (subpage) has been implemented.
    • The F2FS file system has introduced the ability to select the compression algorithm and level. High compression support for the LZ4 algorithm has been added. The checkpoint_merge mount option has been implemented.
    • A new ioctl command FS_IOC_READ_VERITY_METADATA has been implemented for reading metadata from files protected by fs-verity.
    • In the NFS client, an 'eager' write mode (writes=eager) has been implemented, where write operations to a file are immediately sent to the server, bypassing the page cache. This mode helps reduce memory consumption, provides instant information about free space completion in the FS, and in some situations allows for increased performance.
    • New mount options have been added in CIFS (SMB): acregmax for managing file caching and acdirmax for managing directory metadata caching.
    • XFS has enabled multi-threaded quota checking mode, accelerated fsync execution, and prepared the growfs code for the implementation of the file system shrinking feature.
  • Memory and system services
    • A DTMP (Dynamic Thermal Power Management) subsystem has been added, allowing dynamic regulation of the energy consumption of different devices based on specified overall temperature constraints.
    • The ability to build the kernel with the Clang compiler has been implemented, including optimizations at the linking stage (LTO, Link Time Optimization). LTO optimizations take into account the state of all files involved in the build process, whereas traditional optimization modes optimize each file separately and do not consider the conditions of function calls defined in other files. For example, with LTO, functions from other files may allow for inline expansion, unused code is not included in the executable, type checking is performed, and overall project-level optimization is achieved. LTO support is currently limited to x86 and ARM64 architectures.
    • The ability to choose preemption modes (PREEMPT) in the scheduler at boot time (preempt=none/voluntary/full) or at runtime through debugfs (/debug/sched_debug), when the PREEMPT_DYNAMIC setting is specified during kernel build, has been provided. Previously, the preemption mode could only be set at the build parameter level. This change allows distributions to provide kernels with the PREEMPT mode enabled, ensuring minimal latency for desktops at the cost of a slight decrease in throughput, and to revert to PREEMPT_VOLUNTARY (an intermediate mode for desktops) or PREEMPT_NONE (which provides maximum throughput) if necessary. servers).
    • Support for atomic operations BPF_ADD, BPF_AND, BPF_OR, BPF_XOR, BPF_XCHG, and BPF_CMPXCHG has been added to the BPF subsystem.
    • BPF programs have been given the ability to access data on the stack using pointers with variable offsets. For example, while previously access to an array on the stack could only use a constant element index, it can now use a changing index. Access control within the existing bounds is enforced by the BPF verifier. This capability is only available to privileged programs due to concerns about exploiting vulnerabilities related to speculative execution of code.
    • The ability to attach BPF programs to "bare" tracepoints, which are not associated with user-space visible tracing events (the preservation of ABI for such tracepoints is not guaranteed), has been added.
    • Support for CXL 2.0 (Compute Express Link) has been implemented, which is used to facilitate high-speed interaction between CPUs and memory devices (allowing external memory devices to be utilized as part of RAM or persistent memory, as if this memory were connected through a standard memory controller within the CPU).
    • A nvmem driver has been added to retrieve data from firmware-reserved areas of memory, which are not directly accessible to Linux (for example, EEPROM memory, physically accessible only to the firmware, or data available only during the early boot stage).
    • Support for the profiling system "oprofile" has been removed, as it did not gain widespread use and has been replaced by the more modern perf mechanism.
    • Integration with cgroups controlling memory usage has been provided in the io_uring asynchronous I/O interface.
    • Support for NUMA systems as well as kprobes and uprobes mechanisms has been implemented for the RISC-V architecture.
    • The ability to use the kcmp() system call independently of the functionality of process state checkpointing (checkpoint/restore) has been added.
    • The macros EXPORT_UNUSED_SYMBOL() and EXPORT_SYMBOL_GPL_FUTURE() have been removed, as they have not been used in practice for many years.
  • Virtualization and Security
    • The KFence (Kernel Electric Fence) protection mechanism has been added, which detects memory handling errors such as buffer overflows and use-after-free conditions. Unlike the KASAN debugging mechanism, the KFence subsystem is characterized by high performance and low overhead, allowing it to catch memory handling errors that only manifest in production systems or during prolonged operation.
    • Support for the ACRN hypervisor has been added, designed with a focus on real-time task execution readiness and suitability for use in critical systems. ACRN provides minimal overhead, guarantees low latency, and adequate responsiveness when interacting with hardware. It supports the virtualization of CPU, I/O, network subsystem resources, as well as graphics and sound operations. of virtual machines in electronic control blocks, instrument panels, automotive information systems, consumer IoT devices, and other embedded technology. ACRN supports two types of guest systems — privileged Service VMs used for managing system resources (CPU, memory, I/O, etc.), and user User VMs, in which Linux distributions, Android, and Windows can run.
    • The IMA (Integrity Measurement Architecture) subsystem, which maintains a hash database for verifying file integrity and associated metadata, has gained the ability to check the integrity of the kernel itself, for example, to track changes to SELinux rules.
    • The KVM hypervisor now includes the ability to intercept Xen hypercalls and pass them to an emulator running in user space.
    • Support has been added for using Linux as the root environment for the Hyper-V hypervisor. The root environment has direct access to hardware and is used for hosting guest systems (analogous to Dom0 in Xen). Until now, Hyper-V (Microsoft Hypervisor) has only supported Linux in guest environments, while the hypervisor itself was managed from a Windows-based environment.
    • Support for inline encryption for eMMC cards has been added, which utilizes the built-in encryption mechanisms in the storage controller to perform transparent encryption and decryption of input/output operations.
    • The crypto subsystem has removed support for unused kernel hashes RIPE-MD 128/256/320 and Tiger 128/160/192, as well as the Salsa20 stream cipher, which has been replaced by the ChaCha20 algorithm. The blake2 algorithm has been updated to the blake2s implementation.
  • Network subsystem
    • Support for moving the NAPI polling handler for network devices to a separate kernel thread has been added, allowing for increased performance for certain types of workloads. Previously, polling was performed in the context of softirq and was not managed by the task scheduler, making it difficult to perform fine-tuning for optimal performance. Running in a separate kernel thread allows monitoring of the polling handler from user space, attaching to individual CPU cores, and taking it into account during task switching scheduling. A parameter has been proposed in sysfs to enable the new mode at /sys/class/net//threaded.
    • The integration into the MPTCP (MultiPath TCP) core has continued, an extension of the TCP protocol that allows TCP connections to work simultaneously over multiple routes through different network interfaces tied to different IP addresses. The new release adds the ability to attach priority to specific streams, enabling, for instance, the organization of backup streams that activate only when there are issues with the primary stream.
    • IGMPv3 now includes support for the EHT (Explicit Host Tracking) mechanism.
    • In the netfilter packet filtering mechanism, the ability to own specific tables for exclusive control has been implemented (for example, a background firewall process can lock specific tables, preventing others from interfering with them).
  • Hardware
    • Deprecated and unsupported ARM platforms have been cleaned up. Code for the efm32, picoxcell, prima2, tango, u300, zx, and c6x platforms, as well as associated drivers, has been removed.
    • The amdgpu driver implements OverDrive capability for Sienna Cichlid-based GPUs (Navi 22, Radeon RX 6xxx). Support for the FP16 pixel format for DCE (display controller engine) for generations 8 to 11 has been added. The GPU Navy Flounder (Navi 21) and APU Van Gogh now support GPU reset functionality.
    • The i915 driver for Intel graphics cards introduces the i915.mitigations parameter to disable isolation and protection mechanisms in favor of performance enhancement. Support for the VRR (Variable Rate Refresh) mechanism is enabled for chips starting from Tiger Lake, allowing adaptive refresh rate changes for smoother gameplay without stuttering. The Intel Clear Color technology is included to enhance color accuracy. DP-HDMI 2.1 support has been added. Control of eDP panel backlighting has been implemented. For Gen9 GPUs with LSPCON (Level Shifter and Protocol Converter), HDR support is enabled.
    • The nouveau driver now includes initial support for NVIDIA GPUs based on the GA100 architecture (Ampere).
    • The msm driver adds support for Adreno 508, 509, and 512 GPUs used in SDM (Snapdragon) 630, 636, and 660 chips.
    • Support for Sound BlasterX AE-5 Plus, Lexicon I-ONIX FW810s, and Pioneer DJM-750 sound cards has been added. Support for the Intel Alder Lake PCH-P audio subsystem is also included. The implementation of software simulation for the connection and disconnection of audio jacks for debugging handlers in user space has been realized.
    • Support for Nintendo 64 game consoles released from 1996 to 2003 has been added (previous attempts to port Linux for Nintendo 64 were never completed and were considered vaporware). The motivation for creating a new port for this outdated platform, which has not been produced for nearly twenty years, is to stimulate the development of emulators and simplify the transfer of games.
    • A driver for the Sony PlayStation 5 DualSense game controller has been added.
    • Support for ARM platforms, devices, and systems has been added: PineTab, Snapdragon 888 / SM8350, Snapdragon MTP, Two Beacon EmbeddedWorks, Intel eASIC N5X, Netgear R8000P, Plymovent M2M, Beacon i.MX8M Nano, NanoPi M4B.
    • Support for smartphones Purism Librem5 Evergreen, Xperia Z3+/Z4/Z5, ASUS Zenfone 2 Laser, BQ Aquaris X5, OnePlus6, OnePlus6T, Samsung GT-I9070 has been added.
    • The bcm-vk driver for Broadcom VK accelerator boards (such as PCIe boards Valkyrie and Viper) has been added, which can be used to offload sound, video, and image processing operations, as well as encryption-related tasks to a separate device.
    • Support for the Lenovo IdeaPad platform with the ability to control constant charging and keyboard backlighting has been added. Support for the ThinkPad platform ACPI profile with power consumption mode management has also been provided. A driver for the Lenovo ThinkPad X1 Tablet Gen 2 HID subsystem has been added.
    • The ov5647 driver with support for the camera module for Raspberry Pi has been added.
    • Support for the RISC-V SoC FU740 and HiFive Unleashed boards has been added. A new driver for the Kendryte K210 chip has also been added.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster