From: Masahiro Yamada Date: Thu, 14 Jul 2022 05:02:43 +0000 (+0900) Subject: kbuild: error out if $(INSTALL_MOD_PATH) contains % or : X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=84850dbbbe60a75b27eb0f272fdbc28cfaae689b;p=linux.git kbuild: error out if $(INSTALL_MOD_PATH) contains % or : If the directory path given to INSTALL_MOD_PATH contains % or :, the module_install fails. % is used in pattern rules, and : as the separator of dependencies. Bail out with a clearer error message. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier --- diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index 16a02e9237d36..a4c987c23750f 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst @@ -18,6 +18,9 @@ INSTALL_MOD_DIR ?= extra dst := $(MODLIB)/$(INSTALL_MOD_DIR) endif +$(foreach x, % :, $(if $(findstring $x, $(dst)), \ + $(error module installation path cannot contain '$x'))) + suffix-y := suffix-$(CONFIG_MODULE_COMPRESS_GZIP) := .gz suffix-$(CONFIG_MODULE_COMPRESS_XZ) := .xz