Release of Linux Kernel 6.2

After two months of development, Linus Torvalds has announced the release of Linux Kernel 6.2. Among the most notable changes: approval of code submissions under the Copyleft-Next license, improved implementation of RAID5/6 in Btrfs, continued integration of Rust language support, reduced overhead in protection against Retbleed attacks, added control over memory consumption during write-backs, introduced a TCP protective load balancing mechanism (PLB), added a hybrid command execution flow protection mechanism (FineIBT), introduced the ability to define custom objects and data structures in BPF, included the rv (Runtime Verification) utility, and reduced energy consumption in RCU lock implementations.

The new version includes 16,843 fixes from 2,178 developers, with a patch size of 62 MB (changes affected 14,108 files, with 730,195 lines of code added and 409,485 lines removed). About 42% of all changes in 6.2 are related to device drivers, approximately 16% pertain to updates of architecture-specific code, 12% are related to the network stack, 4% to file systems, and 3% to internal kernel subsystems.

Major innovations in Kernel 6.2:

  • Memory and system services
    • The inclusion of code and changes supplied under the Copyleft-Next 0.3.1 license is permitted. The Copyleft-Next license was created by one of the authors of GPLv3 and is fully compatible with GPLv2, as confirmed by legal experts from SUSE and Red Hat. Compared to GPLv2, the Copyleft-Next license is significantly more compact and easier to understand (the introductory section and mention of outdated compromises have been removed), defines the timeline and process for addressing violations, and automatically waives copyleft requirements for outdated works older than 15 years.

      Copyleft-Next also includes a provision for granting rights to patented technologies, which, unlike GPLv2, makes this license compatible with the Apache 2.0 license. To ensure full compatibility with GPLv2, the Copyleft-Next text explicitly states that derivative works can be distributed not only under the original Copyleft-Next license but also under GPL.

    • The package includes the 'rv' utility, which provides an interface for user-space interaction with the Runtime Verification (RV) subsystem handlers, designed to verify the correctness of operation in high-reliability systems that guarantee fault-free performance. Verification is performed at runtime by attaching handlers to trace points that compare the actual execution flow with a predetermined reference deterministic automaton model defining the expected system behavior.
    • The zRAM device, which allows storing a swap partition in compressed memory (creating a block device in memory for swapping with compression), implements the ability to repackage pages using an alternative algorithm to achieve a higher level of compression. The main idea is to provide a choice among several algorithms (lzo, lzo-rle, lz4, lz4hc, zstd), each offering its compromises between compression/decompression speed and compression level, or optimized for special situations (for example, compressing large memory pages).
    • An 'iommufd' API has been added for managing the Input/Output Memory Management Unit (IOMMU) memory management system from user space. This new API allows managing I/O memory page tables using file descriptors.
    • The BPF now allows for the creation of types, definition of custom objects, building its object hierarchy, and flexible formation of custom data structures such as linked lists. Support for locks bpf_rcu_read_{,un}lock() has been added for BPF programs that enter sleep mode (BPF_F_SLEEPABLE). Support for saving task_struct objects has been implemented. A map type BPF_MAP_TYPE_CGRP_STORAGE has been added, providing local storage for cgroups.
    • For the RCU (Read-Copy-Update) locking mechanism, an optional 'lazy' callback mechanism has been implemented, where multiple callback calls are processed in batch mode by a timer. The proposed optimization allows a 5-10% reduction in energy consumption on Android and ChromeOS devices by deferring RCU requests during idle time or low system load.
    • A new sysctl split_lock_mitigate has been added to control the system's response when split locks are detected, which occur when accessing unaligned data in memory due to atomic instructions crossing two CPU cache lines. Such locks lead to a significant drop in performance. Setting split_lock_mitigate to 0 will only issue a warning about the problem, while setting it to 1 will not only issue a warning but also slow down the execution of the process that caused the lock, in order to maintain the performance of the rest of the system.
    • For the PowerPC architecture, a new implementation of qspinlock has been proposed, demonstrating higher performance and resolving some locking issues that occur in exceptional cases.
    • The MSI (Message-Signaled Interrupts) interrupt handling code has been reworked to eliminate accumulated architectural issues and add support for binding individual handlers to different devices.
    • For systems based on the LoongArch instruction set architecture used in Loongson 3 5000 processors, support for ftrace, stack protection, and sleeping and waiting modes has been implemented.
    • It is now possible to assign names to areas of shared anonymous memory (previously, names could only be assigned to private anonymous memory attached to a specific process).
    • A new kernel command line parameter 'trace_trigger' has been added, intended to activate a trace trigger used to bind conditional commands invoked when a control check occurs (for example, trace_trigger='sched_switch.stacktrace if prev_state == 2').
    • The requirements for the binutils package version have been increased. To build the kernel, at least binutils 2.25 is now required.
    • The exec() call has been enhanced to allow placing a process into a time namespace, where time differs from the system time.
    • The transfer of additional functionality from the Rust-for-Linux branch, related to using Rust as a second language for developing drivers and kernel modules, has begun. Rust support is inactive by default and does not result in adding Rust to the mandatory build dependencies of the kernel. The basic functionality proposed in the previous release has been expanded with capabilities for supporting low-level code, such as the Vec type and the pr_debug!(), pr_cont!(), and pr_alert!() macros, as well as the procedural macro '#[vtable]', simplifying work with function pointer tables. The addition of high-level Rust wrappers over kernel subsystems, allowing for the creation of full-fledged drivers in Rust, is expected in future releases.
    • The 'char' type used in the kernel is now declared as unsigned by default for all architectures.
    • The slab memory allocation mechanism SLOB (slab allocator), which was designed for systems with limited memory, is deprecated. Instead of SLOB, it is recommended to use SLUB or SLAB under normal conditions. For systems with limited memory, it is advisable to use SLUB in SLUB_TINY mode.
  • Disk subsystem, input/output, and file systems
    • Improvements have been made in Btrfs aimed at fixing the 'write hole' issue in the RAID 5/6 implementation (the attempt to recover RAID if a failure occurs during writing and it is impossible to determine which block was correctly written to which of the RAID devices, which can lead to the corruption of blocks corresponding to unwritten blocks). Additionally, for SSDs, asynchronous execution of the 'discard' operation is now automatically enabled by default whenever possible, allowing for higher performance due to the efficient batching of 'discard' operations in the queue and processing by a background handler. Performance increases have been observed for send and lseek operations, as well as for ioctl FIEMAP.
    • The capabilities for managing writeback (writeback, background saving of modified data) for block devices have been expanded. In some situations, such as when using network block devices or USB drives, writeback can lead to high memory consumption. To manage the behavior of writeback and keep the size of the page cache within certain limits in sysfs (/sys/class/bdi/), new parameters strict_limit, min_bytes, max_bytes, min_ratio_fine, and max_ratio_fine have been introduced.
    • The F2FS filesystem has implemented an ioctl operation for atomic replacement, allowing data to be written to a file within a single atomic operation. F2FS has also added a block extents cache, which helps identify actively used data or data that has not been accessed for a long time.
    • In the ext4 filesystem, only bug fixes are noted.
    • The ntfs3 filesystem has proposed several new mount options: 'nocase' for controlling case sensitivity in file and directory names; 'windows_name' to prohibit the creation of file names containing characters not allowed by Windows OS; 'hide_dot_files' for managing the hidden file attribute for files that start with a dot.
    • The Squashfs filesystem has implemented a mount option 'threads=', which allows you to specify the number of threads for parallelizing unpacking operations. Squashfs has also introduced the ability to map user identifiers of mounted filesystems, used to match a specific user's files on a mounted foreign partition with another user in the current system.
    • The implementation of POSIX Access Control Lists (POSIX ACL) has been reworked. The new implementation has eliminated architectural issues, simplified codebase maintenance, and employed safer data types.
    • The fscrypt subsystem, used for transparent encryption of files and directories, has added support for the SM4 encryption algorithm (Chinese standard GB/T 32907-2016).
    • The possibility of building the kernel without support for NFSv2 has been provided (future support for NFSv2 is planned to be completely discontinued).
    • The access rights checking organization for NVMe devices has been modified. Now, read and write access to the NVMe device is allowed if the writing process has access to a special device file (previously, the process needed the CAP_SYS_ADMIN privilege).
    • The CD/DVD batch driver, which was deprecated in 2016, has been removed.
  • Virtualization and Security
    • A new method of protection against the Retbleed vulnerability in Intel and AMD CPUs has been implemented, utilizing call depth tracking, which does not slow down performance as much as the previous Retbleed protection. To enable the new mode, the kernel command-line parameter "retbleed=stuff" is suggested.
    • A hybrid command execution flow protection mechanism called FineIBT has been added, combining the use of Intel's IBT (Indirect Branch Tracking) hardware instructions and the kCFI (kernel Control Flow Integrity) software protection to block control flow violations caused by exploits that change function pointers stored in memory. FineIBT allows indirect jumps only to the ENDBR instruction, which is placed at the very beginning of the function. Additionally, similar to the kCFI mechanism, a hash check is performed to ensure pointer integrity.
    • Restrictions have been added to block attacks that manipulate the generation of "oops" states, after which problematic tasks are terminated and the state is restored without stopping system operation. With a very high number of "oops" state calls, a refcount overflow occurs, allowing for the exploitation of vulnerabilities caused by dereferencing NULL pointers. To protect against such attacks, the kernel has added a limit on the maximum number of "oops" occurrences, after which the kernel will initiate a transition to "panic" mode with a subsequent reboot, preventing the number of iterations necessary to overflow the refcount. By default, the limit is set to 10,000 "oops", but it can be modified through the oops_limit parameter.
    • A configuration parameter LEGACY_TIOCSTI and a sysctl legacy_tiocsti have been added to disable the ability to place data into the terminal using ioctl TIOCSTI, as this functionality can be used to inject arbitrary characters into the terminal input buffer and simulate user input.
    • A new type of internal structure encoded_page has been proposed, in which the lower bits of the pointer are used to store additional information that is applied to protect against accidental pointer dereferencing (if dereferencing is truly necessary, these additional bits must be cleared first).
    • On the ARM64 platform, during the boot stage, the ability to enable and disable a software implementation of the Shadow Stack mechanism has been provided to protect against the overwriting of the return address from a function in the event of a stack buffer overflow (the essence of the protection is to save the return address in a separate 'shadow' stack after transferring control to the function and to retrieve this address before exiting the function). Support for both hardware and software implementations of Shadow Stack in one kernel build allows the same kernel to be used across different ARM systems, regardless of their support for pointer authentication instructions. The enabling of the software implementation is carried out by replacing necessary instructions in the code during boot.
    • Support has been added for the use of asynchronous exit notification on Intel processors, allowing for the detection of single-step attacks on code executed in SGX enclaves.
    • A set of operations has been proposed to enable the hypervisor to support requests from Intel TDX (Trusted Domain Extensions) guest systems.
    • Kernel build options RANDOM_TRUST_BOOTLOADER and RANDOM_TRUST_CPU have been removed; instead, the corresponding command line options random.trust_bootloader and random.trust_cpu should be used.
    • Support for the LANDLOCK_ACCESS_FS_TRUNCATE flag has been added to the Landlock mechanism, which restricts the interaction of a group of processes with the external environment, allowing control over file truncation operations.
  • Network subsystem
    • Support for PLB (Protective Load Balancing) has been added for IPv6, a load balancing mechanism between network links aimed at reducing congestion points on data center switches. By modifying the IPv6 Flow Label, PLB randomly changes packet paths to balance the load on switch ports. To minimize packet reordering, this operation is performed after idle periods whenever possible. The application of PLB in Google data centers has reduced port load imbalance on switches by an average of 60%, decreased packet loss by 33%, and lowered latency by 20%.
    • A driver for MediaTek devices with support for Wi-Fi 7 (802.11be) has been added.
    • Support for 800-gigabit links has been added.
    • The ability to rename network interfaces on-the-fly, without stopping operations, has been added.
    • Log messages about SYN floods now include the IP address to which the packet was sent.
    • For UDP, the ability to use separate hash tables for different network namespaces has been implemented.
    • Support for the MAB (MAC Authentication Bypass) authentication method has been implemented for network bridges.
    • For the CAN (CAN_RAW) protocol, support for the SO_MARK socket mode is available for attaching traffic filters based on fwmark.
    • A new bitmask parameter has been implemented in ipset, allowing the specification of a mask based on arbitrary bits in the IP address (e.g., 'ipset create set1 hash:ip bitmask 255.128.255.0').
    • Support for processing inner headers within tunneled packets has been added in nf_tables.
  • Hardware
    • An 'accel' subsystem has been introduced, implementing a framework for computation accelerators, which can be provided in the form of standalone ASICs or as IP blocks within SoCs and GPUs. Such accelerators are primarily aimed at speeding up machine learning tasks.
    • The amdgpu driver now supports IP components GC, PSP, SMU, and NBIO. For ARM64 systems, support for DCN (Display Core Next) has been added. The implementation of secure screen output has transitioned from DCN10 to DCN21 and can now be used when connecting multiple screens.
    • Support for discrete Intel Arc (DG2/Alchemist) graphics cards has been stabilized in the i915 (Intel) driver.
    • Support for NVIDIA GA102 (RTX 30) GPU based on the Ampere architecture has been implemented in the Nouveau driver. For nva3 (GT215) cards, the ability to control backlighting has been added.
    • Support has been added for wireless adapters based on Realtek 8852BE, Realtek 8821CU, 8822BU, 8822CU, 8723DU (USB), and MediaTek MT7996 chipsets, Broadcom BCM4377/4378/4387 Bluetooth interfaces, as well as Ethernet controllers Motorcomm yt8521 and NVIDIA Tegra GE.
    • Support has been added for ASoC (ALSA System on Chip) for integrated audio chips HP Stream 8, Advantech MICA-071, Dell SKU 0C11, Intel ALC5682I-VD, Xiaomi Redmi Book Pro 14 2022, i.MX93, Armada 38x, RK3588. Support has been added for the Focusrite Saffire Pro 40 audio interface. The Realtek RT1318 audio codec has also been added.
    • Support has been added for smartphones and tablets from Sony (Xperia 10 IV, 5 IV, X and X compact), OnePlus One, 3, 3T and Nord N100, Xiaomi Poco F1 and Mi6, Huawei Watch, Google Pixel 3a, Samsung Galaxy Tab 4 10.1.
    • Support has been added for ARM SoCs and Apple T6000 (M1 Pro), T6001 (M1 Max), T6002 (M1 Ultra), Qualcomm MSM8996 Pro (Snapdragon 821), SM6115 (Snapdragon 662), SM4250 (Snapdragon 460), SM6375 (Snapdragon 695), SDM670 (Snapdragon 670), MSM8976 (Snapdragon 652), MSM8956 (Snapdragon 650), RK3326 Odroid-Go/rg351, Zyxel NSA310S, InnoComm i.MX8MM, Odroid Go Ultra.

At the same time, the Latin American Free Software Foundation has created a variant of the fully free kernel 6.2 — Linux-libre 6.2-gnu, cleaned of firmware and driver elements containing proprietary components or code sections restricted by the manufacturer. This release includes the cleaning of new blobs in the nouveau driver. Blob loading has been disabled in the mt7622, mt7996 wifi, and bcm4377 bluetooth drivers. Blob names in dts files for the Aarch64 architecture have been cleaned. The cleaning code for blobs in various drivers and subsystems has been updated. The cleaning of the s5k4ecgx driver has been discontinued, as it has been removed from the kernel.

Source: opennet.ru

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