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

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

泰晓资讯·10月 / 第二期 / 2019

Wang Chen 创作于 2019/10/18

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

Linux 内核对多路径 TCP 传输(Multipath TCP)支持的最新报道

The multipath TCP (MPTCP) protocol (and the Linux implementation of it) have been under development for a solid decade; MPTCP offers a number of advantages for devices that have more than one network interface available. Despite having been deployed widely, though, MPTCP is still not supported by the upstream Linux kernel. At the 2019 Linux Plumbers Conference, Matthieu Baerts and Mat Martineau discussed the current state of the Linux MPTCP implementation and what will be required to get it into the mainline kernel.

Multipath TCP(简称 MPTCP)由 RFC 6824 所定义,它的核心想法是,允许一个网络连接(network connection)能通过多条物理路径来收发数据。一个很典型的应用场景就是在手机上。手机一般拥有多个网络接口,譬如 WiFi 和 4G,如果能同时利用这两条链路来发送数据,肯定能够得到更高的带宽,容错性也会更高(其中任一条链路出错也不会导致网络连接发生中断)。

过去差不多十年中,MPTCP 协议自身以及 Linux 内核对该协议的支持一直处于持续开发中。MPTCP 对于拥有超过一个网卡接口的设备来说有很多好处。虽然现在有很多地方已经采用了 MPTCP,不过 Linux 内核主线尚未对其正式支持。在 2019 Linux Plumbers 大会上,Matthieu Baerts 和 Mat Martineau 讨论了 Linux 对 MPTCP 支持的最新状态,感兴趣的读者可以查看 这里 获取更多信息。

关键词: Linux,MPTCP

一次死机引发的大讨论

A report of a boot hang in the 5.3 series has led to an enormous, somewhat contentious thread on the linux-kernel mailing list. The proximate cause was some changes that made the ext4 filesystem do less I/O early in the boot phase, incidentally causing fewer interrupts, but the underlying issue was the getrandom() system call, which was blocking until the /dev/urandom pool was initialized—as designed. Since the system in question was not gathering enough entropy due to the lack of unpredictable interrupt timings, that would hang more or less forever. That has called into question the design and implementation of getrandom().

针对 Linux 内核 5.3 版本,有人报出一个启动过程中发生死机的 问题,针对该问题的讨论在内核邮件列表中愈演愈烈,最终发酵成了一个影响很大的、充满争议性的话题。该问题的大致描述是这样的,由于近期的一些改动使得 ext4 文件系统在系统引导的早期阶段执行读写操作数量变少,这有时会导致中断发生的次数变少,但更严重的问题是引发了死机的故障,当该问题发生时,由于 Linux 的 getramdom() 系统调用的当前设计行为会导致该函数在 /dev/urandom 初始化完成之前一直阻塞。造成系统在启动早期阶段没有搜集到足够的随机事件(主要是那些随机的中断不够多),最终导致系统进入死机状态。这引起社区对 getramdon() 实现机制的争论。针对该问题的讨论非常长,目前还不清楚 Torvalds 的最终决定是什么。

这件事情从另一方面也表明内核社区又一次在 API / ABI 设计上出了问题。自该 API 发布五年后,Torvalds 以及其他人终于意识到 getrandom() 的行为不应该是永远阻塞的,可惜已为时已晚。对 API / ABI 的审核是内核社区过去多年来一直希望改善的工作,希望这次能给大家提个醒,今后能花更多时间来审核和测试这些 ABI 相关的改动。有关该讨论的更多内容请参考 原文

关键词: Linux,getrandom

LLVM,你已不再是“我”的唯一

The addition of extended BPF to the kernel has opened up a whole range of use cases, but few developers actually write BPF code. It is, like any other assembly-level language, a tedious pain to work with; developers would rather use a higher-level language. For BPF, the language of choice is C, which is compiled to BPF with the LLVM compiler. But, as Jose Marchesi described during the Toolchains microconference at the 2019 Linux Plumbers Conference, LLVM will soon have company, as he has just added support for a BPF back-end to the GCC compiler.

自从 Linux 内核开始支持 eBPF (extended BPF) 之后,出现了很多各式各样的应用场景。不过还是只有很少人真正写过 BPF 的代码。因为目前使用 BPF 编程的感觉有点像当年使用汇编级语言写代码那样,特别难用,而程序员更喜欢使用高级语言来写代码。目前有一种方法是先用 C 语言来写,然后使用 LLVM 编译器可以把 C 语言编译成 BPF 程序。不过,在 2019 Linux Plumbers 大会上的工具链分会上,Jose Marchesi 指出,他已经在 GCC 编译器里也加上了对 BPF back-end 的支持。更多细节介绍请参考 原文

关键词: BPF,LLVM,GCC

Linux 又爆惊天大 BUG

Sudo, the main command in Linux that allows users to run tasks, has been found to have a vulnerability that allows unauthorized users to execute commands as a root user.

The vulnerability, known as CVE-2019-14287, does require a nonstandard configuration but nonetheless does open the door to unauthorized users.

最近社区发布编号为 CVE-2019-14287 的 Sudo 安全漏洞。大家都知道 Sudo 是一款使用于 Unix-like 系统的,允许用户通过安全的方式使用特殊的权限执行命令的程序。 由于 sudo 中存在安全漏洞,攻击者可利用该漏洞以 root 权限运行命令。Debian 项目和 Canonical 已经快速修复了这个影响 Sudo 程序的关键安全漏洞。各位读者朋友们,不要颤抖了 :-),赶紧更新你们的系统吧!

关键词: 安全漏洞,sudo

Python 3.8 稳定版正式发布

Python 语言项目于 2019 年 10 月 14 日正式发布了最新的大更新版本 v3.8,下一个版本 3.9 已在开发之中。

Python 语言每一年半时间发布一个大更新版本,今年早些时候开发者谈论加快发布节奏,比如采用一年一次大更新,但决定尚未作出。

相比 3.7 ,Python 3.8 的主要变化包括:

  • 新的赋值表达式语法 :=;它被昵称为 “海象运算符”, 因为它很像是海象的眼睛和长牙。
  • 新增了一个函数形参语法 / 用来指明某些函数形参必须使用仅限位置而非关键字参数的形式。
  • 用于已编译字节码文件的并行文件系统缓存。
  • 调试构建使用与发布构建相同的 ABI。
  • 增加 = 说明符用于 f-string。 用于自动记录表达式和调试文档。
  • 新的 C API 用来配置 Python 初始化。
  • 等等,更多特性可浏览文档 https://docs.python.org/zh-cn/3.8/whatsnew/3.8.html。

关键词: Python,3.8

Zephyr RTOS 2.0 发布

Last month, the Zephyr Project announced the release of Zephyr RTOS 2.0 and we are excited to share the details with you! Zephyr 2.0 is the first release of Zephyr RTOS after the 1.14 release with Long-Term support in April 2019. It is also a huge step up from the 1.14 release, bringing a wide list of new features, significant enhancements in existing features, as well as a large list of new HW platforms and development boards.

上个月,Zephyr 项目宣布发布 Zephyr RTOS 2.0。Zephyr 2.0 是在 1.14 版本(发布于 2019 年 4 月并提供长期支持)之后发布的又一个版本。与 1.14 版本相比有了巨大的进步,带来了一系列新功能,以及对现有功能的重大增强,该版本还增加了对大量新的硬件平台和开发板的支持。

  • 在内核方面,增强了与 64 位体系架构的兼容性;通过提高无固定周期时钟中断的默认频率,显著提高了定时器超时的精度。
  • 增加对 ARM Cortex-R 体系架构的支持。
  • 稳定了低功耗蓝牙(Bluetooth Low Energy,简称 BLE)的 split controller,该控制器现在是 Zephyr RTOS 中的默认 BLE 控制器。
  • 其他对网络的新支持。

关键词: Zephyr,2.0

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: