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

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

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

unicornx 创作于 2024/02/01

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

Linux 内核最新消息

Linus Torvalds 本周发布了 Linux 6.8-rc2,这是 6.8 版本内核的最新每周测试版本,稳定的 6.8 版本预计将于 3 月发布。

Linux 6.8 看起来非常令人兴奋,它加入了对 Intel Xe 实验性内核图形驱动程序的支持,以及对 AMD Zen 5 和 Intel Arrow Lake / Lunar Lake 的更多支持,这个版本还支持了新的 Arm 硬件、Nintendo NSO 控制器,并对 Rust 代码进行了升级,等等。。

Torvalds 在 6.8-rc2 的发布邮件中指出:尽管我们在 rc1 中遇到了许多令人讨厌的小问题,这些小问题包括可能导致桌面挂起的 amdgpu 调度错误,以及一个 btrfs 错误等,但 rc2 看上去更稳定了,解决那些可能影响许多测试人员的问题。因此 Linus 希望大家在后继的问题修复中更加小心,不要影响通用的内核功能。原文如下:

So we had a number of small annoying issues in rc1, including an amdgpu scheduling bug that could cause a hung desktop (that would eventually recover, but after a long enough timeout that most people probably ended up rebooting instead. That one seems to have hit a fair number of people.

There was also a btrfs bug wrt zstd-compressed inline extents, although (somewhat) happily that wasn’t in rc1 and got noticed and reverted fairly quickly, so hopefully it didn’t hit very many people. It did me.

Anyway, I hope that with rc2, we’re now in the more stable part of the release cycle, with those kinds of problems that might affect a lot of testers sorted out. So hopefully the fixes will be more subtle and not affect common core setups.

So go out and test. It’s safe now. You trust me, right?

Linux 6.8-rc2 还包括了更多的修改,这包括 AMD Zen 5 ID 和 AMD PMF 驱动程序、Intel Clearwater Forest 检测、更多 Bcachefs 更新,以及启用 -Wstringop-overflow 以警告缓冲区溢出等更改。

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

分支类型版本发布时间
mainline6.8-rc22024-01-29
stable6.7.22024-01-25
longterm6.6.142024-01-25
longterm6.1.752024-01-25
longterm5.15.1482024-01-25
longterm5.10.2092024-01-25
longterm5.4.2682024-01-25
longterm4.19.3062024-01-25
longterm4.14.336 [EOL]2024-01-10
linux-nextnext-202401312024-01-31

关键词: Linux

Linux 重新启动 Fast Kernel Headers 工作

Posted at the start of 2022 was a set of 2.3k patches dubbed “fast kernel headers” to massively speed-up build times for compiling the kernel and to address dependency hell situations. While it was quick to iterate at first and some bits got upstreamed, it’s been months since hearing anything new on the fast kernel headers topic. But today a new patch series was posted that’s restarting the effort in working towards massively speeding up kernel build times.

2022 年初社区接收到一组被称为 “fast kernel headers”的补丁集,这个补丁集非常大,包括了将近 2300 个 patch。这个改动的目的是可以以大幅加快内核的构建时间并解决棘手的依赖情况。虽然一开始迭代速度很快,感觉很快就会被上游接受了,但已经有几个月没有听到关于这个主题的任何新消息了。本周三,也就是 2024 年的第一个月的最后一天,突然有人发布了一个新的补丁系列,重新启动了大规模加快内核构建时间的工作。

Max Kellermann 今天发布了一组 28 个补丁,这些补丁尝试努力重新完成快速内核头文件的工作。这些最初的补丁致力于减少各种内核头文件的依赖性。这个补丁系列中有各种初步的准备工作,这本身并没有对构建时间由任何令人瞩目的改进。Max 指出这个补丁集只是一个开始,原文如下:

“Just like the other attempts to reduce header dependencies in the past, this is just the beginning. There are still too many dependencies, and the speedup gained by this large patch set is not yet impressive. … For more gains, huge headers like “linux/mm.h”, “linux/fs.h” and “linux/sched.h” would need to be optimized. Nearly everybody includes them, and they include nearly everything.”

新闻出处,“Fast Kernel Headers Work Restarted For Linux To Ultimately Speed Up Build Times”: https://www.phoronix.com/news/Fast-Kernel-Headers-2024

关键词: Linux

Torvalds 发现在 GCC 上使用 -Wstringop-overflow 存在问题

One of the new features for Linux 6.8 that was merged late was enabling the -Wstringop-overflow compiler option to warn about possible buffer overflows in cases where the compiler can detect such possible overflows at compile-time. While it’s nice in theory, issues on GCC has led Linus Torvalds to disabling this compiler option as of now Linux 6.8.

Linux 6.8 中有一个新功能是启用 -Wstringop-overflow 编译器选项,该选项打开后在编译过程中编译器一旦检测到可能的缓冲区溢出会抛出警告。这听上去是个好功能,但由于最近发现的 GCC 上的问题,导致 Linus Torvalds 可能在 Linux 6.8 不得不禁用这个编译器选项。

上期资讯中我们曾经给大家介绍过相关新闻,当时认为除了 GCC 11 因为自身不支持之外,其他编译器都可以启用 -Wstringop-overflow 选项构建内核。但最新的测试证明,这个结论并不正确,其他编译器在启用这个选项时也存在问题。我们只是正好在 x86-64 上发现其他 gcc 版本可以运行。而最近 Linus 发现在 arm64 上,gcc 版本 13.2.1 存在问题,而内核测试机器人在 s390 上使用 gcc 13.2.0 构建时也报告了同样的问题。

为此,Linus 在周四亲自发布了新的补丁,针对所有 GCC 禁用了这个选项。在补丁的描述中 Linus 的评论如下:

It turns out it was never just gcc-11 that was broken. Apparently it just happens to work on x86-64 with other gcc versions.

On arm64, I see warnings with gcc version 13.2.1, and the kernel test robot reports the same problem on s390 with gcc 13.2.0.

Admittedly it seems to be just the new Xe drm driver, but this is keeping me from doing my normal arm64 build testing. So it gets reverted until somebody figures out what causes the problem (and why it doesn’t show on x86-64, which is what makes me suspect it was never just about gcc-11, and more about just random happenstance).

This also changes the Kconfig naming a bit - just make the “disable this for GCC” conditional be one simple Kconfig entry, and we can put the gcc version dependencies in that entry once we figure out what the correct rules are.

The version dependency may still end up being “gcc version larger than 11” if the issue is purely in the Xe driver, but even if that ends up the case, let’s make that all part of the “GCC_NO_STRINGOP_OVERFLOW” logic.

For now, we just disable it for all gcc versions while the exact cause is unknown.

Torvalds 在测试内核构建时一直使用 Apple Silicon MacBook Air 作为他的笔记本电脑,而正是在这个机器上他遇到了 x86_64 之外的和这个编译器选项有关的构建问题。

让我们看看这种情况是否会在 3 月份的 Linux 6.8 稳定版本中得到及时解决,如果这个 -Wstringop-overflow 问题对于非 x86_64 架构来说是个更普遍的问题,那可能无法在短期内得到修复。

新闻出处,“Torvalds Has It With “-Wstringop-overflow” On GCC Due To Kernel Breakage”: https://www.phoronix.com/news/Linux-Drop-GCC--Wstringop-of

关键词: Linux, GCC, Buffer Overflows

第一个采用 Rust 编写的网络 PHY 驱动程序将登陆 Linux 6.8

Since Linux 6.1 when the very initial Rust infrastructure was added to the Linux kernel there’s been a lot of other plumbing and house keeping merged since for enabling kernel drivers to be written in the Rust programming language. With the upcoming Linux 6.8 kernel cycle, the first Rust network driver is set to be introduced.

自从 Linux 6.1 以来,当最初的 Rust 基础设施被添加到 Linux 内核中后,为了支持用 Rust 编程语言编写内核驱动程序,已经合并了许多其他基础支撑代码。随着即将到来的 Linux 6.8 内核周期,内核中加入了第一个采用 Rust 编写的 Asix PHY 驱动程序。现有的 ax88796b C 驱动程序代码已用 Rust 编程语言重写。

Rust 编写的 ASIX PHY 驱动程序大约有 135 行 Rust 代码以及各种和构建相关的代码。我们可以使用 AX88796B_RUST_PHY 这个 Kconfig 开关启用 Rust 语言的 ASIX PHY 驱动程序,该开关将构建名为 ax88796b_rust 的驱动程序。如果没有启用该开关,将默认还是采用 C 语言版本。

虽然 AX88796B 驱动程序所支持的硬件不是什么新加入的硬件,而且我们早已为该硬件实现了 C 语言版本的驱动程序,但这个 Rust 版本的 PHY 驱动程序作为一个开始,会推动其他致力于实现内存安全的网络驱动程序采用 Rust 开发。

新闻出处,“The First Rust-Written Network PHY Driver Set To Land In Linux 6.8”: https://www.phoronix.com/news/Linux-6.8-Rust-PHY-Driver

关键词: Linux, Rust, Driver

Debian 正着手解决 32 位系统上的 Y2038 问题

Debian Experimental has begun its package rebuilds for its 64-bit time_t transition for ensuring 32-bit architectures running Debian Trixie will be able to operate past the Year 2038.

对于 Y2038 问题,即 2038 年 1 月 19 日之后 Unix 时间将无法使用有符号的 32 位整数表达的问题,Debian 开发人员正在努力确保他们的下一个版本能够不受到该问题的影响。32 位 ARM 是他们主要关注对象,但其他 32 位架构也会受到影响。Debian Experimental 已经开始为过渡到 64 位 time_t 进行软件包重建,以确保在 32 位架构的机器上运行 Debian Trixie 时可以解决 Y2038 问题。

time_t 类型转换为 64 位涉及 1,200 多个库的软件包,这些包可能由于更改数据类型而造成 ABI 损坏。Debian 和 Ubuntu 开发人员 Steve Langasek 称这是 Debian 有史以来最大的 cross-archive ABI 转换。

Debian 13 “Trixie” 按计划在 2025 年发布,应该有足够的时间完成这个 Y2038 处理。

新闻出处,“Debian 64-bit time_t Transition Underway For Addressing Y2038 Problem On 32-bit Systems”: https://www.phoronix.com/news/Debian-Experimental-64bit-Time

关键词: Linux, Debian, Y2038

LLVM 18.1-rc1 发布

Following the recent branching of LLVM 18, LLVM 18.1-rc1 was released today as the first test candidate for this half-year update of this widely-used open-source compiler stack.

LLVM 18.1-rc1 于本周一发布了。这也将是 LLVM 参考 GCC 的新版本控制方案下的第一个版本,这就是为什么它将是 LLVM 18.1 而不是 LLVM 18.0。

LLVM 18 为我们带来了 Intel Advanced Performance Extensions(APX)的早期支持、对 AMD GFX12 / RDNA4 GPU 的初步支持、对新 ARM AArch64 处理器的支持、对 LoongArch 后端的自动矢量化和其他新功能、对 RISC-V 的新扩展支持、对 x86 AVX10.1-256 和 AVX10.1-512 的支持、英特尔 Clearwater Forest 和 Panther Lake 目标支持、英特尔USR_MSR指令支持、 LLDB 调试器增强功能等等。

Clang 18 不仅为 C++23 带来了许多 C++ 功能,还为一些早期的 C++2c 工作带来了许多功能,现在实现了更多的 C23 功能,包括支持 -std=c23 选项、正在进行的 OpenACC 支持工作、诊断增强、对 AVX10.1 的支持、面向 Intel Panther Lake 和 Clearwater Forest 的 -march= 以及许多其他更改。

LLVM 18 的稳定版计划在 3 月初发布。

新闻出处,“LLVM 18.1-rc1 Released For Enabling New Intel CPU Features, More C23 & C++23”: https://www.phoronix.com/news/LLVM-18.1-rc1-Released

关键词: LLVM, Clang

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: