Skip to contentSkip to conversation

Patch "kbuild: forbid kernel directory to contain spaces and colons" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Sep 26, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

kbuild: forbid kernel directory to contain spaces and colons

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
kbuild-forbid-kernel-directory-to-contain-spaces-and-colons.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 51193b76bfff5027cf96ba63effae808ad67cca7 Mon Sep 17 00:00:00 2001

From: Robert Jarzmik <[email protected]>
Date: Sat, 2 Apr 2016 21:38:53 +0200
Subject: kbuild: forbid kernel directory to contain spaces and colons

From: Robert Jarzmik <[email protected]>

commit 51193b76bfff5027cf96ba63effae808ad67cca7 upstream.

When the kernel path contains a space or a colon somewhere in the path name, the modules_install target doesn't work anymore, as the path names are not enclosed in double quotes. It is also supposed that and O= build will suffer from the same weakness as modules_install.

Instead of checking and improving kbuild to resist to directories including these characters, error out early to prevent any build if the kernel's main directory contains a space.

---
 Makefile |    4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
@@ -128,6 +128,10 @@ _all:
 # Cancel implicit rules on top Makefile
 $(CURDIR)/Makefile Makefile: ;
 
+ifneq ($(words $(subst :, ,$(CURDIR))), 1)
+  $(error main directory cannot contain spaces nor colons)
+endif
+
 ifneq ($(KBUILD_OUTPUT),)
 # Invoke a second make in the output directory, passing relevant variables
 # check that the output directory actually exists

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/kbuild-forbid-kernel-directory-to-contain-spaces-and-colons.patch