Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2911724iog; Mon, 27 Jun 2022 05:36:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t0xt7IeS8B3Nq0vavfKdlsclDXQ1vnio1qmlq4GdgG3Jb7u+v5q/GyPhD76XXX78C0802m X-Received: by 2002:a05:6402:43c7:b0:435:8a92:e8d0 with SMTP id p7-20020a05640243c700b004358a92e8d0mr16549333edc.174.1656333402091; Mon, 27 Jun 2022 05:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656333402; cv=none; d=google.com; s=arc-20160816; b=JcufuXKHFQe5g3CyvR7uBydz+ErlUyvvooIxfNCfy6jUDJiSqUzoUgIqIllmS5pX6O wksJOVbJChyx6SWv2+hiS8+eFh0wIAwRnq8Fkf+Rq2WJC9f4+gcUzu/T3bM0muodd80D JE0SQ9D9t+mwQnx6p8FZVcjJq8DUwwfpZ8+xBFWqg+NnoSngMbl0RDgHTrLFuVO5Xumd ZZ7PN+qAgbWKk3pqTcod1m3wFKk+0WmNGVge8FE+/jlI3ZLzbwBG464uh81S/b99Uy5x 41KWeRnDgC0WdalHTNo5pUK4TP9R3JIvT6/wsSVEoMYBry9RPlKy0y+InWYRjc5O6ap2 5FUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tcrvVrQDrPKJUGxmiazm+dd8nzxVzEJ3d86fbBBsCpE=; b=XKuWS9Rk0Cy1jtqKu2s34J9YLsyem5OxkPiGmrjHe6MnWCG0fxjpMYlU5C87psJWRl 0h9x98bf7mCp3cZO/cCv4aBugjRqhcMbo/JKjuYLi8ObGrjCoshT2krrOuw69YzCVnfh WCzZgSYfKO8Jg7RNkJKhOyFV7rEqEdSA8uzZ5Vv3Ebx9RwNpvtsKEkKskOb00XUWd1Cw SpQ78vGuiZxRyZVodTx42+TEqzmgyFc4iDqs/DJu4p576HUyYT7iFHWnduQY9i3iDEBN yFVfaQKr1Ji3IMWoR/mZDJ0rXmLpcdxu5FViZrAAgZUYeLHlHjiALWdExyR2T0ld+AWp ISQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i9ML+l9l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn9-20020a1709070d0900b007235473b2fbsi14929047ejc.680.2022.06.27.05.36.12; Mon, 27 Jun 2022 05:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i9ML+l9l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234648AbiF0L33 (ORCPT + 99 others); Mon, 27 Jun 2022 07:29:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235373AbiF0L2t (ORCPT ); Mon, 27 Jun 2022 07:28:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADC2D65B0; Mon, 27 Jun 2022 04:27:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B78E61460; Mon, 27 Jun 2022 11:27:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7B6AC3411D; Mon, 27 Jun 2022 11:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656329251; bh=X6teW0KhDjIByImFmOErKxYMhlrwTw+PCdBRdEMHqUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i9ML+l9lopt7DhxmQ0niH0RavmkYN/EJzSTq8ijcKTaxhD4yRAyYbzEVBOiPiXKmk E71wA7PX0TSbVeVcMk7dQFih7VMlAESUU2lNUd/pc3R6I615KqtzafjgmR8XaUhwZ/ UUKYbC4XuT+Ypfxp9CgQ/lV2zsNatkoJ+M7y8Hac= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Sami Tolvanen , Nick Desaulniers Subject: [PATCH 5.10 101/102] kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt) Date: Mon, 27 Jun 2022 13:21:52 +0200 Message-Id: <20220627111936.461651583@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627111933.455024953@linuxfoundation.org> References: <20220627111933.455024953@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahiro Yamada commit 53632ba87d9f302a8d97a11ec2f4f4eec7bb75ea upstream. If CONFIG_TRIM_UNUSED_KSYMS is enabled and the kernel is built from a pristine state, the vmlinux is linked twice. Commit 3fdc7d3fe4c0 ("kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS") explains why this happens, but it did not fix the issue at all. Now I realized I had applied a wrong patch. In v1 patch [1], the autoksyms_recursive target correctly recurses to "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive". In v2 patch [2], I accidentally dropped the diff line, and it recurses to "$(MAKE) -f $(srctree)/Makefile vmlinux". Restore the code I intended in v1. [1]: https://lore.kernel.org/linux-kbuild/1521045861-22418-8-git-send-email-yamada.masahiro@socionext.com/ [2]: https://lore.kernel.org/linux-kbuild/1521166725-24157-8-git-send-email-yamada.masahiro@socionext.com/ Fixes: 3fdc7d3fe4c0 ("kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS") Signed-off-by: Masahiro Yamada Tested-by: Sami Tolvanen Reviewed-by: Nick Desaulniers Signed-off-by: Greg Kroah-Hartman --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Makefile +++ b/Makefile @@ -1156,7 +1156,7 @@ KBUILD_MODULES := 1 autoksyms_recursive: descend modules.order $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh \ - "$(MAKE) -f $(srctree)/Makefile vmlinux" + "$(MAKE) -f $(srctree)/Makefile autoksyms_recursive" endif autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h)