Most recent kernel where this bug did not occur: 2.6.18-rc7-mm1 (and 2.6.18 vanilla) Distribution: Gentoo Hardware Environment: Software Environment: Problem Description: Gentoo uses a sandbox to compile kernel-modules from source. Recent mm-kernel introduced astest in "scripts/Kbuild.include". This test write a file in the kernel tree for which the module is being compiled. This causes the "emerge" to fail because of a sandbox violation. Steps to reproduce: "emerge" any kernel-module in portage when "/usr/src/linux" is a symlink to any 2.6.18-mm tree
Created attachment 9151 [details] proposed patch to send output of astest to /dev/null instead of a file This is a patch for 2.6.18-mm1 Should work for mm2 and mm3 as well, I hope...
Could you please test the patch I just committed to -mm?
--- snippet from ${KERNELTREE}/Makefile: --- # When compiling out-of-tree modules, put MODVERDIR in the module # tree rather than in the kernel tree. The kernel tree might # even be read-only. export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions --- End snippet --- Is it in any way possible to do something like this for as$$$$.tmp files? Something like: +ASTMP = $(KBUILD_EXTMOD)/as$$$$.tmp Seems to me like this would write the files into the sources-directory of the module being compiled, which is of course inside the sandbox?
Created attachment 9168 [details] Patch to put astest$$$$.out files in module source tree when building external modules Tested with 2.6.18-mm3 and is working. I'm not sure if i've done it correctly, but I hope someone has the time to review.
Created attachment 9169 [details] Patch to put astest$$$$.out files in module source tree when building external modules Tested with 2.6.18-mm3 and is working. I'm not sure if i've done it correctly, but I hope someone has the time to review.
Comment on attachment 9169 [details] Patch to put astest$$$$.out files in module source tree when building external modules Doesn't work... very sorry
Created attachment 9170 [details] proposed patch: kbuild puts astest$$$$.out files in modules source dir when building external modules First off: I'm very sorry for the mess i've made of this bugreport! Second: I verified that this patch actualy creates the files in the proper directory by commenting out "rm -f $(ASTMP)astest$$$$.out". When building in-tree modules, files are created in ${KERNEL_DIR}/ When building external modules, files are created in ${M||SUBDIRS}/ specified in the make-commandline
On Fri, 6 Oct 2006 02:01:51 -0700 bugme-daemon@bugzilla.kernel.org wrote: > Patch to put astest$$$$.out files in module source tree when building external > modules please email it as per http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt I'd suggest the addition of a comment explaining what's going on in there.
.. time passes. Did this get resolved ?
There has been no news on this bug lately so I assume it is indeed solved. If not please open a new bug and assign it to me. I will close this bug for now.
Several changes were made in the kernel build for handling tmp files and this should be solved by that. This was all done in my kbuild absense period but I assume it is fixed - so bug is hereby closed.