Linux Headers May Soon Be Available In-Kernel Via /proc

Written by Michael Larabel in Linux Kernel on 26 January 2019 at 06:05 AM EST. 39 Comments
LINUX KERNEL
In making it easier to manage and access the Linux kernel headers for a particular kernel build, Google engineers working on Android are proposing an in-kernel solution for mainline where a compressed archive of a given kernel's headers could be accessible via /proc.

Last week the "request for comments" were issued on the in-kernel headers solution in order to make it easier to build kernel modules, run eBPG programs, handle other tracing programs, and similar purposes where you need access to the kernel header files. Accessing kernel header files from Android and some other embedded platforms can be a challenge since they don't generally ship on the device file-system among other issues.

The IKHEADERS_PROC solution provides a module that can be loaded/unloaded on demand from where /proc/kheaders.tgz would then be exposed as a compressed archive of the running kernel's header files. This addresses the needs of the Android developers, makes it easier for others to worry less about verifying they have the current kernel's header files, and is offered up compressed in order to save storage space.

The proposal and basic patch can be found on the kernel mailing list. Not all kernel developers commenting on the patch find this to be useful, but given that Google develoeprs are involved and Torvalds' second in command Greg KH has already backed this approach, it could soon mainline potentially as soon as Linux 5.1.
Related News
About The Author
Michael Larabel

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 20,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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week