KernelNewbies:

Linux 4.0 [https://lkml.org/lkml/2015/4/12/178 has been released] on Sun, 12 Apr 2015.

Summary:

TableOfContents()

1. Prominent features

1.1. Arbitrary version change

This release increases the version to 4.0. This switch from 3.x to 4.0 version numbers is, however, entirely meaningless and it should not be associated to any important changes in the kernel. This release could have been 3.20, but Linus Torvalds just got tired of the old number, [https://plus.google.com/+LinusTorvalds/posts/jmtzzLiiejc made a poll], and changed it. Yes, it is frivolous. The less you think about it, the better.

1.2. Live patching

This release introduces "livepatch", a feature for live patching the kernel code, aimed primarily at systems who want to get security updates without needing to reboot. This feature has been born as result of merging kgraft and kpatch, two attempts by SuSE and Red Hat that where started to replace the now propietary ksplice. It's relatively simple and minimalistic, as it's making use of existing kernel infrastructure (namely ftrace) as much as possible. It's also self-contained and it doesn't hook itself in any other kernel subsystems.

In this release livepatch is not feature complete, yet it provides a basic infrastructure for function "live patching" (i.e. code redirection), including API for kernel modules containing the actual patches, and API/ABI for userspace to be able to operate on the patches (look up what patches are applied, enable/disable them, etc). Most CVEs should be safe to apply this way. Only the x86 architecture is supported in this release, others will follow.

For more details see the [http://git.kernel.org/linus/1d9c5d79e6e4385aea6f69c23ba543717434ed70 merge commit]

Sample live patching module: [http://git.kernel.org/linus/13d1cf7e702596e0cd8ec62afa6bd49c431f2d0c commit]

Code [http://git.kernel.org/linus/b700e7f03df5d92f85fa5247fe1f557528d3363d commit]

1.3. DAX - Direct Access, for persistent memory storage

Before being read by programs, files are usually first copied from the disk to the kernel caches, kept in RAM. But the possible advent of persistent non-volatile memory that would be also be used as disk changes radically the way the kernel deals with this process: the kernel cache would become unnecesary overhead.

Linux has had, in fact, support for this kind of setups [http://kernelnewbies.org/Linux_2_6_13 since 2.6.13]. But the code wasn't maintaned and only supported ext2. In this release, Linux adds DAX (Direct Access, the X is for eXciting). DAX removes the extra copy incurred by the bugger by performing reads and writes directly to the persistent-memory storage device. For file mappings, the storage device is mapped directly into userspace. Support for ext4 has been added.

Recommended LWN article: [http://lwn.net/Articles/610174/ Supporting filesystems in persistent memory]

Code: [http://git.kernel.org/linus/283307c7607de2a06d3bfae4cfbf5a566d457090 commit], [http://git.kernel.org/linus/fbbbad4bc2101e452b24e6e65d3d5e11314a0b5f commit], [http://git.kernel.org/linus/d475c6346a38aef3058eba96867bfa726a3cc940 commit], [http://git.kernel.org/linus/289c6aedac981533331428bc933fff21ae332c9e commit], [http://git.kernel.org/linus/f7ca90b160307d63aaedab8bd451c24a182db20f commit], [http://git.kernel.org/linus/4c0ccfef2e9f7418a6eb0bf07a2fc8f216365b18 commit], [http://git.kernel.org/linus/95ec8daba310b44302d2977dd54b16886527b681 commit], [http://git.kernel.org/linus/6cd176a51e52e5218b1aa97e1ec916bac25a9b7e commit], [http://git.kernel.org/linus/9c3ce9ec58716733232b97771b10f31901caf62e commit], [http://git.kernel.org/linus/25726bc15731d42112b579cf73f30edbc43d3973 commit], [http://git.kernel.org/linus/a7a97fc9ff6c2fcec00feb34d9b87b94452b0b78 commit], [http://git.kernel.org/linus/d92576f1167cacf7844e5993f343eed4a6d8a147 commit], [http://git.kernel.org/linus/923ae0ff9250430133b3310fe62c47538cf1cbc1 commit]

1.4. kasan, kernel address sanitizer

Kernel Address sanitizer (KASan) is a dynamic memory error detector. It provides fast and comprehensive solution for finding use-after-free and out-of-bounds bugs. Linux already has the kmemcheck feature, but unlike kmemcheck, KASan uses compile-time instrumentation, which makes it significantly faster than kmemcheck.

The main idea of KASAN is to use shadow memory to record whether each byte of memory is safe to access or not, and use compiler's instrumentation to check the shadow memory on each memory access. Address sanitizer uses 1/8 of the memory addressable in kernel for shadow memory and uses direct mapping with a scale and offset to translate a memory address to its corresponding shadow address.

Code: [http://git.kernel.org/linus/0b24becc810dc3be6e3f94103a866f214c282394 commit], [http://git.kernel.org/linus/bebf56a1b176c2e1c9efe44e7e6915532cc682cf commit], [http://git.kernel.org/linus/c420f167db8c799d69fe43a801c58a7f02e9d57c commit], [http://git.kernel.org/linus/0316bec22ec95ea2faca6406437b0b5950553b7c commit], [http://git.kernel.org/linus/ef7f0d6a6ca8c9e4b27d78895af86c2fbfaeedb2 commit]

1.5. "lazytime" option for better update of file timestamps

Unix filesystems keep track of information about files, such as the last time a file was accessed or modified. Keeping track of this information is very expensive, specially the time when a file was accessed ("atime"), which encourages many people to disable it with the mount option "noatime". To alleviate this problem, the "relatime" mount option was added, the atime is only updated if the previous value is earlier than the modification time, or if the file was last accessed more than 24 hours ago. This behaviour, however, breaks some programs that rely on accurate access time tracking to work, and it's also against the POSIX standard.

In this release, Linux adds another alternative: "lazytime". Lazytime causes access, modified and changed time updates to only be made in the cache. The times will only be written to the disk if the inode needs to be updated anyway for some non-time related change, if fsync(), syncfs() or sync() are called, or just before an undeleted inode is evicted from memory. This is POSIX compliant, while at the same time improving the performance.

Recommended LWN article: [http://lwn.net/Articles/621046/ Introducing lazytime]

Code: [http://git.kernel.org/linus/0ae45f63d4ef8d8eeec49c7d8b44a1775fff13e8 commit], [http://git.kernel.org/linus/1efff914afac8a965ad63817ecf8861a927c2ace commit], [http://git.kernel.org/linus/a26f49926da938f47561f386be56a83dd37a496d commit]

1.6. Multiple lower layers in overlayfs

In overlayfs, multiple lower layers can now be given using the the colon (":") as a separator character between the directory names. For example:

The specified lower directories will be stacked beginning from the rightmost one and going left. In the above example lower1 will be the top, lower2 the middle and lower3 the bottom layer. "upperdir=" and "workdir=" may be omitted, in that case the overlay will be read-only.

Code: [http://git.kernel.org/linus/53a08cb9b8bccfe58f1228c7c27baf34a83da78b commit], [http://git.kernel.org/linus/a78d9f0d5d5ca9054703376c7c23c901807ddd87 commit]

1.7. Support Parallel NFS server, default to NFS v4.2

Parallel NFS (pNFS) is a part of the NFS v4.1 standard that allows compute clients to access storage devices directly and in parallel. The pNFS architecture eliminates the scalability and performance issues associated with NFS servers deployed today. This is achieved by the separation of data and metadata, and moving the metadata server out of the data path.

This release adds support for pNFS server, and drivers for the block layout with XFS support to use XFS filesystems as a block layout target, and the flexfiles layout.

Also, in this release the NFS server defaults to NFS v4.2.

Code: [http://git.kernel.org/linus/c5c707f96fc9a6e5a57ca5baac892673270abe3d commit], [http://git.kernel.org/linus/9cf514ccfacb301f3b1b4509a8ce25dffad55880 commit], [http://git.kernel.org/linus/8650b8a058502d6957ba13dfb5544724fa038118 commit], [http://git.kernel.org/linus/527851124d10f9c50b1c578e0a56fcd49922422d commit], [http://git.kernel.org/linus/d67ae825a59d639e4d8b82413af84d854617a87e commit], [http://git.kernel.org/linus/c23ae6017835b5bc9b9ec9d5d9c2b1523053f503 commit]

1.8. dm-crypt scalability improvements

This release significantlu increases the dm-crypt CPU scalability performance thanks to changes that enable effective use of an unbound workqueue across all available CPUs. A large battery of tests were performed to validate these changes, summary of results is available [https://www.redhat.com/archives/dm-devel/2015-February/msg00106.html here]

Merge: [http://git.kernel.org/linus/a911dcdba190ddf77e9199b9917156f879f42d4b commit]

2. File systems

3. Block

4. Core (various)

5. Memory management

6. Virtualization

7. Cryptography

8. Security

9. Networking

10. List of merges

11. Other news sites

KernelNewbies: Linux_4.0 (last edited 2015-05-01 16:16:11 by diegocalleja)