泰晓科技 -- 聚焦 Linux - 追本溯源,见微知著!
网站地址:https://tinylab.org

基于泰晓RISC-V实验箱的Linux公开课
请稍侯

泰晓资讯·3 月 / 第一期 / 2024

unicornx 创作于 2024/02/29

“泰晓资讯”,广泛报道 “Linux/开源” 业界资讯。欢迎广大读者投递相关资讯来源和素材,本站将进一步收集整理后发布给大家。

Linux 内核最新消息

Linux 6.8 内核的开发进展顺利,本周我们得到了 v6.8-rc6。如果一切顺利,Linux 6.8 将在两周后正式发布,但按照目前的节奏,最终可能需要三周时间。

本周的 RC 版本中值得一提的是 Nouveau 支持在系统上存在必要的 GSP 固件时,可以选择性地为 RTX 20 (Turing) 系列和更新的 NVIDIA GPU 启用 GSP。这可被 Linux 发行版用于选择性地允许默认使用 NVIDIA GPU 系统处理器。

此外,在 Nouveau 方面,Mesa NVK Vulkan 驱动程序现在也使用新的 ioctl 来支持 ReBAR。

Linux 6.8 中还合入了其他功能,包括:在返回用户空间时推迟了清除 VERW,以便更好地处理侧信道漏洞保护,例如 Intel MDS。本周还修复了 Framework 13 AMD 笔记本电脑上的挂起/恢复问题。此外还包括一些针对 Bcachefs 的修复。

摘录了 Linus Torvalds 在 6.8-rc6 公告中所写的说明如下:

“Last week I said that I was hoping things would calm down a bit. Technically things did calm down a bit, and rc6 is smaller than rc5 was. But not by a huge amount, and honestly, while there’s nothing really alarming here, there’s more here than I would really like at this point in the release.

So this may end up being one of those releases that get an rc8. We’ll see. The fact that we have a bit more commits than I would really wish for might not be a huge issue when a noticeable portion of said commits end up being about self-tests etc.

So right now I’m still on the fence about things. Most of the stuff here is really just fairly trivial driver updates (and those self-test ones), but we do have regressions being tracked still, so…”

看上去问题比 Linus 想象的要多一些,虽然大多数东西实际上只是相当微不足道的驱动程序更新(以及那些自检更新),但社区确实仍然在调试和解决一些 regression 问题。让我们看看 Linux 6.8 是否能在下周的 6.8-rc7 之后准备好发布,这决定了 6.8 能否按计划在 3 月 10 日首次亮相,否则可能会需要一个额外的 rc8。Ubuntu 22.04 LTS 以及其他即将推出的 Linux 发行版都希望使用 Linux 6.8。

https://www.kernel.org/ updated by 2024/2/29

分支类型版本发布时间
mainline6.8-rc62024-02-25
stable6.7.62024-02-23
longterm6.6.182024-02-23
longterm6.1.792024-02-23
longterm5.15.1492024-02-23
longterm5.10.2102024-02-23
longterm5.4.2692024-02-23
longterm4.19.3072024-02-23
linux-nextnext-202402282024-02-28

关键词: Linux

Rosebush 被提议作为 Linux 内核中新的数据结构

Matthew Wilcox with Oracle who previously worked on the Maple Tree data structure for the Linux kernel along with memory folios has now proposed “Rosebush” as a new hash table data structure for the Linux kernel.

Oracle 的 Matthew Wilcox 之前曾为 Linux 内核 研究过 “Maple Tree” 数据结构以及 “memory folios”,现在他提议 Linux 内核中采用一种新的哈希表数据结构 “Rosebush”。

Rosebush 是一种 resizing, scalable, cache-aware RCU-optimized 的哈希表。Rosebush 适合在追求低开销场景下替换 maple tree 或者 rhashtable。但它不能完全替代 maple tree,因为它不支持 ranges。Rosebush 的另一个优势是具有 per-bucket 的锁,因此它对于写入密集型工作负载更具可扩展性。

虽然 Rosebush 作为 Linux 内核的新的哈希表听起来不错,但 Wilcox 还没有将任何现有的内核代码转换为使用它。因此,最终实际的性能优势尚未得到证实。

新闻出处,“Rosebush Proposed As A New Data Structure For The Linux Kernel”: https://www.phoronix.com/news/Rosebush-Linux-Proposal

关键词: Linux, Rosebush

Linux 正努力争取从 2024 年起禁用 RNDIS 驱动程序

Back in January 2023 was an attempt to disable kernel drivers for Microsoft’s RNDIS protocol. The Remote Network Driver Interface Specification (RNDIS) is home to security concerns for this protocol built atop USB for virtual Ethernet functionality. Later in the year the effort to disable RNDIS on Linux was tried again without going mainline. In recent days it looks like there will be a fresh attempt at getting the RNDIS driver support disabled.

早在 2023 年 1 月,就有人试图禁用用于支持 Microsoft 的 RNDIS 协议的内核驱动程序。Remote Network Driver Interface Specification (RNDIS),该协议构建在 USB 之上,用于虚拟以太网功能,但是存在安全隐患。去年 2023 年晚些时候,有人再次尝试在 Linux 上禁用 RNDIS,但没有被接收进入主线。

最近,又有人重新尝试去除对 RNDIS 驱动程序的支持,此人正是 Greg Kroah-Hartman,他恢复了他的 “rndis-removal” 分支,作为 USB 子系统 Git 树的一部分。尽管在这个阶段,它并没有真正 “删除” RNDIS,而只是对 Kconfig 进行了更改,使得驱动程序不参与编译。目前的想法是先将 Kconfig 的改动进入主线,观察几个月后如果没有人提出问题,那么再将 RNDIS 驱动程序从 Linux 内核中删除。

Greg 认为从设计上说,在任何不受信任的主机或设备上使用 Microsoft RNDIS 协议都是不安全和易受攻击的。Android 已经禁用 RNDIS 很多年了,所以应该没有什么基于 Linux 的系统仍然需要它。

让我们看看 6.9 中是否会接受这个补丁。

新闻出处,“Linux Still Working To Disable RNDIS Drivers In 2024”: https://www.phoronix.com/news/Linux-Disabling-RNDIS-Attempt

关键词: Linux, RNDIS

采用 Rust 重写 Linux 的 V4L2 VP9 编解码器,以提高内存安全性

Daniel Almeida with Collabora has posted a rewritten of the VP9 codec library code within the Linux kernel’s Video 4 Linux 2 (V4L2) subsystem. In using Rust rather than the existing C code, this should yield better memory safety and better fend off potential issues within the existing code.

Collabora 的 Daniel Almeida 发布了一份补丁,重写了 Linux 内核的 Video 4 Linux 2 (V4L2) 子系统中 VP9 编解码器库,值得注意的是,重写使用了 Rust 而不是 C,这应该会产生更好的内存安全性,并更好地解决现有代码中的潜在问题。

目前补丁还处于 RFC 阶段,除了采用 Rust 重写 VP9 库外,该补丁还将 RKVDEC 和 Hantro 驱动程序代码转换为 Rust 版本。Fluendo 的 Fluster 测试表明使用 Rust 或 C 版本的代码,运行效果差不多。

Rust 代码为 C 驱动程序提供了 C API。这个 C API 是由 cbindgen 自动生成的,我们可以同时使用 C 和 Rust 库中的函数,因为 ABI 是相同的。C 驱动程序将像往常一样通过 C API 工作,而新的 Rust 驱动程序则将直接受益于原生的 Rust 接口。

Daniel 在补丁的说明中提请大家注意,这段代码只是一个概念证明,如果它受到好评,他会提供一个合适的补丁,并包括所有需要的东西。

新闻出处,“Linux’s V4L2 VP9 Codec Kernel Code Rewritten In Rust For Better Memory Safety”: https://www.phoronix.com/news/VP9-Linux-Kernel-Rust-V4L2-RFC

关键词: Linux, Rust, V4L2

Ubuntu 博客上一则文章谈论采用 Rust 编写调度程序以及微内核设计的潜力

Ubuntu/Canonical has for a while now promoted the prospects of Rust programming within the Linux kernel and one of their kernel engineers, Andrea Righi, wrote a Rust-written Linux scheduler with promising results that leverages eBPF for dynamically loading it at run-time. While Ubuntu isn’t yet committing to using it as part of their distribution, appearing on the Ubuntu blog today was more praise for the work and even talking about the potential for a “micro-kernel design” in the future via leveraging Rust and eBPF.

一段时间以来,Ubuntu/Canonical 一直在推动采用 Rust 开发 Linux 内核的前景,他们的一位内核工程师 Andrea Righi 采用 Rust 编写了一个 Linux 调度器(注,即下文的 “scx_rustland”),结果很有希望,它利用 eBPF 在运行时动态加载它。虽然 Ubuntu 尚未承诺将其用作其发行版的一部分,但本周我们看到 Righi 在 Ubuntu 博客上发表了一篇文章,甚至谈到了未来通过利用 Rust 和 eBPF 实现 “微内核设计”(”micro-kernel design”)的潜力。

在这篇博文中 Righi 指出,如何通过 PPA 将 “scx_rustland” 与 Ubuntu 24.04 一起使用。这个 Rust 调度器工作已被证明是最近主线到内核的默认 EEVDF 调度器的潜在可行替代方案。

博客还提出随着微内核设计发展,这种设计有可能为 Linux 上的使用铺平道路,在上述场景中,如果用户空间调度器崩溃,任务将无缝过渡到默认的内核内调度器,确保持续的系统可用性,而不会出现任何停机。类似的方法也可以用于其他子系统,允许 Linux 内核提供一定程度的冗余支持,并避免系统崩溃。

虽然这超出了即将到来的 Ubuntu 24.04 LTS 版本的范围,但在 Ubuntu 博客上看到这些评论以及 Canonical 一直在提高他们的性能和工程团队的时候,这是相当有趣的。看看他们未来可能会在这一领域进行什么样的创新,这将是一件有趣的事情,因为 “scx_rustland” 工作本身已经证明非常有趣。

新闻出处,“Ubuntu Blog Talks Up Rust Schedulers, Potential For Micro-Kernel Design Future”: https://www.phoronix.com/news/Ubuntu-Rust-Scheduler-Micro

关键词: Ubuntu, Rust

Ubuntu 22.04.4 LTS 发布

Canonical has released the Ubuntu 22.04.4 LTS images today as the latest point release for this ongoing Long-Term Support series ahead of the Ubuntu 24.04 LTS debut in April.

Canonical 于上周发布了 Ubuntu 22.04.4 LTS,这是在 4 月份 即将发布 Ubuntu 24.04 LTS 之前,针对 22.04 这个长期支持系列的最新小版本更新。

除了将各种错误和安全修复合并到 ISO 安装映像中外,Ubuntu 22.04.4 LTS 中引人注目的更新还包括对 hadware enablement (HWE)的升级 ,可为较新的硬件提供更好的支持。Ubuntu 22.04.4 LTS 从 Ubuntu 23.10 中提取了关键组件更新,包括 Linux 6.5 内核和 Mesa 23.2 开源图形驱动程序。

使用 Linux 6.5 的 Ubuntu 22.04.4 LTS 非常适合更好地支持较新的硬件,并为 Ubuntu LTS 用户提供更新的内核功能和改进。如果您使用的是最近发布的硬件,则较新的内核特别有用。与此同时,4 月份即将发布的 Ubuntu 24.04 LTS 应该默认为 Linux 6.8 内核。

那些想要获取新的 Ubuntu 22.04.4 LTS 安装映像的人可以访问

新闻出处,“Ubuntu 22.04.4 LTS Released With Linux 6.5 HWE Kernel”: https://www.phoronix.com/news/Ubuntu-22.04.4-LTS-Released

关键词: Ubuntu

一项对比数据凸显 Mold 链接器的高速性能

The Mold high performance linker has long been known for offering excellent performance over GNU Gold/ld and LLVM lld while some fresh benchmark numbers reinforce the competitive advantage that persists today for this open-source project.

长期以来,Mold 高性能链接器一直以提供优于 GNU Gold/ld 和 LLVM lld 的出色性能而闻名,而一些新的基准数据则增强了这个开源项目今天仍然存在的竞争优势。

Mold 首席开发人员 Rui Ueyama 发布了一些新的性能数据,将他的链接器与来自 GNU 和 LLVM 项目的知名链接器相比。比对数据如下:

Program (linker output size)GNU ldGNU goldLLVM lldmold
MySQL 8.3 (0.47 GiB)10.84s7.47s1.64s0.46s
Clang 19 (1.56 GiB)42.07s33.13s5.20s1.35s
Chromium 124 (1.35 GiB)N/A27.40s6.10s1.52s

近几个月来,GNU ld 一直在对性能进行优化,而最新的 Mold 版本与 LLVM lld 和 GNU ld 和 GNU gold 相比,在节省时间方面继续显示出强大的优势。

有关这个高速链接器的所有最新数据都可以访问 GitHub 上的 Mold 仓库 https://github.com/rui314/mold

新闻出处,“Mold Linker Performance Remains Very Compelling In 2024 Over GNU Gold/ld, LLVM lld”: https://www.phoronix.com/news/Mold-Linker-2024-Performance

关键词: Mold

联系我们

欢迎扫描二维码加微信联系我们:

tinylab wechat



Read Album:

Read Related:

Read Latest: