LLVM Begins Looking At PKU Memory Protection Keys Support
Written by Michael Larabel in LLVM on 18 December 2015 at 07:29 AM EST. 1 Comment
LLVM --
This week mainline LLVM received support for the PKU feature flag as prep work towards supporting the new RDPKRU and WRPKRU instructions for Intel's forthcoming memory protection keys capabilities.

Memory Protection Keys (PKU/PKEYs) are a feature of future Intel CPUs, presumably for Kabylake or Cannonlake. As described by the original patch set for supporting memory protection keys on the kernel-side, "Memory Protection Keys provides a mechanism for enforcing page-based protections, but without requiring modification of the page tables when an application changes protection domains. It works by dedicating 4 previously ignored bits in each page table entry to a 'protection key', giving 16 possible keys...There are two new instructions (RDPKRU/WRPKRU) for reading and writing to the new register. The feature is only available in 64-bit mode, even though there is theoretically space in the PAE PTEs. These permissions are enforced on data access only and have no effect on instruction fetches."

On the kernel side, the big set of memory protection keys work is up to its fifth patch revision and won't be mainlined until at least Linux 4.5 but could still take possibly longer.

With the Linux kernel work continuing, given by this commit it looks like Intel engineers are in the process of beginning work on compiler support for PKU and the other needed user-space changes for this hardware feature of future Intel CPUs.

About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related LLVM News
Popular News This Week