Official website for Linux User & Developer

Linux Kernel 3.12 – The kernel column

by Jon Masters

Jon Masters summarises the latest happenings in the Linux kernel community, as preparations for the final release of Linux 3.12 near completion

Linus Torvalds announced the Linux 3.12 Release Candidate (RC) 6 kernel from the Portland, Oregon (PDX) airport saying, “I’m at PDX, about to fly out to the Kernel Summit, and it has almost become tradition to do an RC release using the airport Wi-Fi. So here it is…” Indeed, that PDX Wi-Fi has been used to ship a growing number of kernels over the years. As Linus noted, this was immediately prior to the 2013 Kernel Summit, in Edinburgh, and as a result many developers and maintainers were in transit (and not posting patches). Therefore it was not expected that there would be much more excitement left in 3.12. A good thing since there had been a little in the previous RC.

3.12-RC5 had contained a late-breaking workaround for a heretofore unnoticed compiler bug in GCC when using ‘asm goto’ statements (jumps contained within inline assembly code blocks). The actual problem was detected in code waiting to be merged into 3.13 (once its merge window opens, after 3.12 is released), but a quick hack fix was merged into 3.12 since it wasn’t entirely obvious that the problem wasn’t silently waiting to strike. A real fix to GCC is scheduled for the 4.8.1 release, and the kernel hack checks for this.

Cross renaming

Miklos Szeredi has proposed a new patch series in an RFC (Request For Comments) post to the Linux Kernel Mailing List (LKML) entitled ‘cross rename’. The RFC adds support for a new system call named renameat2(), which is similar to the existing renameat() system call, but adds a flag argument. Using the new flag argument, it is possible to instruct the renameat() system call to atomically exchange two files in addition to simply renaming them – ie ‘foo’ and ‘bar’ are atomically swapped and point to the content formerly owned by the other.

The renameat2() system call exists to make life easier for union and overlay file systems as much as it does for simply exchanging two files. When a union file system is implemented, it creates a new virtual file system that appears to contain a combination of several others. In many cases (such as router devices, live file system USB sticks, and so on), the union file system combines a read-only file system with a small writeable one
that contains additions as well as ‘whiteouts’. The latter are file entries created to instruct the union file system to hide one of the underlying files that is supposed to have been deleted by the user. The renameat2() system call makes this particularly easy by allowing a whiteout entry to first be created and then atomically swapped in place on the union. Other interesting uses for cross rename are replacing a whole directory tree with a symbolic link, and other things that were not possible before.

linux-nextOngoing development

Chris Metcalf (of Tilera fame) has posted a number of patches enabling virtualisation support for the Tile architecture. Perhaps most interesting is that the Tile KVM implementation actually provides a virtual machine that offers the same interfaces as the underlying hypervisor that is present on all Tile-based systems to begin with. In other words, no Tile kernel runs directly on the bare metal to begin with, but adding Linux virtualisation abstracts this abstraction still further!

A number of fixes to the UEFI code have gone into the kernel recently, in particular to unify the code between architectures that now use it (most recently, both 32-bit and 64-bit ARM have joined 64-bit x86 and Itanium) and reduce duplication. Other patches include a Runtime Services lock from Matt Fleming (the UEFI maintainer) which removes a few problems with the potential for reentrancy (calling an UEFI function twice at the same time from different parts of the kernel – that is not supported) by excluding it. Matt also merged support for ‘earlyprintk’ in the EFI code, allowing for very early debug without recourse to specialist hardware debuggers. On those systems using UEFI, the kernel will now support ‘earlyprintk=efi’ and use the EFI-provided interfaces for outputting text to the EFI console prior to the kernel assuming control over the I/O devices, such as the system serial port(s).

In this month’s announcements, James Bottomley has posted on behalf of the Linux Plumbers Conference Steering Committee to say that the call for applications to become the next Plumbers planning team is now open. The chosen favourite location is Düsseldorf, Germany, colocated with the LinuxCon Europe event on the week of 13-17 October 2014, but they are willing to entertain strong candidate proposals for colocation with LinuxCon North America in Chicago on the week of 18-22 August 2014. Assuming Plumbers does take place in Germany, it will be the first time in Europe, and the first time that it has taken place outside of the United States.

Finally this month comes another first for the Linux kernel. Peter Anvin (aka ‘hpa’) posted a patch to the x86 ‘boot’ code (the entry point uncompression code that unpacks a kernel image loaded by GRUB2 or another bootloader and actually loads the kernel entry-point). The actual patch wasn’t important so much as the fact that it was entered using the keyboard on an Android mobile phone. As Ingo Molnar said in response, “it’s probably a new Linux milestone, in a twisted, sick way”. Let’s hope for the sake of sanity that it doesn’t become a norm!

Tags: ,
  • Tell a Friend
  • Follow our Twitter to find out about all the latest Linux news, reviews, previews, interviews, features and a whole more.