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

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

泰晓资讯·3 月 / 第四期 / 2023

unicornx 创作于 2023/03/23

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

Linux 内核最新消息

https://lkml.org/lkml/2023/3/19/389

Linus Torvalds 本周初发布了 Linux 6.3-rc3,这是开发中的 Linux 6.3 内核的最新每周测试候选版本,6.3 的稳定版本内核计划在四月底首次亮相。

在 Linux 6.3-rc3 中,由于有更多的用户和开发人员测试代码,所以发现了更多新功能代码引入的问题,这导致该版本的内核变化 “相当大(fairly big)”。Linus Torvalds 在 6.3-rc3 的发布公告中原话评论如下:

“So rc3 is fairly big, but that’s not hugely usual: it’s when a lot of the fixes tick up as it takes a while before people find and start reporting issues.

And nothing here looks hugely worrisome. The diffstat looks a bit unusual in that there are relatively big changes to the scripts and selftest directories, but that’s mainly due to the git-ignore script removal and some kvm selftest cleanups respectively. Nothing scary.

If you ignore those parts, it’s a fairly standard “two thirds drivers, one third rest” thing. The drivers are all over, but networking, gpu and sound are the usual big ones, with the fbdev code showing up mainly just because of a coding style fixup to the logo conversion scripting (mainly to use proper tab indentation). The qcom interconnect driver also shows up for major cleanup and fixes.

Outside of those areas, it’s a random collection of fixes: the usual arch updates (much - but not all - of it being kvm), some filesystem fixes (mainly cifs), core networking, tracing, and some core mm fixes.”

对于 AMD EPYC 用户来说,本周值得一提的变化之一是新内核加强了对潜在恶意 guests 的限制,这些 guests 利用 Secure Encrypted Virtualization 可能会尝试通过重复发送请求来攻击 AMD Secure Processor。

https://www.kernel.org/ updated by 2023/03/23

分支类型版本发布时间
mainline6.3-rc32023-03-19
stable6.2.82023-03-22
longterm6.1.212023-03-22
longterm5.15.1042023-03-22
longterm5.10.1762023-03-22
longterm5.4.2382023-03-22
longterm4.19.2792023-03-22
longterm4.14.3112023-03-22
linux-nextnext-202303222023-03-22

关键词: Linux

采用 Rust 重写的 Linux VGEM 驱动已提交审核

Besides the ongoing work around the reverse-engineered Apple Silicon graphics driver being brought up in the Rust programming language, the other notable Rust effort within the Direct Rendering Manager (DRM) kernel subsystem is a rewrite of the basic VGEM driver in this increasingly-used programming language. That Rust VGEM driver has now been sent out on the mailing list for review as part of a request for comments.

目前内核社区中和 Rust 编程语言相关的工作,除了利用逆向工程原理重写 Apple Silicon 显卡驱动之外,另外一个值得我们注意的就是基于 Direct Rendering Manager(DRM) 内核子系统,利用 Rust 重写 VGEM 驱动程序的事情了。该项利用 Rust 重写 VGEM 驱动程序的工作现已作为 RFC 发送到邮件列表中申请代码审查。

VGEM 作为 Virtual GEM provider,是一个最小的不需要硬件支持的 Graphics Execution Manager(GEM),可以提供这方面的内存管理服务。该 VGEM 驱动程序可以与 Mesa 的 LLVMpipe 和其他 non-native 的 3D 驱动程序一起使用,以实现更好的缓冲区共享,从而加速系统运行性能。

Maíra Canal 和 Igalia 一直在用 Rust 重写 VGEM 代码,几天前将 “RFC” 补丁系列发送到邮件列表。Maíra Canal 在提交说明中解释说:

“This is my first take on using the DRM Rust abstractions to convert a DRM driver, written originally in C, to Rust. This patchset consists of a conversion of the vgem driver to a DRM Rust driver. This new driver has the exactly same functionalities of the original C driver, but takes advantages of all the Rust features.

These patches are based primarily on the Rust DRM abstractions, sent as a RFC to the mailing list last week. Also, it depends on some Device abstractions and on the Timer abstraction developed by Boqun Feng.”

当前提交的 Rust VGEM 驱动程序大约有 500 行新代码。让我们对它保持关注,并期待更多新的采用 Rust 编写的 DRM 驱动程序会提交进主线。

新闻出处,“Linux VGEM Driver Rewritten In Rust Sent Out For Review”: https://www.phoronix.com/news/Linux-Rust-VGEM-Rewrite-RFC

关键词: Linux, Rust, VGEM

Linux 内核网络驱动程序的开发工作因为俄罗斯被制裁而受到影响

The US and western government sanctions around the Russian government and its defense industry/companies due to their war in Ukraine has caused interesting issues in the open-source world. A few days after ipmitool was archived/suspended on GitHub that turned out to be due to the current maintainer’s affiliation with a Russian tech company, separately there is now a blocking of Linux kernel contributions from selected Russian developers.

美国和西方政府因为乌克兰的战争而对俄罗斯政府及其国防工业和公司实施了制裁,这在开源世界中引起了有趣的问题。最近 ipmitool 这个软件在 GitHub 上的代码仓库被关闭暂停了,事实证明这是由于当前维护者与一家俄罗斯科技公司存在关系,另外,来自某些俄罗斯开发人员的 Linux 内核提交也被拒绝了。

在开源世界中,对于由社区驱动的项目实施制裁是一件很具有挑战性的事情,因为许多开源项目允许使用假名,很难界定开源贡献者与政府或公司的任何隶属关系,甚至他们所在的实际物理位置。传统上,为开源项目做贡献仅仅取决于你的技术能力。在可能受到制裁的组织与开源项目本身之间通常也没有财务交易或其他正式的关联。

目前我们遇到的最新问题是,目前 Linux 的网络补丁的提交人员来自一家叫做 “Baikal Electronics(贝加尔湖电子)” 的公司,Baikal Electronics 是一家来自俄罗斯的公司,该公司生产各种基于 MIPS 和 ARM 的处理器,多年来一直致力于制造俄罗斯国产CPU。Baikal Electronics 的前母公司 T-Platforms 自 2013 年以来一直受到美国的制裁,而自去年以来,Baikal Electronics 公司一直受到各国政府的直接制裁,因为他们的微处理器可能最终进入俄罗斯军用产品。

受到影响的补丁是针对 STMMAC 网络驱动程序的修复。这是用于 Synopsys 以太网控制器的网络驱动程序,除了 Baikal Electronics 公司的硬件会使用它意外,其他 Synopsys 许可的硬件也会使用该驱动。但目前看上去该补丁被 Linux 的网络子系统的维护人员 Jakub 给拒了,理由是如下:

“We don’t feel comfortable accepting patches from or relating to hardware produced by your organization. Please withhold networking contributions until further notice.”

阻止来自该开发人员和组织的补丁似乎是网络子系统维护人员的个人行为。用关键字 “baikal” 搜索 Linux 的提交可以发现最近在上个月,上游已经接受了来自同一开发人员的其他补丁。在过去的一年里,已经有几十个补丁被拉入主线 Linu x内核,涉及 PCI,DMA 引擎,以及一些 Baikal-T1 特定产品的驱动程序。

目前没有看到关于该事件的进一步评论,但至少就 Linux 网络代码而言,在接到另行通知之前,内核不会接受来自 Baikal 以及相关地区的贡献。值得重申的是,所讨论的补丁系列不是 Baikal 公司产品特有的,而是会影响到多个不同硬件平台使用的 Synopsys 的网络驱动程序。我们将看看,鉴于开源世界中固有的松散和分布式性质,内核的其他领域是否也会发生类似的事情。

新闻出处,“Linux Kernel Networking Driver Development Impacted By Russian Sanctions”: https://www.phoronix.com/news/Linux-STMAC-Russian-Sanctions

关键词: Linux,Russian,Sanctions

LLVM 16.0 发布,新特性一览

LLVM 16 was released on Friday night as the latest half-year feature release to this open-source compiler stack. From initial AMD Zen 4 support to bringing up new Intel CPU instruction sets and processor targets for their new processors being introduced through 2024, there is a lot of exciting hardware additions in LLVM 16.0. LLVM 16.0 is also notable for faster LLD linking, Zstd compressed debug sections, stabilizing of its LoongArch target, defaulting to C++17 for Clang, and much more. Here’s a look at all the exciting changes of LLVM 16.

LLVM 16 于上周五晚上正式发布。LLVM 作为当前和 GCC 齐名的另一款开源编译器软件集合,每半年发布一个新版本。LLVM 16.0 中增加了许多令人兴奋的对硬件的支持,此外还提高了 LLD 的链接速度,实现采用 Zstd 压缩 debug section,继续优化对 LoongArch 的支持,默认对 Clang 支持 C++17 等等。以下简单列举了 LLVM 16 (包括 Clang 16 以及 LLD 16 等子项目)中的新特性。

  • Clang 的默认 C++ 标准升级为 GNU++17,而不再是 GNU++14/C++14。
  • 实现了更多 C++20 功能以及对现有 C++20 实现的错误修复,并为 C++2b 做了一些准备。
  • Clang 16 也实现了更多 C2X 功能。
  • 改进了各种 Clang 16 编译器的 diagnostics 处理。
  • 相比上个版本 15,LLD 16 链接器对 ELF 格式的链接速度提高了不少。
  • LLVM 16 LLD 现在也支持了 Zstd 压缩 sections,类似于 GCC 13 中实现的 Zstd。
  • LLVM 中针对 LoongArch CPU 的 back-end 已正式默认启用,不再是 “experimental”。另外还启用了早期的对 LoongArch JITLink 的支持和其他功能。LLVM 的 LLDB 调试器目前也支持了调试 LoongArch 64 位的二进制文件。目前包括 Clang 在内整个 LLVM 软件包对 LoongArch 这种来自中国的 CPU 架构的支持已经基本完善。
  • LLVM 16 支持了新的 Intel x86 ISA extensions,这些扩展包括 AMX-FP16、CMPCCXADD、AVX-IFMA、AVX-VNNI-INT8 和 AVX-NE-CONVERT。
  • 支持了的新的 Intel 处理器,譬如Raptor Lake, Meteor Lake, Emerald Rapids, Sierra Forest, Granite Rapids, 和 Grand Ridge。
  • 对 AMD Zen 4 处理器的初步支持,增加了 -march=znver4 选项,但这些改动中并不包括在 LLVM 16 拉出自己的开发分支后合入的改动。
  • LLVM 针对 RISC-V 后端增加了对许多新扩展的支持,如 Zca,Zbe,Zbf,Zbm,Zbp,Zbr 和 Zbt。
  • LLVM 增加了对 Arm Cortex-A715 / Cortex-X3 / Neoverse-V2 的支持。
  • LLVM 的 AArch64 后端现在支持 Function Multi-Versioning (FMV),允许自定义代码路径,以根据运行时 CPU 能力优化性能。
  • 删除了对 Armv2A / Armv2A / Armv3 / Armv3M 架构的支持。
  • LLVM 16 的 C++ 标准库 libc++ 增加了对更多 C++20 和 C++23 特性的支持。这些变化包括针对 C++20 的 spaceship operator 支持了更多的类型(types),完成了 C++20 的 ranges 库,改进了 C++20 的 format 库。

新闻出处,“LLVM 16.0 Released With New Intel/AMD CPU Support, More C++20 / C2X Features”: https://www.phoronix.com/news/LLVM-16.0-Released

关键词: LLVM

OpenJDK Java 20 发布,带来了很多新特性

Promoted to general availability (GA) status today is the OpenJDK Java 20 update with a number of new features.

本周二 OpenJDK Java 20 正式升级到 general availability (GA) 状态,我们来看一下 20 版本给我们带来了哪些新功能。

OpenJDK Java 20 引入了 scoped values 作为一种 incubating API。Java 的 scoped values 允许在线程内部和线程之间共享 immutable 的数据,并且这些变量优先于线程的局部变量(thread-local variables)。Java 的 scoped values 的设计初衷是为了易于使用、易于理解、可靠且高性能。

Java 20 还对 Vector API 进行了第四次更新,可以针对支持的 CPU 架构在运行时编译最佳的矢量指令。在 Vector API 上,相对于 JDK 19,Java 20 并没有做改动,只是做了一些错误修复和性能增强。

Java/JDK 20 还提供了 Virtual Threads 功能用于为高吞吐量的并发应用程序实现轻量级线程,该功能目前还处于 second preview。相对于 JDK 19,Virtual Threads 的 API 有一些小的更改,此外还有一些基本的改进。

其他更新还包括:record patterns,针对 switch 语句的 pattern matching,Foreign Function 和 Memory API,以及 JDK /Java 20 上的 structured concurrency。

新闻出处,“OpenJDK Java 20 Released With Latest Vector API, Scoped Values”: https://www.phoronix.com/news/OpenJDK-Java-20-GA

关键词: OpenJDK

Mold 发布 v1.11,初步支持 POWER10

Mold 1.11 is out as the newest version of this open-source high performance linker that rivals the likes of LLVM LLD and GNU Gold for very speedy linking across multiple CPU architectures.

Mold 链接器在性能方面不断改进,给我们留下了深刻印象,同时它继续扩展以支持更多的硬件以及目前对标 GNU Gold 和 LLD 所缺乏的特性功能。在 Mold 1.11 中,它增加了对 IBM Power10 处理器的初始支持。

Mold 1.11 版本新支持的特性还包括:添加了 “–hash-style=none” 选项,针对 32 位 Arm 实现了 R_ARM_PLT32 重定位类型,对 RISC-V 支持 R_RISCV_PLT32 重定位类型。Mold 1.11 解决了 Link-Time Optimizations(LTO) 上的一个极端情况问题,现在支持链接旧版本的 GCC 生成的对象文件,以及其他修复。

新闻出处,“Mold 1.11 High Performance Linker Released With Initial POWER10 Support”: https://www.phoronix.com/news/Mold-1.11-Released

关键词: Mold

GNU Coreutils 9.2 发布

GNU Coreutils 9.2 is out today as the newest feature update to this widely relied upon collection of core utilities commonly found on Linux systems as well as other platforms.

GNU Coreutils 9.2 于本周一发布,9.2 具有各种各样的新功能、错误修复和其他增强功能。下面罗列一些让人感兴趣的更新:

  • cpmvinstall 命令避免了分配过多内存。使用先前版本可能会在 ZFS 等文件系统上触发内存耗尽。这个问题从 GNU Coreutils 6.0 开始就一直存在。
  • rm 命令现在将在内存耗尽时优雅地退出。
  • cpmvinstall 命令在 XFS 和 Btrfs 等文件系统上,在创建 copy-on-write 或克隆的 reflink 文件时能够对突发的暂时性错误做出快速响应。
  • stty 现在可以正确针对 terminal 的 width 封装输出。
  • 对于 wc -c 命令修复了早期版本的一个问题,现在在所有系统上都可以准确获得大文件的大小。
  • mv 命令现在支持 --no-copy 选项,当尝试将文件移动到另一个文件系统时,它将报告失败。
  • 通过使用 copy_file_range 系统调用,cp --sparse=automvinstall 命令现在可以对 sparse 文件实现更高效的拷贝。

新闻出处,“GNU Coreutils 9.2 - Now Avoids cp/mv Allocating Too Much Memory”: https://www.phoronix.com/news/GNU-Coreutils-9.2

关键词: GNU,Coreutils

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: