Release of Linux Kernel 7.0

After two months of development, Linus Torvalds presented the release of Linux Kernel 7.0. Key changes include: guidelines for the use of AI assistants, integration of Rust into the kernel's core features, improved swap performance, default inclusion of PREEMPT_LAZY mode, support for filters in io_uring operations, a new filesystem Nullfs, fserror infrastructure, XFS monitoring tools, remapping support in Btrfs, default inclusion of NFS version 4.1, integration of post-quantum cryptographic algorithm ML-DSA, activation of AccECN in the networking subsystem, and initial support for WiFi 8.

The number 7.0 was assigned because the 6.x branch accumulated enough releases to change the first digit of the version number (at the time, version 6.0 was released right after 5.19). The change in numbering is made for aesthetic reasons and is a formal step to alleviate discomfort from the accumulation of a large number of releases in the series.

In the new version, 15624 fixes from 2477 developers were accepted, the patch size is 56 MB (changes affected 18053 files, added 704060 lines of code, and removed 278132 lines). In the previous release, there were 15657 fixes from 2237 developers, with a patch size of 52 MB. About 51% of all changes presented in 7.0 are related to device drivers, approximately 11% pertain to the update of architecture-specific code, 14% is related to the networking stack, 5% to file systems, and 3% to internal kernel subsystems.

Key innovations in Kernel 7.0 (1, 2, 3):

  • Disk subsystem, input/output, and file systems
    • The fserror infrastructure has been implemented, and an API has been added to retrieve information about input/output errors and metadata corruption when working with files. The proposed infrastructure unifies the transmission of error information to user space in file systems through the fsnotify mechanism.
    • New features have been added to XFS for monitoring the status of the file system from user space. The ioctl operation XFS_IOC_HEALTH_MONITOR has been proposed, which returns a file descriptor that can provide information about failures related to metadata corruption or input/output errors, as well as track changes in file system states such as unmounting and shutdown. Additionally, a background process managed by systemd called xfs_healer has been introduced, handling file system status events from user space and automatically invoking recovery procedures when needed.
    • The Btrfs file system has added experimental support for the 'remap tree' structure, which may be utilized in the future as an intermediate layer during input/output operations. The essence of this new feature is that after moving data on the storage device, instead of updating all associated structures, old and new data addresses are saved in the additional 'remap tree' structure, allowing for address substitution when accessing the data. This new approach is presented as being more reliable and flexible, as well as simplifying the further expansion of Btrfs functionality.
    • Btrfs has implemented support for direct input/output in situations where the block size exceeds the memory page size in the system.
    • A new file system called 'Nullfs' has been included, which can be used as a placeholder for the root file system. The Nullfs file system is always empty, contains no data, and does not support modifications. The purpose of Nullfs is to serve as the initial file system to simplify the system boot process—other file systems are subsequently mounted on top of Nullfs, and the pivot_root() system call is used to switch the root file system instead of clearing the contents of initramfs and using the associated root file system.
    • The update of file modification time information has been implemented in a non-blocking mode. Previously, the file_update_time_flags() call with the IOCB_NOWAIT flag returned the error '-EAGAIN', preventing the use of direct write operations in non-blocking mode.
    • In file systems, the support for notification locks (lease) has been translated into a separate option. By default, this mechanism is not activated due to issues with file systems that were not originally designed for its use. For example, it is not supported by file systems 9p and cephfs.
    • In the EROFS (Extendable Read-Only File System), designed for sections accessible in read-only mode, the LZMA algorithm is used for compression by default. The DEFLATE and Zstandard algorithms are now available optionally and are no longer marked as experimental. Shared page cache usage for identical files in separate EROFS file systems has been implemented.
    • The laptop_mode, which saves power by deferring and merging write operations to the hard disk in order to extend the disk's sleep duration and reduce wake-ups, has been removed. This mode has become obsolete as solid-state drives have replaced hard disks in modern mobile devices.
    • The F2FS file system has been transitioned to use large memory page folios.
    • Work on the ntfs3 driver, developed by Paragon Software, has been revived. Support for file operations based on iomap has been added, including the llseek SEEK_DATA/SEEK_HOLE options, and a delalloc mode for deferred block allocation has been implemented. Meanwhile, in the kernel developers' mailing list, the inclusion of a new NTFS implementation — ntfsplus, developed to replace ntfs3, was approved for one of the upcoming kernel versions in February.
    • By default, version 4.1 of the NFS protocol (CONFIG_NFS_V4_1) is included in the build. Export locking through NFS for specialized pseudo-file systems, such as pidfs and nsfs, is provided. An experimental capability for using POSIX ACL has been implemented in NFSD, and support for dynamically changing the thread pool based on load has been added.
  • Memory and system services
    • The official rules for the use of AI assistants and the inclusion of automatically generated content in the core have been approved. When transmitting generated code, it must be marked by specifying the AI assistant used with the tag "Assisted-by." AI assistants are prohibited from adding the tag "Signed-off-by" — the person submitting the patch is considered its author, is responsible for the submitted change, and guarantees its quality. Developers are required to conduct manual reviews of the code obtained through AI and check for compliance with licensing requirements.
    • Rust support has been moved from experimental to core main features. Rust support is not enabled by default and does not result in including Rust among the mandatory build dependencies for the kernel.
    • The integration of the "Swap Table" mechanism into the kernel has been completed, allowing for improved swap performance. This acceleration is achieved by reducing contention for access to the swap cache, more efficient searching in the cache, and reducing fragmentation. The Swap Table backend is utilized for caching swaps instead of the XArray backend and allowed for a 22% increase in the number of requests handled during the redis-benchmark test with BGSAVE.
    • Support has been added for the new Thread Safety Analysis extension introduced in Clang 22, which helps detect potential race conditions and errors caused by incorrect lock placements at compile time. The extension offers a series of attributes such as GUARDED_BY(…), REQUIRES(…), RELEASE(…) and ACQUIRE(…) to mark functions covered by locks and delineate lock scopes (define context). Compile-time checks are performed to verify the correct application of synchronization primitives such as mutexes based on evaluating the activity or inactivity of the associated context.
    • A new flag OPEN_TREE_NAMESPACE has been added to the open_tree system call to simplify the configuration of isolated containers and accelerate the startup of containers on systems with a large number of mount points. Similar to OPEN_TREE_CLONE, the new flag copies only the specified mount tree, but instead of returning a local file descriptor, it returns a file descriptor in a new mount namespace where the copied tree is mounted over a copy of the actual root filesystem. The OPEN_TREE_NAMESPACE flag is needed to avoid separate execution of the unshare(CLONE_NEWNS) and pivot_root() operations used when creating containers.
    • The rseq system call has been enhanced with an extension mechanism for time slices, allowing for additional CPU time for uninterrupted execution of critical sections. The idea is to avoid interruption by the task scheduler of a critical section with a set lock, which leads to control being transferred to other threads that use the resource while the lock remains set. The extension of the time slice occurs without additional overhead but does not provide the strict guarantees offered by full priority regulation.
    • For architectures arm64, loongarch, powerpc, riscv, s390, and x86, the task preemption mode in the scheduler by default has changed from PREEMPT_NONE to PREEMPT_LAZY. The number of possible modes has been reduced from four to two—PREEMPT_FULL and PREEMPT_LAZY (the modes PREEMPT_NONE and PREEMPT_VOLUNTARY are retained only for architectures that do not support PREEMPT_FULL and PREEMPT_LAZY). The PREEMPT_LAZY mode applies the full preemption model (PREEMPT_FULL) for realtime tasks (RR/FIFO/DEADLINE) but delays the preemption of normal tasks (SCHED_NORMAL) until the tick boundary. This delay reduces the instances of preemption for lock holders, allowing performance to approach that of configurations using the voluntary preemption model, i.e., PREEMPT_LAZY maintains the capabilities of full preemption for realtime tasks while minimizing performance degradation for normal tasks.

      Enabling PREEMPT_LAZY has led to a significant regression, halving PostgreSQL performance on ARM64 systems. To mitigate the performance drop, PostgreSQL developers are advised to enable the PR_RSEQ_SLICE_EXTENSION option to reduce the likelihood of lock holder eviction.

    • The transfer of changes from the Rust-for-Linux branch continues, relating to the use of Rust as a secondary language for developing drivers and kernel modules. Thanks to the previously integrated 'syn' library, which simplifies the writing of complex macros, the size of Rust code in the kernel has been reduced by streamlining the definitions of existing procedural macros. The capabilities of the kernel, macros, and pin-init libraries have been expanded.
    • An option has been added to the io_uring asynchronous I/O system for using non-circular submission queues, which are cached more effectively when the request execution completes before returning from the system call.
    • In the eBPF subsystem within the BTF (BPF Type Format) mechanism, which provides information for type-checking in BPF pseudocode, binary search has been used to find debugging information, improving the efficiency of loading BPF programs. Support for implicit arguments in the kfunc (kernel functions available for use in BPF programs) calls defined with the KF_IMPLICIT_ARGS flag has been added to eBPF.
    • The code for supporting the initial RAM disk (initrd) based on linuxrc, which was long declared deprecated, has been removed. Remaining initrd implementations are planned for removal in 2027. Instead of initrd, initramfs should be used (the difference is that initrd places the initial boot environment in a disk image, while initramfs places it in the file system).
    • In the zram block device, used for compressed storage of swap space in memory, the logic for handling compressed memory pages has been changed when optionally moving data to persistent storage in the event of available memory filling up. Previously, memory pages were unpacked before being written to physical storage, but now they are saved as is in compressed form, reducing CPU load and saving energy during standalone operation.
    • The timerlat utility, designed to measure delays when using the task scheduler, has added the option "--bpf-action" to run BPF programs if a specified threshold is exceeded.
    • The ftrace tracing system has introduced the "bitmask-list" setting to output bit masks in a readable format (as a list of bits instead of a hexadecimal number). Added features for auditing filters and triggers in tracefs. A new command, "perf sched stats," has been added to collect and display statistics about the task scheduler's operation.
    • Build options LOGO_LINUX_MONO_FILE, LOGO_LINUX_VGA16_FILE, and LOGO_LINUX_CLUT224_FILE have been added to specify the logo image file displayed during kernel boot instead of the default logo featuring the penguin Tux.
  • Virtualization and Security
    • In the io_uring asynchronous I/O system, the ability to attach BPF programs with filters has been implemented, controlling what specific SQE (Submission Queue Entry) operations can do (similar to system calls in io_uring). This added feature is analogous to syscall filters. Filters can be bound to specific tasks and are inherited when other processes are spawned after a fork(). With active filters, additional filters can only impose further restrictions but cannot disable existing ones. This capability allows blocking methods for circumventing syscall filtering in sandbox environments by executing similar operations provided in io_uring instead of system calls.
    • SELinux has gained the ability to manage access to BPF tokens, allowing unprivileged processes to perform certain privileged operations with BPF, such as loading BPF programs into the kernel and creating map structures.
    • Support has been added for the digital signature generation algorithm ML-DSA (CRYSTALS-Dilithium), based on lattice theory and resistant to brute-force attacks from quantum computers. ML-DSA can be used for authenticating kernel modules.
    • The use of signature generation schemes with the SHA-1 algorithm for signing kernel modules has been removed (support for loading signed modules is retained).
    • The NETFILTER_PKT audit record has been enhanced with the fields 'sport' and 'dport' to inspect network port numbers, not just. (the key to connect to is specified, and iroh finds the associated host and establishes an encrypted connection using the QUIC protocol). Direct P2P connections are established whenever possible, but if not, it falls back to using relays, which are also employed for host discovery by keys. You can run your own relay or connect to public relays supported by the community..
    • Support for the Zicfiss and Zicfilp extensions has been implemented for systems with RISC-V architecture, providing hardware capabilities for applying Control Flow Integrity (CFI) protection, which blocks violations of the normal order of instruction execution (control flow) due to exploits that modify stored function pointers in memory.
    • In the hypervisor KVM , the ability to pass information to guest systems about the support of the ERAPS (Enhanced Return Address Predictor Security) extension by the processor has been implemented, allowing some CPU state reset operations to be avoided when control is returned from the guest system to the host. Additionally, support has been added for binding performance monitoring hardware (PMU, Performance Monitoring Unit) to guest systems, which increases profiling accuracy compared to using emulated PMUs.
    • Support for the debugfs interface has been added to the Hyper-V hypervisor driver to view statistics about the hypervisor's operation.
  • Network subsystem
    • The AccECN (Accurate Explicit Congestion Notification) extension is enabled by default, implementing an improved version of the ECN extension, allowing hosts to mark IP packets in case of congestion instead of dropping them, enabling the detection of the initial stage of congestion in communication channels without packet loss. The original ECN extension has a limitation that allows only one congestion signal to be sent within a single TCP round-trip time (RTT, Round-Trip Time, sending a request and receiving a response). AccECN removes this limitation and allows the recipient to send more than one congestion mark to the sender in the TCP packet header. Congestion control algorithms can use the information received for more accurate responses to congestion without resorting to a sharp decrease in packet sending intensity when minor congestion occurs.
    • The implementation of Cake's network queue management algorithm now includes the ability to handle multiple queues for load distribution across multiple CPU cores. The CAKE algorithm is applied to reduce the negative impact of intermediate packet buffering on boundary network devices, aiming to achieve the maximum possible bandwidth and lowest latency even on slow communication channels.
    • Support for network namespaces has been added to VSOCK sockets used for interaction with virtual machines.
    • An initial implementation of the future WiFi 8 standard (802.11bn, Ultra High Reliability WiFi) has been added.
    • Optimizations have been introduced that improve the processing performance of incoming UDP packets by 12% during stress testing in a 100-gigabit network.
  • Hardware
    • Support for IP blocks used in new AMD GPUs, such as SMUIO 15.x, PSP 15.x, IH 6.1.1/7.1, MMHUB 3.4/4.2, GC 11.5.4/12.1, SDMA 6.1.4/7.1/7.11.4, and JPEG 5.3, has been implemented in the AMDGPU driver.
    • Frequency management has been improved in the Nouveau driver for Tegra 186+ systems.
    • Initial support for the display IP block Xe3p_LPD, used in Intel Nova Lake-P processors, has been added to the i915 driver.
    • Work continues on the drm driver (Direct Rendering Manager) for Xe GPUs based on the Intel Xe architecture, which is used in Intel Arc graphics cards and integrated graphics starting from Tiger Lake processors. A Multi Queue mode has been added. Components necessary for diagnosing GPU hangs in Mesa have been included. Support for the MERT mechanism for GPU memory access management has also been added.
    • Integration of Nova driver components for NVIDIA GPUs equipped with GSP firmware, used starting with the NVIDIA GeForce RTX 2000 series based on the Turing microarchitecture, is ongoing. The driver is written in Rust. This version prepares for the implementation of support for Turing-based GPUs and includes various internal changes.
    • Support has been added for controllers and peripherals with multi-channel SPI (Serial Peripheral Interface), allowing data to be transmitted in multiple parallel streams.
    • A driver for combined Type-C connectors used in devices with Apple Silicon chips has been added, integrating USB3, DP-AltMode, and Thunderbolt/USB4 interfaces.
    • Support added for audio subsystems of Tegra238 chipsets, Minisforum V3 SE, iBasso DC04U, Intel Nova Lake, Nova Lake S, and Focusrite Forte.
    • Support added for ARM platforms, SoCs, and devices: Arduino UnoQ, OrangePi 6 Plus, OrangePi CM5, Anbernic RG-DS, Realtek Kent, Qualcomm Kaanapali, Mediatek Ezurio, Facebook Anacapa, Microchip LAN9668, Khadas VIM1S, QNAP TS133, i.MX952, i.MX93, i.MX94, VHIP4 EvalBoard, TQ-Systems MBLS1028A, Agilex5, Radxa CM3J, Glymur.
    • Support added for smartphones and tablets: Fairphone Gen 6 (SoC Qualcomm Milos/Snapdragon 7s Gen 3), Pixel 3/3 XL, Microsoft Surface Pro 11.

Simultaneously, the Latin American Free Software Foundation released a fully free kernel version 7.0 — Linux-libre 7.0-gnu, which has been cleansed of firmware and driver elements containing non-free components or code segments restricted by the manufacturer. Version 7.0 has been cleaned from iwlwifi driver blobs. The cleaning code for the amdgpu, adreno, TI PRUeth, air_en8811h, ath12k, TI VPE, rtw8852b, rt1320, rt5575 SPI, tas2783, and Intel catpt drivers has been updated. Blob names in dts files (device tree) for ARM chips have been cleansed.

Source: opennet.ru

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