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

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

泰晓资讯·11月 / 第四期 / 2019

Wang Chen 创作于 2019/11/29

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

Linux Kernel 5.4 正式发布

This release includes the kernel lockdown mode, intended to strengthen the boundary between UID 0 and the kernel; virtio-fs, a high-performance virtio driver which allows a virtualized guest to mount a directory that has been exported on the host; fs-verity, for detecting file tampering, like dm-verity, but works on files rather than block devices; dm-clone, which allows live cloning of dm targets; two new madvise() flags for improved app memory management on Android, support for new Intel/AMD GPUs, support for the exfat file system and removing the experimental status of the EROFS file system; a new haltpoll cpuidle driver and governor that greatly improves performance for virtualized guests wanting to do guest-side polling in the idle loop; and blk-iocost, a I/O cgroup controller that attempts to calculate the cost of I/O more accurately. As always, there are many other new drivers and improvements.

Linus Torvalds 在内核开发者邮件列表上宣布释出 Linux 5.4。主要新特性包括:

  • 增加内核锁定(lockdown)模式,
  • virtio-fs 文件系统,允许一个虚拟的访问 guest 在 host 上 exported 的目录上执行挂载动作。
  • fs-verity 文件完整性检查机制,类似 dm-verity,但是不是作用于块设备而是以文件为单位进行检查。
  • dm-clone 设备映射器对象,
  • 正式支持 EROFS 文件系统。值得提一下的是:EROFS 文件系统是华为公司自研的一项提升手机随机读写性能的系统及应用编译和运行机制,全称为 Extendable Read-Only File System,又称做为 “超级文件系统”,提升了安卓系统分区(相当于电脑的 C 盘)的随机读性能,从系统底层提升手机流畅度。
  • haltpoll CPU 调节器,
  • iocost I/O 控制器,
  • 新的随机数生成器,
  • 内核符号命名空间,
  • 支持新的 Intel/AMD 的 GPU,
  • 等等

更多细节可浏览 kernelnewbies:http://kernelnewbies.org/Linux_5.4

关键词: Linux, 5.4

Linux 内核 5.4 版本开发周期中的一些有趣的统计数据

As of this writing, just over 14,000 non-merge changesets have found their way into the mainline repository for the 5.4 release; that is a bit less than we saw for 5.3, but more than most of the other recent kernels. The final 5.4 release is approaching, so it must be time for our usual look at where the code merged in this development cycle came from. It’s mostly business as usual in the kernel community, modulo an appearance from none other than Hulk Robot.

截止 2019 年 11 月 7 日,已经有 14000 个 changeset 合入了 mainline 仓库,这些修改都会被包含在后续的 5.4 版本里。这个数字比起 5.3 的数量要少,不过比起其他近期的 kernel 版本来说补丁数量还是要多一些的。在最终的 5.4 版本发布之前,让我们再次看一下这个开发周期中合入的补丁统计信息吧:

5.4 的贡献者中,我们识别出来的有 234 个公司、组织,其中最活跃的是:

image

其中 650 个来自华为的 changeset 已经是这个公司的新纪录了。众所周知,华为在市场领域遇到了很明显的政治干扰,不过这并没有阻止该公司在代码方面对内核的贡献。华为加油!

更多有趣的统计信息可浏览 LWN 的文章 “Statistics from the 5.4 development cycle”

关键词: Linux, 5.4

统一地址空间

Linux systems have traditionally run with a single address space that is shared by user and kernel space. That changed with the advent of the Meltdown vulnerability, which forced the merging of kernel page-table isolation (KPTI) at the end of 2017. But, Mike Rapoport said during his 2019 Open Source Summit Europe talk, that may not be the end of the story for address-space isolation. There is a good case to be made for increasing the separation of address spaces, but implementing that may require some fundamental changes in how kernel memory management works.

一直以来 Linux 系统都是让用户和内核共享同一个地址空间。在 Meltdown 漏洞爆发之后,大家期望改变这种做法,因此在 2017 年底合入了 kernel page-table isolation (KPTI) 这个功能。不过 Mike Rapoport 在 2019 年欧洲开源峰会上提醒大家,这个方案的性能表现并不好,尤其是在用户空间和内核空间之间切换的时候。鉴于当时没有任何其他方案能解决 Meltdown 问题,因此 KPTI 的补丁还是被合入了。对很多人来说,这种接受有点勉强。社区中提出了多种地址空间隔离的机制,这些机制各不相同,但有一点是共同的。就是他们都希望能在现有内存中建立一块受限制的地址区间,然后只有满足某些具体执行上下文条件的时候才让这块空间可见。因此 Rapoport 希望能实现一套通用 kernel API 来供这些地址空间隔离机制使用。不过这会对内存子系统引入不少重要的改动。

更多详细内容可浏览 LWN 的文章 “Generalizing address-space isolation”

关键词: Linux, address-space

模拟 iopl()

Operating systems and computing hardware both carry a lot of their history with them. The x86 I/O-port mechanism is one piece of that history; it is rarely used by hardware designed in the last 20 years, but it must still be supported. That doesn’t mean that this support can’t be cleaned up and improved, though, especially when the old implementation turns out to have some unpleasant properties. An example can be seen in the iopl() patch set from Thomas Gleixner.

在大多数体系架构上,I/O 都是按照 memory-mapped I/O(MMIO)方式来处理。但在 x86 早期,创建了一个独立的地址空间用来支持 65536 个 I/O 端口,需要使用特殊的指令来访问这些 I/O 端口。并且这些指令都是特权级别的。不过有时候的确需要在用户态操作外设。为了支持这个功能,x86 设计者就创建了两种独立的方式供非特权进程来访问 I/O 端口:一种是通过 iopl() 系统调用来修改 IOPL 寄存器允许普通的用户态进程访问 I/O 端口。另一种是利用存放在 TSS 里的标志位 bitmap 来控制对某个特定的端口的操作权限。如果对应某个端口的相应位是 0,那么该进程就可以访问这个端口。可以使用 ioperm() 系统调用来修改这个 bitmap。

但使用 iopl() 有一个小问题:提升进程的 I/O 权限级别的同时,也会允许该进程打开或者关闭中断。如果这个进程怀有恶意,譬如关掉中断然后做死循环就很容易会把 CPU 搞死。虽然最好的做法是完全废弃掉 iopl() 这个接口,但是考虑到不少应用程序依然依赖这个函数,所以还不能简单粗暴地去掉这个功能。为此,Thomas Gleixner 提交了一个补丁,希望在保留该接口的前提下,在内部通过 bitmap 的方式替换掉其实现。经过社区的审查和改进后,这个改进有望被合入。

更多详细内容可浏览 LWN 的文章 “Emulated iopl()”

关键词: Linux, iopl

谷歌发布自家单片机专用操作系统,基于 Debian GNU/Linux 10

Google announced over the weekend the general availability of Mendel Linux 4.0 “Day,” the company’s in-house built, Debian-based GNU/Linux distribution for its Coral Dev Board and System-on-Module (SoM). Revealed earlier this year as a Raspberry Pi rival, Google’s Coral Dev Board single-board computer (SBC) and System-on-Module (SoM) just received a much-improved, more stable and up-to-date Mendel Linux OS, which is based on the latest Debian GNU/Linux 10 “Buster” operating system series and ships with Linux kernel 4.14 LTS, Python 3.7, and U-Boot 2017.03.3, as well as upgraded GStreamer, OpenCV, and OpenCL components.

谷歌(Google)在周末宣布了 Mendel Linux 4.0 “Day” 的全面上市,这是该公司内部开发的基于 Debian 的 GNU/Linux 发行版本,专门用于其自家的 Coral 开发板和模块化系统(SoM),这些单片机可用于构建具备本地 AI 的物联网终端设备。在发布操作系统的同时,谷歌还一并发表了五款硬件。

谷歌的单片机的特色是对边缘计算的强大支持,可以不经过云端,直接在本地设备(边缘终端)上进行 AI 处理,Coral 平台提供了完整的本地 AI 工具,让开发者将想法从原型化为产品。它包括硬件模块、软件工具等,让开发者创建、训练和执行位于本地终端上的神经网络。Coral 平台还同时支持 Google 近日推出的正式版人工智能框架 TensorFlow Lite 。

谷歌的 Coral Dev Board 单片机(SBC)和模块化系统(SoM)于今年早些时候作为 Raspberry Pi 的竞争对手推出。最近又推出了专门为其配套开发的,经过改进,更稳定和最新的 Mendel Linux OS,终于补齐了整个生态。 它基于最新的 Debian GNU/Linux 10 “ Buster” 操作系统系列,采用的是 4.14 LTS 版本的 Linux 内核,其他软件包括 Python 3.7 和 U-Boot 2017.03.3,以及升级版 GStreamer,OpenCV 和 OpenCL 组件。

关键词: Google, Mendel Linux

“MIPS Open” 计划 “黄” 了

Wave Computing has announced the immediate closure of the MIPS Open Initiative, a programme which provided royalty-free access to the MIPS architecture and cores based around it, less than a year after its launch.

继 2018 年底,收购 MIPS 公司的美国 AI 公司 Wave Computing 宣布其正式启动 MIPS Open 项目,完全开源 MIPS 架构后, 不到一年,近日又再次宣布从 2019 年 11 月 14 日开始,关闭 MIPS Open 项目,并立即生效。Wave 将不再提供 MIPS 的免费下载,包括 MIPS 架构、核心、工具、IDE、模拟器、FPGA 包和/或任何与之相关的软件代码或者计算机硬件。

虽然大家都感觉得到,与 RISC-V 和 OpenSPARC 等更加开放的竞争对手相比,MIPS Open 的动作过于缓慢,但 Wave Computing 突然决定无条件放弃开源的决定仍然让大家觉得过于意外,这也使得那些和 MIPS Open 项目相关的工作陷入困境。

关键词: MIPS

在命令行窗口中看大片《星球大战》,太强了!

今天看到一个非常有趣的网站,分享给大家,这个网站需要 telnet 登录。

在命令行窗口输入:telnet Towel.blinkenlights.nl,然后星球大战就开始了, 首先出现的是 20 世纪福克斯的 Logo,有趣的是那光柱还是动态的。美中不足的是,网速有时候比较慢,看的时候得耐心一点,如果你实在是等不及,可以直接去作者的网站上去看看: http://www.asciimation.co.nz/

关键词: 星球大战

联系我们

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

tinylab wechat



Read Album:

Read Related:

Read Latest: