Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp761153ybt; Fri, 19 Jun 2020 13:04:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydiRQv0g8n0hfJwy/SMDW11tDrS+5xzilZhyY7G1KRdSznBpujt7cCJphi458sr3UdTd7F X-Received: by 2002:a17:906:2e55:: with SMTP id r21mr5025587eji.338.1592597090313; Fri, 19 Jun 2020 13:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592597090; cv=none; d=google.com; s=arc-20160816; b=DpLmFEmQzdkyiRkD2la69IaVqMzO7pi/YaObjTsQAMmgL3xl84Ha//e1KdN3n0g9S4 qwYjJeB68Kjz8LyDUrAYC5lHT+PBWU+9I7KDUeKJqQGu7kP923oEAYjkp5CzMCJxHS+E qIdUcmKD6tEb3leKxdDgWZ8XdBSROA8cqoqX+jR67K/vx/i8pcQfmujDMc9LO/G+L6YV a4KAihBEQYu8qlUYkSwPA0aITNBEjyrkMaXIWN9PL8ltHZyVUP7TtmvpYHuh/LxWyyDy hj5rrSkWJz1Gay0+vAO4Tr0SMSY3thgethXcSHCajBiNtB9xC9fJea/FPfo7FSbNeZHH JdUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QPDTC0yZ5PN3PjmsYPaWfzzVJKZLCM3M24QG56uuzDQ=; b=Ur+KWIpnmM8Q2pWg9TRFHf4MYK/y+JS9H6e4NLf4P97CbeKU6ieT4h0ue4jvPjHDB1 hPlFKtVcYtVcCzNG6nuFK/bwpKg/5c7rBRe1IDAzzJsmiGJe8xnUP5dhuHT89+Vqcosj eNQ4urzJGUvC+H0I/pyApL0aJPWXR4EDGxa24f4/z5Zn5l3EIIkHm52WIoeEr3i2T92y yi0kuDDyFz95VEsWn/ZaE8HSzUhlQVqckrZRoxlg2fcAHqJFsrz7tXXDoWzJLswSXUPp YMJDDYhzEO0ulObaQ2JcWDCr2KPtC6jqd2YbskHlXLTgT4DvIdr6ViGSY89wif4Q4Ceh oEEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bAzaOs84; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si4789762eds.133.2020.06.19.13.04.27; Fri, 19 Jun 2020 13:04:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bAzaOs84; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389647AbgFSOw5 (ORCPT + 99 others); Fri, 19 Jun 2020 10:52:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:46760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388738AbgFSOwi (ORCPT ); Fri, 19 Jun 2020 10:52:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 394D821556; Fri, 19 Jun 2020 14:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578358; bh=yQxQpjtkHjofVTksYCvmMXdlPiITVMnCbSS367MJYxI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bAzaOs842SGnqUrQClSyy5TdTcTsaxFk0xnipd8M+b2iivnVnNWYRVbU4cwodBff8 sYRFkTBnx6JCUr5+EwHMEMRT3DMMNNMEoZ8dArqFuRqUFDwufyaR+FWy6s0TFwhFl3 JPNEjVF9G5zwm+BOXpG/B+1o2GGqS1c9M1zezMGk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada Subject: [PATCH 4.14 182/190] kbuild: force to build vmlinux if CONFIG_MODVERSION=y Date: Fri, 19 Jun 2020 16:33:47 +0200 Message-Id: <20200619141642.949498508@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141633.446429600@linuxfoundation.org> References: <20200619141633.446429600@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit 4b50c8c4eaf06a825d1c005c0b1b4a8307087b83 upstream. This code does not work as stated in the comment. $(CONFIG_MODVERSIONS) is always empty because it is expanded before include/config/auto.conf is included. Hence, 'make modules' with CONFIG_MODVERSION=y cannot record the version CRCs. This has been broken since 2003, commit ("kbuild: Enable modules to be build using the "make dir/" syntax"). [1] [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=15c6240cdc44bbeef3c4797ec860f9765ef4f1a7 Cc: linux-stable # v2.5.71+ Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/Makefile +++ b/Makefile @@ -542,12 +542,8 @@ KBUILD_MODULES := KBUILD_BUILTIN := 1 # If we have only "make modules", don't compile built-in objects. -# When we're building modules with modversions, we need to consider -# the built-in objects during the descend as well, in order to -# make sure the checksums are up to date before we record them. - ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) + KBUILD_BUILTIN := endif # If we have "make modules", compile modules @@ -1249,6 +1245,13 @@ ifdef CONFIG_MODULES all: modules +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are up to date before we record them. +ifdef CONFIG_MODVERSIONS + KBUILD_BUILTIN := 1 +endif + # Build modules # # A module can be listed more than once in obj-m resulting in