On Sat, Oct 03, 2009 at 04:40:41PM -0500, Nathan Lynch wrote: > On Sat, 2009-10-03 at 00:20 -0700, Matt Helsley wrote: > > Sanitize kernel headers for userspace by extracting non-__KERNEL__ > > portions of the various checkpoint headers and placing them in a > > similar organization of userspace headers. > > > > The script is run from the top level of the user-cr source tree like: > > > > ./scripts/extract-headers.sh -s <path-to-kern-source> -o ./include > > > > The patch includes a copy of the auto-generated headers and adjusts > > the user-cr programs to use them. > > I appreciate the effort put into this, but why isn't the > "headers_install" target of the kernel Makefile sufficient to produce > headers that are usable by userspace? So far as I know, other projects > with complex kernel/user interfaces (e.g. kvm) haven't had to resort to > special-purpose programs like this. This script trims down the kernel headers from 4MB to 62k and places them in the user-cr source tree. That means it's reasonable to just copy user-cr anywhere and rebuild -- no need to copy your kernel headers seperately and then fuss with KERNELSRC etc. At one point this patch also moved all arch-detection out of the Makefile and left it to cpp. That's no longer true now that we have the bits necessary for clone_with_pids. A seperate patch could finish that though. Removing arch-detection in the Makefile might make cross-compiling easier. That said, it's not meant to replace /usr/include headers. When the syscall numbers make it into /usr/include, for instance, the part of this script that gathers them will be obsolete. Lastly, it may be useful for anyone who wants to compare c/r headers to build checkpoint image translation tools. It should be alot easier to see the relevant changes... So it's useful for me. Perhaps I should make it optional and toss it into contrib/ instead. Cheers, -Matt Helsley _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers