關注了就能看到更多這麼棒的文章哦~

5.8 Merge window, part 2

By  Jonathan Corbet

June 14, 2020

原文來自:https://lwn.net/Articles/822527/

Linus Torvalds發佈5.8-rc1並關閉本次開發週期的合併窗口的時候,已經有14,206個 changeset合入了5.8開發週期內。這比起5.7版本的週期中所有changeset的數量還要高,很明顯kernel開發工作並沒有被外界紛擾拖慢。上次總結之後已經有6,700個改動合入了,包括許多的bug fix以及內部清理工作,不過還是有許多重大功能更新。

Architecture-specific

  • RISC-V 體系代碼中增加了KGDB kernel debugger調試功能。

Core kernel

  • /proc 文件系統現在可以正確支持多個private instance了,每個都有獨立的mount參數。

  • 如果loadable module中的某個section既允許write也允許execution,那麼kernel會拒絕加載此module。這是一項大工程(確保kernel memory不可以既writable又executable)的一部分。

  • 經過多年開發之後,generalized kernel event-notification mechanism 終於被合入了。參見https://git.kernel.org/linus/6c3297841472 這個commit來大致瞭解一下,以及https://git.kernel.org/linus/c73be61cede5 是這個新增的subsystem的文檔。

Filesystems and block I/O

  • device mapper新增了一個名爲"emulate block size"的 target,用來讓相應的block device可以提供比硬件實際支持的更小的block size。文檔在這裏:https://git.kernel.org/linus/d3c7b35c20d6

  • device mapper的"zoned" target可以支持能把普通的block device跟zoned設備變種對應起來,這樣比起直接使用zoned device來可以提高性能。

  • F2FS 文件系統支持了LZO-RLE壓縮

Hardware support

  • Clock: Renesas r8a7742 時鐘脈衝發生器, Qualcomm MSM8939 全局時鐘控制器, Intel Lightning Mountain 始終控制器, Ingenic X1830 時鐘發生器, MediaTek MT6765 時鐘, and Baikal-T1 始終控制單元.

  • GPIO and pin control: The "GPIO aggregator" 驅動可以把若干個不相干的GPIO pin歸攏在一起形成一個虛擬的GPIO chip,這樣就能把它們一起暴露給user space來統一管理(尤其是可以利用/dev下面的權限來管控對這些GPIO pin的訪問權限)。參見這裏的文檔:https://git.kernel.org/linus/ce7a2f77f976  。此外還增加了: NXP i.MX8DXL pin controllers, Qualcomm SM8250 pin controllers, and Intel Jasper Lake pin controllers.

  • Industrial I/O: Semtech SX9310/SX9311 proximity sensors, Analog Devices Generic AXI ADC IP cores, Analog Devices AD9467 High Speed analog-to-digital converters, Maxim max1241 analog-to-digital converters, Analog Devices ADIS16475 inertial measurement units, Atlas Scientific EZO sensors, and Vishay VCNL3020 proximity sensors.

  • I2C: Qualcomm camera control interfaces, Baikal-T1 system controllers, and Nuvoton I2C controllers.

  • LED: Dell Wyse 3020 status LED controllers, SGMICRO SGM3140 LED controllers, and Awinic AW2013 LED controllers.

  • Miscellaneous: Monolithic Power Systems MP2629 battery managers, Mediatek MT6360 power-management ICs, ARM Secure Monitor watchdog timers, ARM Integrator Logic Module buses, NVIDIA Tegra video input controllers, Baikal-T1 AXI and ABP buses, Socionext UniPhier PCIe endpoint controllers, Allwinner H6 I/O memory-management units, Ingenic JZ47xx coprocessors, CellWise CW2015 batteries, ROHM bd99954 chargers, Arasan NAND flash controllers, Cypress CY8CTMA140 touchscreens, Azoteq IQS269A capacitive touch controllers, Azoteq IQS620A pulse-width modulators, Texas Instruments K3 thermal sensors, Spreadtrum mailbox controllers, and Qualcomm inter-processor communication controllers.

  • Sound: Microsemi ZL38060 connected home audio processors, NXP enhanced asynchronous sample rate converters, and Maxim integrated max98390 speaker amplifiers.

  • USB: Qualcomm IPQ4019 USB PHYs, Qualcomm SNPS FEMTO USB HS PHYs, Cadence Salvo PHYs, and Intel ComboPHY subsystems.

Networking

  • "RDMA network block device" 可以支持使用RTRS協議來經過RDMA遠程訪問block device。文檔在這裏:https://git.kernel.org/linus/aa4d16e44f60

Security-related

  • 如果某個device定義了一個有重疊的memory區間,那麼就會導致/dev/mem下面的映射被作廢。這個改動可以有效放置user space來映射某些可以memory-addressable device(例如persistent memory)之後導致kernel出錯風險,例如,把這段memory區域裏的內容作爲文件系統mount到系統中使用的時候。

  • 合入patch來阻止"special register buffer data sampling" 硬件漏洞。參見 Documentation/admin-guide/hw-vuln/special-register-buffer-data-sampling.rst

Virtualization and containers

  • 新增的virtio-mem設備可以支持在guest系統中隨時增加或減少memory。文檔很少,不過可以從commit裏看到一些信息:https://git.kernel.org/linus/5f1f79bbc9e2

Internal kernel changes

  • kcov這個代碼覆蓋測試工具現在可以統計到軟中斷模式下執行的代碼了。

  • 新增了一組locking函數(https://git.kernel.org/linus/9740ca4e95b4  ),供使用mmap_sem的代碼使用。目前這個lock的使用方法尚未改變,不過這只是第一步,希望能增強mmap_sem所保護的代碼的可擴展性。

  • 編譯kernel最起碼需要使用GCC 4.8或以上版本了。Torvalds說他很想能更進一步(改到4.9),所以後續可能不久就會進一步改動這裏。

  • 合入了KCSAN data-race檢測工具。注意,此工具需要使用尚未發佈的Clang 11編譯器才能正常工作。參見這個changelog https://git.kernel.org/linus/b791d1bdf921

  • x86 kernel現在增加了一個名爲.noinstr.text的section,用來放置那些永遠不會被例如kprobes這類的注入(instrumentation)工具所修改的代碼。許多比較敏感的代碼都被移到這個section了。此區域內的代碼如果調用了此區域外的代碼,那就必須要顯式地標註出來。objtool工具可以確保滿足這個要求。參見changelog (https://git.kernel.org/linus/076f14be7fc9  )來了解這個工作的動機和主要描述。

5.8內核已經進入了修正穩定性問題的階段,預計在8月初匯能看到5.8的正式發佈。

全文完

LWN文章遵循CC BY-SA 4.0許可協議。

歡迎分享、轉載及基於現有協議再創作~

長按下面二維碼關注,關注LWN深度文章以及開源社區的各種新近言論~

相關文章