From patchwork Mon Dec 28 12:49:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 352722 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp9834307jai; Mon, 28 Dec 2020 07:34:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrzd2vPcn5nmtphHASSndXAHFhhyo6Ko4/d6QwY1+aSykBC0okoGG2hfjqQ4XeWKgumoN2 X-Received: by 2002:a17:907:94c6:: with SMTP id dn6mr42171291ejc.13.1609169657612; Mon, 28 Dec 2020 07:34:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609169657; cv=none; d=google.com; s=arc-20160816; b=u6ekr32gtte+tza6YMvbsoHlMw/QtSOUbahllRwTlu5IC4G+v04GcJ3xyiLAoIWmL5 MZOV8eCNbANnzuGCUCdkP+bUmp72wvvb3e3x6KYzeu6IFvWqkhNR4auLh4gOxVmG65Xr W4OBeMYk4XND1ZF//a/xLOMbnonlCTXuaUEmDw5llpaH6On2/xCXgtZoSNBECHq6ooim 7OquVZJD1DY1tU4tkloGlHpxq8zKpjU55ai8ob1v0GazaM3vZl9gSbxyt0RJqcAeTJ/c JmYPucpEiPFFhM/Z53Biie4NuSSG8HkGhMihvfFm5MWZTjRsmCIVKhp9AR9lqLvZQKDt l+2w== 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=vxS8O3NRed93bm4Zdbwt5skpBJIuMlHrg7nMemtyeJU=; b=X60LnTCKZVVVN8VrIyNKI7+P1MIB1iJ/mORNbYz7cInOoLhWzwNF6JfEQIq8nY3vtx oVDkoFMA+b6KUQVweEQQm6KcFa0C7EFjhWkiKo1gRZx1O5gWM99s5HbvC5uA4KMVoVqF aeV3zYmmZPpd4fTDaxITBLa3mB0mQsfBWIfGWnJuu+h/f2ruTYA7Ym41+mlCV7khB8pI HhyqrHp4llaNya7oe9iIoxhrN4TK5U2uh+xc1y0ElPXODnUguhifczlBJZ4DLitsyVaA kcEtLRvdehrEURUiK+vDhnj3vjJQlGG4jIkagpafqZVSaOcVlJS2t7LXR3g1LqXs0KP1 z5IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mNSuFCsY; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm5si19790868edb.21.2020.12.28.07.34.17; Mon, 28 Dec 2020 07:34:17 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=mNSuFCsY; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S2407091AbgL1PeA (ORCPT + 14 others); Mon, 28 Dec 2020 10:34:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:54688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391542AbgL1Nwt (ORCPT ); Mon, 28 Dec 2020 08:52:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id C19D3208B3; Mon, 28 Dec 2020 13:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609163529; bh=jUQzN0sNy2IEQHh9giQ+uMRFIT9nlCAy8quVANockp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mNSuFCsY2WRNuFBwznsFoo/rbyVL0n2X1LxJsgVwOX73x4PYad7N6cvjRPJEWnyNs +UnzUq1R35DZsxIwulzjW9EH9LSXxlSN5SE+fXtAFcKrIcsxZf1+CHyoCNdQt5CIhb D0VQ931M60RBCewMHjaHNZUaVzxk/GFQBjc+aQFk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Barret Rhoden , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.4 318/453] initramfs: fix clang build failure Date: Mon, 28 Dec 2020 13:49:14 +0100 Message-Id: <20201228124952.512063851@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124937.240114599@linuxfoundation.org> References: <20201228124937.240114599@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit 55d5b7dd6451b58489ce384282ca5a4a289eb8d5 ] There is only one function in init/initramfs.c that is in the .text section, and it is marked __weak. When building with clang-12 and the integrated assembler, this leads to a bug with recordmcount: ./scripts/recordmcount "init/initramfs.o" Cannot find symbol for section 2: .text. init/initramfs.o: failed I'm not quite sure what exactly goes wrong, but I notice that this function is only ever called from an __init function, and normally inlined. Marking it __init as well is clearly correct and it leads to recordmcount no longer complaining. Link: https://lkml.kernel.org/r/20201204165742.3815221-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Barret Rhoden Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- init/initramfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.27.0 diff --git a/init/initramfs.c b/init/initramfs.c index 5feee4f616d55..00a32799a38b0 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -527,7 +527,7 @@ extern unsigned long __initramfs_size; #include #include -void __weak free_initrd_mem(unsigned long start, unsigned long end) +void __weak __init free_initrd_mem(unsigned long start, unsigned long end) { free_reserved_area((void *)start, (void *)end, POISON_FREE_INITMEM, "initrd");