days
-4
-4
hours
0
-8
minutes
-3
-2
seconds
-2
-5
search
JAX Developers Puzzle deadline approaching: Play for a chance to win a complimentary JAX London 2018 ticket!
Development in progress

Linux 4.0 just landed, but lets talk Linux 4.1

Natali Vlatko
Work in progress image via Shutterstock

Linux 4.1 is on its way, and with it comes the much awaited integration of KDBUS, which will get systemd developers excited. There’s also decidedly more girl power via the Outreachy paid internship program.

Shortly after the release of Linux 4.0, details have already begun to emerge about Linux 4.1. A collection of pull requests have been monitored to show what users can expect in the next instalment of Linux’s new numbering pattern.

Finally introducing KDBUS

KDBUS, a D-Bus IPC implementation for the Linux kernel, is set to become a reality in v4.1. Having been in development for many years, the latest patches (v4) were posted by Greg Kroah-Hartman to the kernel mailing list in March. Kroah-Hartman has now called for KDBUS integration via pull request.

The argument for KDBUS over user-space cites better performance, fewer process context switches, fewer copies and fewer syscalls:

DBus is not used for performance sensitive applications because DBus is slow. We want to make it fast so we can finally use it for low-latency, high-throughput applications. A simple DBus method-call+reply takes 200us on an up-to-date test machine, with KDBUS it takes 8us (withUDS about 2us). If the packet size is increased from 8k to 128k, KDBUS even beats UDS due to single-copy transfers.

Security is also said to be better, with all data transfer controlled by the kernel “so that LSMs can track and control what is going on, without involving user-space”. LSMs are the Linux Security Modules, which have been standard since Linux 2.6.

KDBUS has been in demand by systemd developers in particular, and is currently being used for new Linux sandboxing of apps. Kroah-Hartman is a big admirer of the feature, making his thoughts clear in the pull request:

It is a shame that we cannot use this well-established protocol for low-latency applications. We, effectively, have to duplicate all this code on custom UDS and other transports just because DBus is too slow. KDBUS tries to unify those efforts, so that we don’t need multiple policy implementations, name registries and peer discovery mechanisms.

The implementation is also set to close a lot of races which can’t be fixed with current user-space solutions, and will introduce over 34,000 lines of new code into the kernel.

Ladies lending a hand

With thanks to Outreachy, the paid internship program for women to contribute to free and open-source software projects, the kernel has also got several new female developers contributing, in particular to v4.1’s staging driver patches.

The contributed kernel patches for cleaning up items within the staging tree comes from Linux’s long involvement with the program, formerly organised by the GNOME Foundation. The program aims to get women, and those identifying as women, involved with free software development.

The patchset contains “normal coding style and sparse fixes” and driver updates, with this cycle’s staging pull having a total of 38,863 insertions and 22,325 deletions.

Potential risk with x86/ASM changes

Ingo Molnar has sent in the request for x86/ASM code, but the risk of regression has been floated with the upcoming exposure of the code to more systems in the coming weeks of development.

Molnar has described the many changes made in this development cycle as risky and tests have already been run on a number of different x86 systems. While the changes are split up finely to help bisection, Molnar warns that “there’s still a fair bit of residual risk left so caveat emptor”.

SEE ALSO: Live patching means less reboots in Linux 4.0

Changes include over 100 separate cleanups, restructuring changes and speedups, plus simplifications and tidying of the compat code.

Linux 4.1 will also address the potential security issue in an AMD Bulldozer Linux ASLR weakness that reduces the entropy available to the system 87.5%. Molnar has introduced the pull in order to improve AMD’s ASLR workaround for Bulldozer processors to increase randomisation by 3 bits per bootup.

Back in Series 3…

Wait, there’s still stuff going on in Series 3! The fourth maintenance release of the 3.19 kernel series has been made available for download here. Among the updates are fixes to the ARM64 and PowerPC architectures and Kroah-Hartman recommends an immediate upgrade.

Numerous drivers have been updated as well, with the standouts being WiFi and Synaptics.

Author
Natali Vlatko
An Australian who calls Berlin home, via a two year love affair with Singapore. Natali was an Editorial Assistant for JAXenter.com (S&S Media Group).

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of