[go: up one dir, main page]

|
|
Log in / Subscribe / Register

4.5 merge window part 3

By Jonathan Corbet
January 25, 2016
As expected, Linus released the 4.5-rc1 development kernel and closed the merge window for this cycle on January 24. Less than 2,000 changes were pulled since last week's summary, but there were some significant changes to be found among them. Some of the more interesting changes include:

  • A new tool called UBSAN checks a running kernel for various types of undefined behavior that can lead to obscure bugs; the commit changelog contains a list of bugs that have already been found by UBSAN and fixed. See Documentation/ubsan.txt for an introduction to this tool.

  • The new CONFIG_IO_STRICT_DEVMEM option, which blocks access to memory (via /dev/mem) claimed by device drivers, turned out to break booting on some systems, so it is now off by default.

  • The ARM multiplatform work, which aims to build a single ARM kernel that can boot on a wide variety of processors, has reached an important milestone with the merging of work to bring a number of minor platforms into the fold.

    This branch is the culmination of 5 years of effort to bring the ARMv6 and ARMv7 platforms together such that they can all be enabled and boot the same kernel. It has been a tremendous amount of cleanup and refactoring by a huge number of people, and creation of several new (and major) subsystems to better abstract out all the platform details in an appropriate manner.

  • The filesystems in user space (FUSE) subsystem has added support for the SEEK_HOLE and SEEK_DATA options to the lseek() system call.

  • The epoll_ctl() system call supports a new flag, EPOLLEXCLUSIVE, that causes epoll_wait() to only wake one process when a file descriptor becomes ready. See this article for a description of this option and the use case for it.

  • Direct-access ("DAX") mappings now work properly with the msync() and fsync() system calls.

  • The ext4 filesystem has gained "project quota" support, wherein dispersed files can be assigned to the same "project" and given their own quota. The feature is rigorously undocumented, but some information be found in the header of this patch posting.

  • The implementation of the XFS XFS_IOC_FSSETXATTR and XFS_IOC_FSGETXATTR ioctl() commands has been moved up to the virtual filesystem level, and an implementation for the ext4 filesystem has been added. This operation, also severely undocumented, allows the querying (and setting) of various file attributes, including immutability, whether writes should always be synchronous, exclusion from backups, and more. See the defines near the top of this commit for the list of supported attributes.

  • The Ceph filesystem now has support for asynchronous I/O.

  • New hardware support includes:

    • Systems and processors: Renesas R-Car H3 systems, Ralink MT7621 processors, Microchip PIC32MZDA processors, Socionext UniPhier systems, and NVIDIA Tegra132 processors.

    • Miscellaneous: Qualcomm "shared memory state machine" controllers, Qualcomm wireless connectivity subsystem controllers, Qualcomm PCIe controllers, TI AMx3 Wkup-M3 inter-processor communication subsystems, Raspberry Pi power domain controllers, TI OMAP dual-mode timers, HiSilicon Hip06 PCIe host controllers, Intel "volume management device" PCI host bridges, and AMD "non-transparent bridge" performance-monitoring hardware.

Finally, back in December, Linus noticed that the user-space access utilities (get_user() and friends) were showing up heavily on some profiles, especially on systems where supervisor-mode access prevention is in use. The problem is that, often, the kernel needs to perform several accesses in a sequence, with the result that access prevention is turned off and back on numerous times.

The solution, as is so often the case, is batching: turn off access prevention once, do all the work, then turn it back on. To support this mode of access, Linus has introduced a new set of macros:

    user_access_begin();
    unsafe_put_user(value, user_space_pointer);
    unsafe_get_user(value, user_space_pointer);
    user_access_end();

As he puts it in the comments, the "unsafe" functions are not actually unsafe if they are used correctly, but developers must pay attention. The unsafe_put_user() and unsafe_get_user() macros can only be used after a user_access_begin() call is made, and the usual access_ok() checks must be done first. The first use of these functions is in the user-space string-manipulation functions. Only x86 is supported in 4.5, but support for other architectures should be forthcoming.

At the close of the merge window, 10,305 non-merge changesets had been pulled into the mainline repository. That suggests that 4.5 will be a relatively slow development cycle with regard to the number of changes merged. Much of that "slowness" can be attributed to a relatively small merge from the staging tree this time around; otherwise, the kernel developers appear to be working at full speed.

If the usual 63-day cycle holds, the release of the final 4.5 kernel can be expected to happen on March 13. Between now and then, though, there are certainly numerous bugs to be found and fixed.

Index entries for this article
KernelReleases/4.5


to post comments

“The feature is rigorously undocumented”…

Posted Jan 26, 2016 1:02 UTC (Tue) by wjt (subscriber, #56250) [Link]

…is a great turn of phrase.

4.5 merge window part 3

Posted Jan 26, 2016 1:46 UTC (Tue) by pranith (subscriber, #53092) [Link] (1 responses)

Some news sites report 4.5 as having Raspberry Pi 2 support. Is it completely supported out of the box now? Or do we need out-of-tree patches? Rpi2 will be a great learning resource for new kernel developers...

4.5 merge window part 3

Posted Jan 26, 2016 9:58 UTC (Tue) by lkundrak (subscriber, #43452) [Link]

The GPU seems missing from the devicetree, so the simple framebuffer set up by the U-Boot will be used instead.

Also missing is the VCHIQ interface to the VideoCore, which is used to drive the camera and the analog sound (though it's just the PWM pins, you could just drive them directly).

Other than that the rest is pretty much there. I2C, I2S, GPIO, USB, UART, PWM. I haven't tried it with RPi 2 yet, but the version 1 boards run mainline all right.

4.5 merge window part 3

Posted Jan 27, 2016 2:13 UTC (Wed) by dgc (subscriber, #6611) [Link]

XFS_IOC_[GS]ETXATTR is definitely documented, like all the XFS ioctls are. See the xfsctl(3) man page. No, there hasn't been a new man page written for FS_IOC versions yet.

XFS project quotas are documented in xfs_quota(8), projid(5), projects(5) and xfsctl(3). The ext4 project quota implementation is supposed to be API and behaviourally identical to XFS project quota (hence the above ioctl move, which is how XFS sets and clears project quota IDs on inodes).

However, AFAIK none of that has been tested, because the there is no userspace for the ext4 code yet, and no tests in xfstests that exercise it. I only wrote the patches to make xfs_quota work with non-xfs filesystems a couple of weeks ago so that the XFS specific project quota tests can be made to run on ext4 without serious modification.

-Dave.

Linus' comment - what is this "SMAP" his CPU supports?

Posted Jan 28, 2016 7:17 UTC (Thu) by pr1268 (guest, #24648) [Link] (3 responses)

In reference to Linus' comment, what is SMAP?

Linus' comment - what is this "SMAP" his CPU supports?

Posted Jan 28, 2016 8:43 UTC (Thu) by pebolle (guest, #35204) [Link] (2 responses)

Never heard of it before, but git grep suggests its "Supervisor Mode Access Prevention":
> git grep -nw SMAP
> Documentation/kernel-parameters.txt:2475: Disable SMAP (Supervisor Mode Access Prevention)
> [...]
> arch/x86/Kconfig:1684: Supervisor Mode Access Prevention (SMAP) is a security

A short summary can be found in arch/x86/Kconfig:
> Supervisor Mode Access Prevention (SMAP) is a security
> feature in newer Intel processors. There is a small
> performance cost if this enabled and turned on; there is
> also a small increase in the kernel size if this is enabled.

Hope this helps.

Linus' comment - what is this "SMAP" his CPU supports?

Posted Jan 28, 2016 8:59 UTC (Thu) by pebolle (guest, #35204) [Link] (1 responses)

An much longer explanation was actually linked to in the article: https://lwn.net/Articles/517475/. (Note to self: read first, comment later.)

Linus' comment - what is this "SMAP" his CPU supports?

Posted Jan 28, 2016 22:44 UTC (Thu) by pr1268 (guest, #24648) [Link]

Note to self: read first, comment later.

Agreed, but I wouldn't have guessed that an article on new technology from 3 1/2 years ago would just now be relevant. What disturbs me more, though, is that Acronymfinder.com didn't have any IT-related acronyms mentioning this, and Google Search was a dud (but apparently there's a Japanese boy band named SMAP!). :-D

Thank you for your reply.


Copyright © 2016, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds