After two months of development, Linus Torvalds has released the Linux kernel 6.11. Among the most notable changes are: support for atomic write operations at the block level, support for bind() and listen() operations in io_uring, a new mechanism for locking software interrupt handlers, the ability to write to memory-mapped executable files, support for writing block device drivers in Rust, optimization of the getrandom() call, and a new implementation of AES-GCM.
The new version includes 15,130 fixes from 2,078 developers, with a patch size of 85 MB (changes affected 13,282 files, adding 985,857 lines of code and removing 268,915 lines). The previous release had 14,564 fixes from 1,989 developers, with a patch size of 41 MB (half the size of the patch for kernel 6.11). About 46% of all changes in 6.11 are related to device drivers, roughly 17% pertain to code updates specific to hardware architectures, 10% is related to the network stack, 5% to file systems, and 3% to the kernel's internal subsystems.
Key innovations in kernel 6.11:
- Disk subsystem, input/output, and file systems
- Support for atomic write operations at the block level has been implemented, where either the entire specified set of blocks is written to the storage device or none of the blocks are written, which helps protect against situations where only part of the blocks is recorded after a hardware failure while older information remains in other blocks. A flag RWF_ATOMIC has been added to the pwritev() system call to enable atomic write mode. Information about support for atomic writing (atomic_write_unit_min, atomic_write_unit_max, and atomic_write_segments_max) for individual files can be retrieved using the statx() function.
- Support for writing to executable files associated with running processes has been provided. Previously, as in other Unix-like systems, the kernel would return an error when attempting to write to the executable file of a running process. This limitation has been removed as it lacked practical significance.
- The ability to develop block device drivers in Rust has been implemented. As an example, the kernel has added the rnull driver, which is an equivalent of the null_blk driver, written in Rust.
- In the Btrfs file system, support for the new modes "ignoremetacsums" and "ignoresuperflags" has been implemented in the mount option "rescue=", which can be used to offload certain checks to user space when recovering the filesystem after a crash. The implementation of dynamic block group return operations has been reworked to prevent situations of insufficient free space under conditions of incomplete filesystem fill.
- The ntfs3 file system offers support for the "compressed" and "immutable" attributes, which define compressed and immutable files.
- In the F2FS and Ext4 filesystems, the handling of file names in a case-insensitive manner (casefold) has been simplified by storing names as qstr strings without unnecessary case transformation.
- In the Ext4 filesystem, the implementation of the jbd2_transaction_committed function has been optimized to enhance performance on very fast drives (tests indicate an increase in operations processed per second by up to 20%).
- In the statx() system call, it is now permissible to pass a NULL pointer instead of an empty string for the file path when the AT_EMPTY_PATH flag is set.
- In the open_by_handle_at() system call, checks for file access permissions have been relaxed if the CAP_DAC_READ_SEARCH privilege is missing for searching in the initial namespace. Previously, the requirement of having CAP_DAC_READ_SEARCH privilege for the initial namespace prevented the use of the open_by_handle_at() system call in containers.
- The capabilities of the listmount() and statmount() system calls have been expanded. A LISTMOUNT_REVERSE flag has been added to listmount() to output the contents of the mount point table in reverse order (most recent entries at the top). The statmount() call has been implemented to output the options set during filesystem mounting. In both system calls, operation is allowed in the absence of access to the initial namespace (when there is only access to the local or external namespace).
- In the Bcachefs filesystem, support for automatic transparent recovery of problematic data has been implemented, using error recovery codes – if an input/output error occurs during reading or a checksum mismatch is detected, the problematic data block is automatically rewritten when there is redundancy available for its recovery.
- Memory and system services
- The accepted patches include the implementation of a new mechanism for blocking software interrupt handlers (BH, bottom-half), which ensures the locking of used data structures while not blocking the parallel execution of unrelated code. It is noted that this change not only reduced latencies for kernels operating in real-time mode but also improved the performance of regular kernels (for example, some types of loads see a 14.5% improvement in network subsystem performance).
- Support for operations to implement the bind() and listen() functions, used to create accepting network socket connections, has been added to the io_uring asynchronous input/output subsystem.
- A set of ioctl operations has been added for the pseudo-FS NSFS (NameSpace FS), used for working with namespaces. The new ioctls allow the transformation of process and thread group identifiers between different process identifier namespaces (PID namespace). Similar ioctls that allow determining process file descriptors in separate namespace based on pidfd identifiers have also been added to the pseudo-FS pidfd.
- Support for a new iterator for working with bitmasks has been added for BPF programs, which can be used, for example, to iterate over individual bits in memory areas such as cpumask. A mechanism has been added for notifying user-space processes about the detachment (detach/unregister) of the struct_ops object. The range of types that can be used in arrays has been expanded (for example, one can declare arrays with elements of types kptr, bpf_rb_root, and bpf_list_head). A more reliable mechanism for Split BTF (BPF Type Format) has been proposed, which is used for type checking in BPF pseudocode.
- A subsystem has been added that allows power delivery to devices in a specified order, in case one device needs to be activated before another (for instance, when activating wireless chips on Qualcomm platforms).
- A module called "Sloppy logic analyzer" has been added, which allows the creation of simple signal logic analyzers using GPIO that operate on a separate CPU core.
- Support for runtime constants has been added, which can be used instead of single-initialized variables. For example, runtime constants can be applied instead of variables storing the pointer and size for the dentry cache. These variables are set during boot and then never change. The idea is to substitute the values of such variables directly into instructions in the code, eliminating the overhead associated with pointer manipulations.
- The process of transferring changes from the Rust-for-Linux branch continues, related to using the Rust language as a second language for developing drivers and kernel modules (Rust support is not enabled by default and does not include Rust as a mandatory build dependency for the kernel). Support for Rust 1.80 has been added (Rust 1.78 remains the minimum supported version). In addition to the previously mentioned tools for developing block device drivers, new abstractions for firmware loading, user space access (uaccess), and working with the "page" structure have been added in this release.
- A new system call uretprobe() has been implemented for x86-64 systems, optimizing the operation of the uretprobe tracing mechanism, which allows tracking values returned by functions in user space applications.
- New kernel command line parameters have been added: "reserve_mem" for reserving a named memory area during boot and "ramoops.mem_name" for use in the pstore memory area created via reserve_mem.
- In the cgroup-based memory controller, the parameter "swappiness" has been added to the memory.reclaim file, which defines the memory eviction settings, allowing a balance to be changed between evicting anonymous memory pages to swap and freeing up memory pages used for the file cache.
- An ioctl interface PROCMAP_QUERY has been added for more efficient searching of virtual memory areas (Virtual Memory Area) in /proc/PID/maps.
- The mmap() system call has been enhanced with the MAP_DROPPABLE flag for requesting memory that will never be swapped to disk and may be released in case of memory shortages.
- Support for hot-plugging (switching physical and virtual CPUs to online/offline modes) has been implemented for ARM64 architecture systems with ACPI.
- Support for hot-plug memory has been provided for the RISC-V architecture, along with the addition of the GCC plugin STACKLEAK (which initializes all stack-stored variables to prevent information leakage from the kernel through uninitialized variables that may contain remnants of previously saved stack data).
- The EFI memory map fake mapping mechanism has been removed during the boot stage. This mechanism was not used in practice and hindered developments in the area of confidential execution. of virtual machines.
- Support for the PowerPC 40x platform has been discontinued.
- The requirements for the GNU Make version have been raised—at least the release of GNU Make published in 2013 is required to build the kernel.
- Virtualization and Security
- Patches have been integrated that significantly (up to 15 times) speed up the acquisition of random numbers via the getrandom() system call. The optimization is based on using the vDSO (virtual dynamic shared object) mechanism, which allows transferring the system call handler from the kernel to user space and avoiding context switches. The implementation of the system call is loaded directly into the process's address space by the kernel.
- For x86-64 systems, a new implementation of the AES-GCM encryption algorithm has been included, supporting the use of vector instructions VAES, VPCLMULQDQ, and AVX512/AVX10 for accelerated computations. Testing shows performance gains of up to 156% after transitioning to the new implementation. The assembler implementation of AES-GCM has been completely rewritten with attention to correctness, performance, size, and comprehensive code documentation.
- The capability to run the kernel as a guest system in virtualized environments using the AMD SEV-SNP (Secure Nested Paging) processor extension, designed to ensure secure operation with nested page tables, has been implemented. The SVSM (Linux Secure VM Service Module) can be used for additional isolation of resource access from virtual machines. In the hypervisor, KVM initial support for launching guest systems protected by AMD SEV-SNP has been added.
- A separate bucket slab allocator has been added, enabled through the CONFIG_SLAB_BUCKETS parameter, providing protection against attacks using the 'heap spraying' technique.
- The KVM hypervisor has added an ioctl call for preemptively allocating memory to the guest system before its actual launch.
- Network subsystem
- A sysctl parameter net.tcp_rto_min_us has been added, which allows configuring the minimum retransmission timeout for TCP sockets.
- The ethtool utility has been enhanced to allow fine-tuning of interrupt handler configurations for network interfaces using the Net DIM interface.
- Hardware
- The AMDGPU driver now includes initial support for AMD RDNA4 GPUs ('GFX12'). Support for technologies DCN 4.0.x, GC 12.0, GMC 12.0, SDMA 7.0, MES12, and MMHUB 4.1 has been added.
- Work continues on the Xe DRM driver (Direct Rendering Manager) for GPUs based on Intel Xe architecture, used in Intel Arc graphics cards and integrated graphics starting from Tiger Lake processors. GPU support has been improved for architectures Battlemage, Arrow Lake, and Lunar Lake.
- In the DRM subsystem (Direct Rendering Manager), the handler for monitor-provided EDID (Extended Display Identification Data) parameters has been rewritten.
- Support for the Battlemage Xe2 GPU has been added to the i915 driver, and the CMRR (Content Match Refresh Rate) mode is enabled by default.
- Support for the SM7150 platform and Adreno X185 and a505 GPUs has been added to the msm DRM driver (Qualcomm Adreno GPU).
- Support for screen panels Lincoln Tech Sol LCD185-101CT, Microtips Technology 13-101HIEBCAF0-C, Microtips Technology MF-103HIEB0GA0, BOE nv110wum-l60, IVO t109nw41, WL-355608-A8, PrimeView PM070WL4, Lincoln Technologies LCD197, Ortustech COM35H3P70ULC, AUO G104STN01, and K&d kd101ne3-40ti has been added.
- The audio subsystem has added support for chips and codecs including Intel Panther Lake, Asahi Kasei AK4619, Cirrus Logic CS530x, Everest Semiconductors ES8311, NXP i.MX95, LPC32xx, Qualcomm LPASS v2.5, WCD937x, Realtek RT1318, RT1320, and Texas Instruments PCM5242.
- The final batch of changes supporting the ARM SoC Snapdragon X Elite has been made, featuring a custom 12-core Qualcomm Oryon CPU and Qualcomm Adreno GPU. This chip is targeted for use in laptops and PCs, outperforming Apple M3 and Intel Core Ultra 155H in many benchmark tests. The changes added in kernel 6.11 relate to support for GPU Adreno X1-85 and power management. Notable devices based on the Snapdragon X Elite SoC include ASUS Vivobook S15 and Lenovo Yoga Slim7x.
At the same time, the Latin American Free Software Foundation has formed a fully free kernel variant 6.11 — Linux-libre 6.10-gnu, cleansed of firmware elements and drivers containing non-free components or sections of code whose application is restricted by the manufacturer. In release 6.11, the code for cleaning blobs in the mdgpu, adreno, vgxy61, atomisp, btnxpuart, prueth, and tas2781 drivers has been updated. Cleaning has been conducted for new drivers amdgpu isp, tn40, rtl8192du, cs40l50, rt1320, and pcie-rcar-gen4. Blob names have been cleaned in dts files (device tree) for the Aarch64 architecture. A version of primitives for loading firmware has been added that does not issue warnings and requests (nowait-nowarn). Code for identifying firmware loading primitives in Rust has also been added.
Source: opennet.ru
