After two months of development, Linus Torvalds announced the release of the kernel . Among the most notable changes are: the KCSAN race condition detector, a universal notification delivery mechanism to user space, support for hardware inline encryption, enhanced protection mechanisms for ARM64, support for the Russian Baikal-T1 processor, the ability to mount procfs instances separately, and the implementation of Shadow Call Stack and BTI protection mechanisms for ARM64.
Kernel 5.8 has become the largest in terms of changes of all kernels in the history of the project. The changes are not related to any one subsystem, but cover various parts of the kernel and are primarily linked to internal redesigns and cleanups. The most changes are observed in drivers. The new version includes 17,606 fixes from 2,081 developers, affecting about 20% of all files in the kernel code repository. The patch size is 65 MB (the changes affected 16,180 files, with 1,043,240 lines of code added and 489,854 lines removed). In comparison, branch 5.7 had 15,033 fixes and a patch size of 39 MB. About 37% of all changes presented in 5.8 are related to device drivers, approximately 16% of changes pertain to updates to hardware-specific code, 11% relate to the networking stack, 3% to file systems, and 4% to internal kernel subsystems.
:
- Virtualization and Security
- The loading of kernel modules has been blocked if they have code sections that simultaneously have bits set for both execution and writing permissions. This change is made within the framework of a larger project aimed at eliminating the kernel's use of memory pages that allow both execution and writing.
- The ability to create separate instances of procfs has emerged, allowing for multiple procfs mount points to be mounted with different options while reflecting the same process ID namespace (pid namespace). Previously, all procfs mount points only mirrored a single internal representation, and any changes to the mount parameters affected all other mount points associated with the same process ID namespace. Areas that may require mounting with different options include the implementation of lightweight isolation for embedded systems, allowing certain types of processes and information nodes to be concealed in procfs.
- Support for the mechanism
, provided by the Clang compiler to protect against overwriting the return address from a function in the event of a stack buffer overflow. The essence of the protection lies in saving the return address in a separate 'shadow' stack after control is transferred to a function and retrieving this address before exiting the function. - Support for instructions (Branch Target Indicator) has been added for protecting the execution of instruction sets that should not be branched to. Blocking transitions to arbitrary code segments is implemented to counter the creation of gadgets in exploits that utilize return-oriented programming (ROP) techniques, where the attacker does not attempt to place their own code in memory but operates using existing pieces of machine instructions that end with a return control instruction, from which a call chain is built to achieve the desired functionality.
- Support for inline encryption hardware for block devices has been added (). Inline encryption devices are typically built into the storage but logically reside between system memory and the disk, performing transparent encryption and decryption of input/output based on the keys and encryption algorithm specified by the kernel.
- A kernel command line option 'initrdmem' has been added, allowing specification of the physical address placement of initrd in memory when placing the initial boot image in RAM.
- New capability added: CAP_PERFMON for accessing the perf subsystem and monitoring performance. , allowing the execution of certain operations with BPF (for example, loading BPF programs), which previously required CAP_SYS_ADMIN rights (the CAP_SYS_ADMIN privileges are now split into a combination of CAP_BPF, CAP_PERFMON, and CAP_NET_ADMIN).
- new virtio-mem device that enables hot-plugging and unplugging of memory to guest systems.
- Mapping operations are revoked in /dev/mem if the device driver uses overlapping memory areas.
- Added protection against the vulnerability , allowing restoration of the results of executing certain instructions performed on another CPU core.
- Memory and system services
- The document defining code formatting rules, includes recommendations for the use of inclusive terminology. Developers are discouraged from using the terms 'master/slave' and 'blacklist/whitelist', as well as the term 'slave' by itself. These recommendations apply only to new usage of these terms. Existing mentions in the kernel will remain untouched. In new code, the use of the flagged terms is permitted if required for maintaining the user-space API and ABI, as well as when updating code to support existing hardware or protocols that mandate specific terminology.
- A debugging tool has been included, (Kernel Concurrency Sanitizer), designed for dynamic detection of within the kernel. The use of KCSAN is supported when compiled with GCC and Clang and requires the addition of special modifications at the compilation stage to track memory access (breakpoints are used that trigger on reading or modifying memory). The main focus in the development of KCSAN has been on preventing false positives, scalability, and ease of use.
- Added Notification delivery from the kernel to user space. The mechanism is based on the standard pipe driver and allows for efficient distribution of notifications from the kernel through channels opened in user space. The notification reception points are pipes opened in a special mode, allowing the accumulation of messages from the kernel in a ring buffer. Reading is done using the standard read() function. The channel owner defines which sources in the kernel to monitor and can set filters to ignore messages and events of certain types. Currently, only key operations are supported as events, such as adding/removing keys and modifying their attributes. The specified events are planned for use in GNOME.
- The development of the 'pidfd' functionality has continued, which helps handle situations involving PID reuse (pidfd is linked to a specific process and does not change, whereas the PID can be reassigned to another process after the current one completes). The new version adds support for using pidfd to attach a process to namespaces (specifying pidfd is allowed when executing the setns system call). Using pidfd allows one call to manage the attachment of a process to multiple types of namespaces, significantly reducing the number of required system calls and achieving atomic attachment (if an error occurs when attaching to one of the namespaces, the others will not be connected).
- A new system call faccessat2() has been added, differing from
by an additional argument with flags that correspond to POSIX guidelines (previously these flags were emulated in the C library, and the new faccessat2 allows them to be implemented in the kernel). - In Cgroup the memory.swap.high setting can be used to slow down tasks that occupy too much space in the swap area.
- In the asynchronous input/output interface Support for the tee() system call has been added.
- A mechanism for thehas been introduced to output the contents of kernel structures to user space.
- The ability to use a ring buffer for data exchange between BPF programs has been added.
- In the mechanism , intended for organizing parallel task execution in the kernel, added support for multi-threaded tasks with load balancing.
- In the pstore mechanism, which allows saving debugging information about the crash reason in memory, retained between reboots, the backend for saving information on block devices.
- From the PREEMPT_RT kernel branch the implementation of local locks.
- a new buffer allocation API (AF_XDP), aimed at simplifying the writing of network drivers with XDP (eXpress Data Path) support.
- For the RISC-V architecture, support for debugging kernel components using KGDB has been implemented.
- Before the 4.8 release, the requirements for the GCC version that can be used to build the kernel have been raised. It is planned to increase the threshold to GCC 4.9 in one of the upcoming releases.
- Disk subsystem, input/output, and file systems
- In Device Mapper a new dm-ebs (emulate block size) handler, which can be used to emulate a smaller logical block size (e.g., to emulate 512-byte sectors on disks with a sector size of 4K).
- The F2FS file system has introduced support for compression using the LZO-RLE algorithm.
- In dm-crypt support for encrypted keys.
- In Btrfs, improved handling of read operations in direct I/O mode. When mounting checking for remote subvolumes and directories without a parent.
- In CIFS, a 'nodelete' parameter has been added, allowing regular permission checks on the server but prohibiting the client from deleting files or directories.
- In Ext4, error handling has been improved when using multithreading. In xattr, support for the gnu.* namespace, used in GNU Hurd, has been added.
- For Ext4 and XFS, support for DAX (direct access to the file system bypassing the page cache without using the block device layer) operations is enabled tied to individual files and directories.
- In the system call a flag has been added , when specified, the information is retrieved using the DAX mechanism.
- In EXFAT support for boot area verification.
- In FAT prefetching file system elements. Testing a slow 2TB USB drive showed a reduction in test time from 383 to 51 seconds.
- Network subsystem
- In the network bridge management code support for the protocol (Media Redundancy Protocol), which allows redundancy by looping several Ethernet switches.
- In the traffic control system (Tc) a new action 'gate', allowing the definition of time intervals for processing and discarding certain packets.
- Support for testing functions of connected network cables and self-diagnostics of network devices has been added to the core and utility ethtool.
- Support for the MPLS (Multiprotocol Label Switching) algorithm has been added to the IPv6 stack for packet routing using multiprotocol label switching (MPLS support for IPv4 was previously available).
- Support for the transmission of IKE (Internet Key Exchange) and IPSec packets over TCP () to bypass possible UDP blocks.
- The rnbd network block device allows organizing remote access to a block device via RDMA transport (InfiniBand, RoCE, iWARP) and the RTRS protocol.
- In the TCP stack, support for range compression in selective acknowledgment (SACK) responses has been added.
- For IPv6, support for TCP-LD (, Long Connectivity Disruptions) has been added.
- Hardware
- In the i915 DRM driver for Intel graphics cards, support for Intel Tiger Lake (GEN12) chips has been enabled by default, for which the capability to use the SAGV (System Agent Geyserville) system for dynamic adjustment of frequency and voltage based on power consumption or performance requirements has also been added.
- The amdgpu driver has added support for the FP16 pixel format and implemented the capability to work with encrypted buffers in video memory (TMZ, Trusted Memory Zone).
- Support for power consumption sensors of AMD Zen and Zen2 processors, as well as temperature sensors of AMD Ryzen 4000 Renoir, has been added. For AMD Zen and Zen2, support for retrieving power consumption information via the (Running Average Power Limit) interface has been provided.
- The Nouveau driver has added support for NVIDIA modifier formats. Support for interlaced output modes has been implemented for gv100. vGPU definition has been added.
- The MSM (Qualcomm) driver has added support for GPU Adreno A405, A640, and A650.
- an internal framework for managing DRM (Direct Rendering Manager) resources.
- Support for smartphones Xiaomi Redmi Note 7 and Samsung Galaxy S2, as well as laptops Elm/Hana Chromebook, has been added.
- Drivers for LCD panels have been added: ASUS TM5P5 NT35596, Starry KR070PE2T, Leadtek LTK050H3146W, Visionox rm69299, Boe tv105wum-nw0.
- Support for ARM platforms and Renesas platforms 'RZ/G1H', Realtek RTD1195, Realtek RTD1395/RTD1619, Rockchips RK3326, AMLogic S905D, S905X3, S922XH, Olimex A20-OLinuXino-LIME-eMMC, Check Point L-50,
, Beacon i.MX8m-Mini, Qualcomm SDM660/SDM630, Xnano X5 TV Box, Stinger96, Beaglebone-AI has been added. - Support for the MIPS processor Loongson-2K (shortened Loongson64) has been added. For the Loongson 3 CPU, virtualization support using the KVM hypervisor has been introduced.
-
Support for the Russian Baikal-T1 processor and its system-on-chip has been added. . The Baikal-T1 processor features two superscalar P5600 MIPS 32 r5 cores operating at a frequency of 1.2 GHz. The chip includes L2 cache (1 MB), a DDR3-1600 ECC memory controller, one 10Gb Ethernet port, two 1Gb Ethernet ports, a PCIe Gen.3 x4 controller, two SATA 3.0 ports, USB 2.0, GPIO, UART, SPI, and I2C. The processor provides hardware support for virtualization, SIMD instructions, and an integrated hardware accelerator for cryptographic operations that supports GOST 28147-89. The chip is designed using a licensed MIPS32 P5600 Warrior processor core from Imagination Technologies.
At the same time, the Latin American Free Software Foundation
variant — , cleaned of elements from firmware and drivers containing non-free components or code areas restricted by the manufacturer. In this release, the loading of blobs in drivers for Atom ISP Video, MediaTek 7663 USB/7915 PCIe, Realtek 8723DE WiFi, Renesas PCI xHCI, HabanaLabs Gaudi, Enhanced Asynchronous Sample Rate Converter, Maxim Integrated MAX98390 Speaker Amplifier, Microsemi ZL38060 Connected Home Audio Processor, and I2C EEPROM Slave has been disabled. The blob cleaning code in drivers and subsystems for Adreno GPU, HabanaLabs Goya, x86 touchscreen, vt6656, and btbcm has been updated.
Source: opennet.ru
