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

泰晓Linux知识星球:1300+知识点,520+用户
请稍侯

泰晓资讯·5 月 / 第二期 / 2023

unicornx 创作于 2023/05/11

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

Linux 内核最新消息

https://lkml.org/lkml/2023/5/7/206

Linus Torvalds 本周初发布了 Linux 6.4-rc1,这也标志着令人兴奋的 Linux 6.4 周期合并窗口的结束。

在 Linus Torvalds 看来 6.4-rc1 相当正常,修改涵盖了驱动程序、架构更新、文件系统、网络、内存管理,应有尽有。但对 Linus 本人来说唯一有点不寻常的事情是,有两个 PR,分别是来自 Jens 的 ITER_UBUF 更新和来自 Dave Hansen 的 x86 LAM 支持最终让Linus 亲自动手,对这两个补丁做了一点小更新,看来 Linus 先生的确很久没有亲自下场编写代码了 ;)。

https://www.kernel.org/ updated by 2023/05/11

分支类型版本发布时间
mainline6.4-rc12023-05-07
stable6.3.12023-04-30
stable6.2.142023-04-30
longterm6.1.272023-04-30
longterm5.15.1102023-04-30
longterm5.10.1792023-04-26
longterm5.4.2422023-04-26
longterm4.19.2822023-04-26
longterm4.14.3142023-04-26
linux-nextnext-202305112023-05-11

关键词: Linux

一个旨在支持针对 Linux x86_64 构建 PIE 内核的新补丁

Going back years there has been patches for allowing the Linux x86_64 kernel to build as Position Independent Executable (PIE) code to further enhance the system security. Antgroup engineers most recently have been tackling the Linux x86_64 PIE support and last week sent out a new patch series.

几年前,已经有补丁允许将 Linux 的 x86_64 内核构建为 Position Independent Executable(PIE)方式,以进一步增强系统安全性。Antgroup 工程师最近一直在处理Linux x86_64 PIE 支持,并于上周发布了一个新的补丁系列。

基于几年前的 Linux PIE 补丁,Antgroup 的 Hou Wenlong 发布了更新的补丁,允许对 Linux x86_64 内核执行 PIE 构建, 补丁的原文描述如下:

“These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. And this patchset provides an example to allow kernel image to be relocated in top 512G of the address space.

The ultimate purpose for PIE kernel is to increase the security of the the kernel and also the [flexibility] of the kernel image’s virtual address, which can be even in the low half of the address space. More locations the kernel can fit in, this means an attacker could guess harder.

The patchset is based on Thomas Garnier’s X86 PIE patchset v6 and v11. However, some design changes are made and some bugs are fixed by testing with different configurations and compilers.”

虽然使 Linux 内核成为 PIE 的可执行文件可以增强系统安全性,但缺点是内核映像可能更大,指令数可能略高,这可能会影响性能。

新闻出处,“New Patches Aim To Tackle Linux x86_64 PIE Support”: https://www.phoronix.com/news/Linux-x86_64-PIE-2023

关键词: Linux, x86_64,PIE

一个实现了并行 CPU 启动的 Linux 补丁

While missing out on the recently-closed Linux 6.4 merge window, one of the patch series seeing a lot of activity in recent weeks/months has been around parallel CPU bring-up in order to speed-up the Linux kernel boot process for today’s high-end desktops and many-core servers.

虽然错过了最近关闭的 Linux 6.4 合并窗口,但最近看到在大量活跃的补丁中有一个补丁一直在围绕支持 parallel CPU bring-up,以加快当今高端台式机和多核服务器的 Linux 内核启动过程。

Thomas Gleixner 本周一发布了他的补丁的第三次迭代版本,提供了并行 CPU 启动功能。上周的 v2 补丁只做了一些基本更改,这些补丁继承了 Gleixner 的补丁,这个补丁其实几个月前就在 Linux 内核邮件列表中出现过,后来被修改了一下后现在又被提出来的。

这种并行 CPU 启动的目的是缩短多核云服务器的 Kexec 重启时间。是的,在大型服务器上,现代服务器中内存初始化仍然非常耗时,这导致许多公共云提供商、超大规模提供商和其他人仅依靠 Kexec 重新启动 Linux 来避免整个系统被关闭再重新启动,因为这样会导致代价更高的停机时间。Kexec 加上这些 并行 CPU 启动补丁后能够使系统的重启时间缩短数百毫秒,这对大型生产服务器部署是有益的。

新的 v3 补丁可以在 LKML 上找到。随着补丁的发布速度,希望这个 CPU 并行启动支持可以为 6 月初的 v6.5 合并窗口做好准备。

新闻出处,“Linux Patches Updated For Parallel CPU Bring-Up”: https://www.phoronix.com/news/Linux-Parallel-CPU-Bring-Up-v3

关键词: Linux,Kexec

Linux 6.4 上针对 RISC-V 支持了 Hibernation 和 Suspend-To-Disk

One of the missing RISC-V features now in place for the in-development Linux 6.4 kernel is system hibernation / suspend-to-disk support.

Linux 6.4 内核中针对 RISC-V 加入了系统休眠(system hibernation)和挂起到磁盘(suspend-to-disk )功能。

在过去的几个月里,RISC-V 的这个功能特性一直在持续地开发,经过多轮审查。在早期提交的补丁中摘录的对该特性的描述如下:

如果要为 RISC-V 打开 hibernation/suspend to disk 功能,需要 enable 以下配置选项:

  • CONFIG_HIBERNATION
  • CONFIG_ARCH_HIBERNATION_HEADER
  • CONFIG_ARCH_HIBERNATION_POSSIBLE

总的来说,该补丁包括以下更改:

  1. Change suspend_save_csrs() and suspend_restore_csrs() to public function as these functions are common to suspend/hibernation.
  2. Refactor the common code in the __cpu_resume_enter() function and __hibernate_cpu_resume() function. The common code are used by hibernation and suspend.
  3. Enhance kernel_page_present() function to support huge page.
  4. Add arch/riscv low level functions to support hibernation/suspend to disk.

补丁在 StarFive VF2 SBC 开发板和 Qemu 上进行了测试(使用 raw disk 格式)。但在补丁中还不支持 ACPI paltform 模式。

目前该补丁已经被合入 Linux 6.4。

新闻出处,“RISC-V With Linux 6.4 Adds Hibernation / Suspend-To-Disk Support”: https://www.phoronix.com/news/RISC-V-Hibernation-Support

关键词: Linux,Rust

FreeBSD 在 2023 年有一个良好的开端,取得了许多成就

This week the FreeBSD project published their Q1-2023 status report that outlines various technical and organization accomplishments made for the past quarter.

相对来说,这是一则老新闻了。上个月,也就是四月的第四周 FreeBSD 项目发布了他们的 Q1-2023 状态报告,其中概述了过去一个季度取得的各种技术和组织成就。

FreeBSD 开发在 2023 年开局良好,已经取得了许多成就。FreeBSD Q1-2023 的亮点包括:

  • FreeBSD 基金会在 2022 年的最大支持者是 Juniper、Meta、Arm、Netflix、Beckhoff、Tarsnap、Modirum、Koum Family Foundation 和 Stormshield。他们筹集了超过一百二十万美元。2023年,基金会的预算为 二百二十万美元。早在 2023 年第 1 季度,FreeBSD 就收到了来自 Juniper、Tarsnap、Microsoft 和 Stormshield 的额外捐赠。

  • FreeBSD 发布工程团队发布了 FreeBSD 13.2。
  • FreeBSD 继续改进其持续集成 (CI) 能力。
  • FreeBSD 使用日志式软更新在文件系统上启用了快照。运行日志式软更新时的 UFS/FFS 文件系统快照在 FreeBSD 13.2 中启用。
  • 原生 Linux timerfd 支持。
  • FreeBSD 的 Kernel Address Sanitizer 从 AMD64 移植到 AArch64。
  • FreeBSD 在成为 Tier-1 云初始化平台方面取得了进展。
  • FreeBSD 实例现在可以在 OpenStack 上使用 Bhyve hypervisor 生成。
  • FreeBSD 中的 DRM Linux 内核图形驱动程序支持从 Linux 5.10 更新到 Linux 5.15~5.16,并在 5.17+ 上取得进展。
  • FSX 文件系统 eXercisor 工具最初由 Apple Computer 在 1990 年代编写,现在由 FreeBSD 用 Rust 编程语言重写。

新闻出处,“FreeBSD Has A Great Start To 2023 With Numerous Accomplishments”: https://www.phoronix.com/news/FreeBSD-Q1-2023-Status

关键词: FreeBSD

LLVM clang 现在公开 -std=c++23 而不是 -std=c++2b

Merged today to LLVM 17 Git is now recognizing -std=c++23 rather than just -std=c++2b for the Clang compiler now that C++23 has been deemed technically complete.

上周合入 LLVM 17 仓库的代码对 Clang 编译器使用 -std=c++23 代替了 -std=c++2b

随着 ISO C++ 委员会投票决定 C++23 标准已达到其技术完整状态(technical complete state),LLVM 开发人员已将其 C++2b重命名为 C++23。这类似于过去,在语言更新准备就绪并使用以前的 ISO C++ 标准之前,C++20 曾经也被称为 C++2a。

C++23 标准引入了许多新的特性,例如基于 Boost stacktrace 的 stacktrace library、conditionally borrowed ranges、兼容 C atomics stdatomic.h、新的 std::byteswapstd::expect,对 UTF-8 源文件的支持现在被认为是强制性的,以及许多其他更改。可以通过 cppreference.com (https://en.cppreference.com/w/cpp/23) 查看更多细节。

近期 LLVM 社区还发布了一个 RFC,建议将其 C++26 支持称为 “C++26”,而无需先将其称为 C++2c。希望如果立即添加 -std=c++26,这样在过渡期间可以减少错误发生。

新闻出处,“LLVM Clang Now Exposes -std=c++23 Rather Than -std=c++2b”: https://www.phoronix.com/news/LLVM-Clang-std-cpp-23

关键词: LLVM, clang

GCC 12.3 发布,修复了 127+ 错误

While GCC 13.1 recently released as the first major stable release of the GCC 13 series, for those continuing to depend upon last year’s GCC 12 stable series there is a new point release available today.

虽然 GCC 13.1 最近作为 GCC 13 系列的第一个主要稳定版本发布,但对于那些继续依赖去年 GCC 12 稳定系列的人来说,今天有一个新的小版本可用。

GCC 12.3 于本周一发布了,这是自去年 8 月发布 GCC 12.2 以来的第一个维护更新。在 GCC 12.3 更新中改正了超过 127 个已知的错误。

除了许多错误修复之外,使 GCC 12.3 更加引人注目的是,后向移植了对 AMD Zen 4(znver12)的支持。这包含最初的 -march=znver 和一些由来自 SUSE 工程师提供的基本调整。

这个新版本对于那些坚持使用 GCC 12 系列的人来说非常有用,而那些想要最新的编译器功能和支持的人可以尽快迁移到 GCC 13 系列。

新闻出处,“GCC 12.3 Released With 127+ Bug Fixes, AMD Zen 4 Support Backported”: https://www.phoronix.com/news/GCC-12.3-Released

关键词: GCC

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: