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

泰晓RISC-V实验箱,不会吃灰,开箱即用
请稍侯

泰晓资讯·6月 / 第一期 / 2020

Wang Chen 创作于 2020/06/19

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

Linux 5.7 发布

``` We've got a lot of changes in 5.7 as usual (all the stats look normal - but "normal" for us obviously pretty big and means "almost 14 thousand non-merge commits all over, from close to two thousand developers"), So the appended shortlog is only the small stuff that came in this last week since rc7.

Go test,

             Linus ```

五月的最后一天, Linus Torvalds 在内核邮件列表中正式发布了 Linux Kernel 5.7 版本。在发布公告中他评论道:“上周我们表现得相当平静,没有什么意外让我们再拖一个 rc。祈祷好运”

本次大版本发布包含了近两千名开发人员贡献的将近 1.4 万个合并提交。5.7 版本包含了许多新功能和改进,例如 Apple USB “Fast Charge” 驱动;Intel Tiger Lake “Gen12” 显卡驱动;AMD Renoir 显卡驱动;F2FS Zstd 支持;以及对 Qualcomm Snapdragon 865 的支持等等。更多详细内容清单请访问 https://kernelnewbies.org/Linux_5.7

**关键词**: Linux,5.7

一个新的 open 文件标志 O_MAYEXEC

Normally, when a kernel developer shows up with a proposed option that doesn’t do anything, a skeptical response can be expected. But there are exceptions. Mickaël Salaün is proposing the addition of a new flag (O_MAYEXEC) for the openat2() system call that, by default, will change nothing. But it does open a path toward tighter security in some situations.

我们知道,在 Linux 上一个文件的可执行位如果没有被设置,或者即使设置了但这个文件所在的文件系统在挂载时带有 noexec 选项,那么这个文件是不可以被执行的。但这种保护有一个重要的漏洞:譬如,在上述条件下,如果我们将一个包含有 Perl 代码的文件采用 perl -e 的方式码交给解释器(interpreters)打开,仍然会被解释和执行。

为此 Mickaël Salaün 提出为 openat2() 这个系统调用增加一个新的打开文件选项 O_MAYEXEC,用以明确告诉内核本次执行打开文件的目的是要执行其中的文件内容,这样内核有机会执行附加的检查,从而在执行条件不满足的条件下拒绝此次打开操作。为了和以往行为保持兼容,补丁新增了一个系统开关 fs.open_mayexec_enforce,默认情况下(0)不会执行该检查,一旦置为 1 则改变 openat2() 的行为,执行对 O_MAYEXEC 的检查。该选项目前不会影响 open() 等传统 API 的行为。

这组 patch set 已经提交到第五版。开发者们似乎对当前版本相对来说还是比较满意的,所以可能已经接近于进入 mainline 了。一旦该补丁就绪,各种语言解释器、链接器(linker)也需要尽快跟上,但看起来应该不是什么困难的事情。更多详细介绍请参考 LWN 原文 “O_MAYEXEC — explicitly opening files for execution”

关键词: Linux,openat2(),O_MAYEXEC

“处理器核调度算法(Core scheduling)” 的最新进展

Core scheduling is a proposed modification to the kernel’s CPU scheduler that allows system administrators to control which processes can be running simultaneously on the same processor core. It was originally proposed as a security mechanism, but other use cases have shown up over time as well. At the 2020 Power Management and Scheduling in the Linux Kernel summit (OSPM), a group of some 50 developers gathered online to discuss the current state of the core-scheduling patches and what is needed to get them into the mainline kernel.

Core scheduling 是对内核的 CPU 调度器的一种改进方案,用来供系统管理员控制哪些进程可以在同一个处理器上同时运行。在 2020 Power Management and Scheduling in the Linux Kernel summit(OSPM)上,约 50 名开发者在线聚集在一起,讨论了 core scheduling 的开发现状,以及在将其纳入内核主线之前还有多少工作需要完成。会议共进行了三个小时,总结的 TODO list 包括:vruntime、CPU 热插拔和公平性问题等。看来疫情下的在线会议方式还是卓有成效的,会议结束时,调度子系统的负责人 Zijlstra 说,这项工作看起来已经为继续推进做好了准备,剩下的问题都可以在邮件列表中解决。关心内核调度的同学参考原文 “Completing and merging core scheduling” 了解更多详细而专业的讨论内容。

关键词: Linux,Core scheduling

大家都来学习 IO_uring

Shuveb Hussain has posted an extensive introduction to io_uring, complete with examples and a reference guide. “Because of the shared ring buffers between the kernel and user space, io_uring can be a zero-copy system. Copying bytes around becomes necessary when there are system calls that transfer data between kernel and user space are involved. But since the bulk of the communication in io_uring is via buffers shared between the kernel and user space, this huge performance overhead is completely avoided.”

IO_uring 是著名的 Linux IO 专家 Jens Axboe 在 5.1 版本的内核中为我们带来的一项激动人心的新特性。据有文章 报道称,IO_uring 将和 eBPF 一起作为 Linux 的两大代表性新特性,给新时代 Linux 环境下的开发编程带来革命性的改变。

最近,来自 unixism.net,专注于 Linux, performance, scalability 和 cloud 方面的专栏作家 Shuveb Hussain 为 io_uring 量身定制了一个主页,为开发人员汇集了各种有关 io_uring 的参考资料和开发例子。感兴趣的同学还不快去速速围观。主页访问地址:https://unixism.net/loti/

关键词: Linux,IO_uring

GCC 10.1 发布

The GCC project has announced the release of GCC 10.1. “A year has lapsed away since the release of last major GCC release, more than 33 yeears passed since the first public GCC release and the GCC developers survived repository conversion from SVN to GIT earlier this year. Today, we are glad to announce another major GCC release, 10.1. This release makes great progress in the C++20 language support, both on the compiler and library sides, some C2X enhancements, various optimization enhancements and bug fixes, several new hardware enablement changes and enhancements to the compiler back-ends and many other changes. There is even a new experimental static analysis pass.” More information can be found in the release notes.

GCC 项目宣布发布 GCC 10.1 版本。 来自 redhat 的 Jakub Jelinek 在邮件列表中说:“自上一版 GCC 大版本发布以来已经过去有一年了,而自第一版 GCC 公开发布以来时光已经过去了 33 年。GCC 开发人员在今年初已经成功从 SVN 转到 GIT。今天,我们很高兴发布另一个 GCC 版本 10.1,此版本在多个方面取得了长足的进步,这些改进包括对 C++20 的规范支持(包括编译器和库两方面),一些在 C2X 上的增强功能,各种优化增强功能和错误修复,一些新的硬件支持更改以及对编译器后端的改进。” 更多发布细节可以参考官网页面:http://gcc.gnu.org/gcc-10/porting_to.html。(小编按:首先恭喜 GCC 项目,33 年,哇噻,比国内大部分程序员的年龄还要大呐 ~~~)

**关键词**: GCC

联系我们

资讯内容部分来自 “LWN.net“。如果您对某些 LWN 文章感兴趣(譬如希望获得全文翻译的)请扫描二维码加微信联系我们:

tinylab wechat



Read Album:

Read Related:

Read Latest: