Linux Kernel 6.6 Release

After two months of development, Linus Torvalds has released Linux Kernel 6.6. Some of the most notable changes include: the new EEVDF task scheduler; a shadow stack mechanism to protect against exploits; fs-verity support in OverlayFS; implementation of quotas and xattr in tmpfs; preparation for online fsck in XFS; enhanced tracking of 'GPL-only' symbol exports; support for network sockets in io_uring; memory randomization in kmalloc(); declaration of ReiserFS as deprecated; and new primitives added to Nouveau for the Vulkan driver NVK.

The new version includes 15,291 fixes from 2,058 developers, with a patch size of 39 MB (changes affected 14,844 files, added 553,359 lines of code, and removed 284,012 lines). The previous release had 14,674 fixes from 2,016 developers, with a patch size of 78 MB. About 44% of all changes in 6.6 are related to device drivers, approximately 17% pertain to updating hardware-specific code, 11% to the network stack, 4% to file systems, and 3% to internal kernel subsystems.

Key Innovations in Kernel 6.6:

  • Memory and system services
    • A new EEVDF (Earliest Eligible Virtual Deadline First) task scheduler has been implemented, replacing the CFS (Completely Fair Scheduler), which has been included since kernel 2.6.23. The new scheduler takes into account processes that have either under-utilized CPU resources or received an undeservingly large amount of CPU time when selecting the next process to run. In the first case, control is forcibly transferred to the process, while in the second, it is postponed. The old CFS scheduler used heuristics and fine-tuning to identify processes needing special attention, whereas the new scheduler tracks them more explicitly and does not require fine-tuning. EEVDF is expected to reduce task execution delays that CFS struggled with.
    • Changes have been made to the processing of internal symbols in the 'GPL-only' category, aimed at complicating the use of proprietary modules by GPL overlays to circumvent access restrictions to kernel subsystems, which only allow code licensed under GPL. In the function symbol_get(), searching for symbols marked as GPL-only is prohibited for proprietary modules, and conversely, GPL modules will not be able to find symbols exported by proprietary modules.
    • Additional settings for workqueues (unbound workqueue) have been added to improve the efficiency of processor cache reuse on large systems with multiple Level 3 (L3) caches. The kernel also includes the utility tools/workqueue/wq_dump.py for checking the current configuration of workqueues.
    • Initial support for operations and commands specific to network sockets has been added to the io_uring subsystem. A sysctl io_uring_disabled has been added to disable io_uring at the system level. Direct I/O has also been significantly accelerated in asynchronous mode within io_uring. The throughput gain and reduction in latency for I/O operations after these changes reach 37%.
    • A JIT compiler for BPF has been implemented for the PA-RISC architecture.
    • Support for numeric parameters that define the number of threads available for each CPU core has been added to the configuration at /sys/devices/system/cpu/smt/control (previously only 'on' and 'off' values for enabling and disabling symmetric multithreading were supported). This new feature can be applied on some PowerPC processors that support hotplugging of symmetric multithreading ('hotplug SMT'), allowing selective enabling of SMT on specific cores during operation.
    • The integration of changes from the Rust-for-Linux branch concerning the use of Rust as a secondary language for developing drivers and kernel modules has continued (Rust support is not enabled by default and does not make Rust a required build dependency for the kernel). The transition to Rust 1.71.1 and bindgen 0.65.1 has been achieved. The ‘Zeroable’ trait has been implemented. Procedural macros ‘paste!’ and ‘#[derive(Zeroable)]’ have been added. Compatibility with ‘#[pin_data]’ has been ensured. Initialization functions ‘{,pin_}init_array_from_fn()’ and method ‘{,pin_}chain’ have been added. The capabilities of the ‘types’ module have been expanded. The kunit unit testing framework now allows running tests from Rust documentation.
    • The ‘eventfs’ subsystem has been added, which significantly reduces memory consumption in the tracing system by eliminating the need to store unnecessary structures used to represent tracepoints in the filesystem. Previously, such structures were created for all tracepoints, regardless of tracing usage. With eventfs, such structures can be created dynamically only when they are needed.
    • The capabilities of the perf utility have been expanded.
    • Information has been added to the file /proc/pid/smaps for diagnosing the efficiency of the identical memory page merging mechanism (KSM, Kernel Samepage Merging).
    • The Frontswap API, which allowed placing a swap area in memory that could not be directly addressed and that did not provide real-time information about available space, has been removed. This API was used only in zswap, so it has been decided to directly use this functionality in zswap, eliminating unnecessary layers.
    • For the RISC-V architecture, support for accessing performance counters from user space has been added, along with the ability to place kernel dumps after crashes in memory beyond 4GB.
    • Initial support for ARM SME (Scalable Matrix Extension) instructions has been added.
    • The capability to use the KDB, KGDB, kcov, KFENCE, and KASAN debugging tools on LoongArch architecture systems has been implemented.
    • Support for files for kernel testing in the GitLab continuous integration system, which is used in the development of graphic drivers, has been added.
  • Disk subsystem, input/output, and file systems
    • The OverlayFS file system has added support for saving fs-verity hashes in the extended attribute (xattr) overlay.verity, which can be used to verify the integrity and authenticity of files in the lower layers of OverlayFS using cryptographic hashes and keys. Thus, all changes necessary for the Composefs project to function as an overlay on top of the OverlayFS and EROFS have now been included in OverlayFS.
    • The XFS file system has been prepared for the implementation of the fsck utility to check and fix identified problems in online mode, without unmounting the file system. In addition, XFS has implemented the ability to use large folios in the page cache and added some related optimizations, significantly improving performance for certain types of workloads.
    • The tmpfs file system has added support for user extended attributes (user xattrs), direct input/output, and user and group-bound quotas. Directory offsets have been stabilized, resolving issues with exporting tmpfs over NFS.
    • In the mount management API, a flag FSCONFIG_CMD_CREATE_EXCL has been added to enhance security by prohibiting the sharing of the superblock across multiple mount points (disallowing attachment of a single partition to multiple mount points). The mount utility offers the option "--exclusive" to enable this flag.
    • Support for dynamically changing access and modification time parameters (atime, mtime) has been added to the VFS subsystem. Previously, time data was reflected with some delay, hindering the tracking of data relevance in caches in systems like NFS (due to the delay in detecting changes in the file, the system could mistakenly consider that data in the cache were current). This new feature is available for Btrfs, Ext4, tmpfs, and XFS.
    • In Btrfs, the built-in integrity check mechanism, enabled during the build stage via the BTRFS_FS_CHECK_INTEGRITY parameter, has been deprecated. This mechanism has been left without support, is no longer tested, and creates additional CPU and memory load. Moreover, performance optimizations have been made for the new file system check code (scrub) in Btrfs.
    • Periodic checks for superblock updates have been added to the Ext4 file system, and memory allocation operations during appends to the end of a file have been accelerated.
    • The FUSE subsystem now supports the btime attribute ("birth time"), which specifies the creation time of an inode.
    • Modifying access rights for symbolic links is prohibited.
    • A new system call fchmodat2() has been added, which differs from the existing fchmodat() system call by having an additional argument for flag specification. Currently, only AT_SYMLINK_NOFOLLOW and AT_EMPTY_PATH flags are supported, which allow the libc function fchmodat() to enforce a prohibition against dereferencing symbolic links and to use a file descriptor when specifying an empty path without workarounds.
    • The EROFS (Extendable Read-Only File System), designed for use on read-only accessible partitions, now includes support for the Deflate compression algorithm. A probabilistic bloom filter structure has been employed to speed up the search for extended attributes.
    • A new CONFIG_BUFFER_HEAD setting has been added, allowing the kernel to be built without the buffer_head structure. When built without buffer_head, block devices and certain file systems like xfs, btrfs, cramfs, erofs, and squashfs can still be used.
    • The ublk block device driver, which allows moving specific logic to the user space process side, now supports zoned storage devices (segregating groups of blocks or sectors, which permit only sequential data additions while updating the entire group of blocks).
    • The implementation of the ReiserFS file system has been moved from the supported category to obsolete. Support for ReiserFS is slated to end in 2025. The reasons for this classification include stagnation in maintenance, unresolved year 2038 issues, lack of fault tolerance capabilities, and a desire to reduce maintenance efforts for common filesystem changes related to new API support for mounting, iomap, and folios.
    • A delegation mechanism for write operations for NFSv4 has been implemented in the NFS server, enhancing the efficiency of file write caching to reduce traffic. Support for the READ_PLUS operation defined in NFS 4.2 has been included.
    • Support for fscrypt has been added to the Ceph file system.
  • Virtualization and Security
    • An implementation of the Shadow Stack mechanism has been added, allowing the blocking of many exploits by utilizing the hardware capabilities of Intel processors to protect against overwriting the return address from a function in the event of a stack buffer overflow. The essence of the protection is that after control is transferred to the function, the return address is saved by the processor not only in the regular stack but also in a separate 'shadow' stack that cannot be directly modified. Before exiting the function, the return address is extracted from the shadow stack and compared with the return address from the main stack. A mismatch leads to the generation of an exception, blocking situations where an exploit has managed to overwrite the address in the main stack. The hardware shadow stack is supported only in 64-bit builds, while in 32-bit builds, software emulation is used.
    • Support for building with the Clang compiler with the CFI (Control Flow Integrity) protection mode enabled has been added, blocking violations of the normal control flow order resulting from exploits that modify stored function pointers in memory.
    • For the RISC-V architecture, kernel placement randomization upon boot has been enabled.
    • The seccomp() system call has been enhanced with the SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP flag, allowing events from monitored processes to be handled synchronously for more efficient task scheduling.
    • Randomization of slab caches has been implemented in the kmalloc() function, making it more difficult to exploit vulnerabilities in the kernel.
    • References to the U.S. National Security Agency have been removed from options related to the enabling of the SELinux mandatory access control system. Since the project has been developing under the community's wing for 20 years and is maintained by independent maintainers, it has been decided to transition to the use of the name 'SELinux' instead of 'NSA SELinux' in comments and documentation in Kconfig (for example, the explanation for the build option SECURITY_SELINUX has been changed from 'NSA SELinux Support' to 'SELinux Support').
    • The userfaultfd() system call has introduced the UFFDIO_POISON operation, allowing pages of memory to be marked as 'poisoned,' which can be used for transferring damaged memory pages during migration. of virtual machines from one system to another.
    • A new character interface has been added to the VFIO subsystem ( /dev/vfio/devices/vfioX ) for managing VFIO devices, allowing the user to directly open the device file without referring to the deprecated group interface /dev/vfio/$groupID.
    • In server Support for deprecated Kerberos encryption types using DES and 3DES algorithms has been discontinued in NFS.
    • Support has been added for guest systems secured with AMD SEV-SNP (Secure Nested Paging) and Intel TDX (Trusted Domain Extensions) technology when running in a Hyper-V hypervisor environment.
    • When building the kernel in 'W=1' mode, compiler warnings '-Wformat-overflow', '-Wformat-truncation', '-Wstringop-overflow', and '-Wrestrict' are enabled by default. The warning '-Wenum-conversion' is enabled for all builds.
  • Network subsystem
    • The implementation of the AF_XDP (eXpress Data Path) address family has been expanded to work with packets stored in multiple buffers (for instance, one buffer may contain the packet header while another holds the data, or a chain of several buffers may contain large Ethernet jumbo frames). Programs using AF_XDP sockets can now receive and transmit packets directly from multiple buffers.
    • Support for IPv4 and IPv6 packet defragmentation, along with the ability to filter fragmented packets, has been added to the BPF subsystem.
    • A new handler, update_socket_protocol, has been added to BPF, allowing BPF programs to change the requested protocol for new sockets. For example, a BPF program can transparently replace the TCP protocol with MPTCP (multipath TCP) to optimize application traffic. BPF also added support for controlling packet routing across different streams in MPTCP.
    • The experimental development status has been removed from the ksmbd module, which provides a working kernel-level implementation of a file server based on the SMB3 protocol. Support for combining read operations (read compound requests) has been added.
  • Hardware
    • Changes necessary for the efficient operation of the open NVK driver with the Vulkan graphics API implementation for NVIDIA graphics cards have been made to the DRM subsystem (Direct Rendering Manager). Initially, the Nouveau DRM driver was designed for OpenGL, so it lacks the primitives necessary for the efficient operation of Vulkan drivers, such as synchronized object support and management of virtual address space.
    • The AMDGPU driver has implemented support for SDMA 6.1.0, HDP 6.1, SMUIO 14.0, PSP 14.0, IH 6.1, and GFX 9.4.3. The code for loading PSP (Platform Security Processor) firmware has been reworked. Support for FreeSync adaptive synchronization technology has been expanded (added support for Freesync Panel Replay V2).
    • The i915 driver continues the implementation of support for Intel Meteor Lake chips. Improved support for HDCP (High-bandwidth Digital Content Protection) technology. The code for interaction with the display has been reworked.
    • The Kconfig options to disable microcode loading during the build phase — MICROCODE_INTEL and MICROCODE_AMD — have been removed. The kernel is now always built with microcode loading code for x86 systems, but actual microcode loading can be disabled by specifying the kernel parameter ‘dis_ucode_ldr’.
    • The sound subsystem has been enhanced with the ability to manage sound devices connected via the IIO (Industrial I/O) subsystem.
    • Support for Intel LunarLake, Intel ArrowLake, and AMD ACP5x audio interfaces has been added, along with codecs Cirrus Logic CS42L43, Realtek RT1017, and TI TAS2781, as well as amplifiers Cirrus Logic CS35L56 and winic aw88261. ASoC support for AMD Van Gogh has been added.
    • A USB MIDI 2.0 Gadget driver has been added, emulating a USB MIDI 2.0 interface tied to an ALSA UMP rawmidi device.
    • Support for Broadcom ASP 2.0 and Marvell 88Q2XXX Ethernet controllers has been added.
    • Support for Visionox R66451, TDO TL050HDV35, KD070FHFID015, Inanbo T28CP45TN89, and EDT ET028013DMA panels, display controllers from Loongson, and touch screen controllers Azoteq IQS7222D/IQS7210A/7211A has been added.
    • Support for ARM SoCs Qualcomm SM4450 (Snapdragon 4 Gen 2), TI AM62P5, Intel Agilex5, Qualcomm ipq5018, and AN400 (Amlogic T7) has been added.
    • ARM platforms such as Samsung Galaxy Tab 3 8.0, FriendlyElec NanoPC T6, Amlogic A311D2, Khadas Vim4, Xiaomi SM7125, Facebook Yosemite 4, Orange Pi Zero 3, and Radxa ROCK 4SE have been added.

At the same time, the Latin American Free Software Foundation has created a completely free variant of kernel 6.6 — Linux-libre 6.6-gnu, stripped of elements of firmware and drivers containing non-free components or code segments whose scope is limited by the manufacturer. In the 6.6 release, the code for cleaning blobs in various drivers and subsystems has been updated, for example, in drivers for TI gigabit RU ethernet, MediaTek 792x wifi, Cirrus Logic cs42l43 mfd, cs35l56 HD-audio, and aw88261 SoC. Blob names in dts files for the Aarch64 architecture have been cleaned. Blobs in new ivpu drivers, bluetooth drivers, touchscreen drivers, and in the Qualcomm Venus V4L2 encoder/decoder have been removed.

Source: opennet.ru

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