From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8D46C433FE for ; Sun, 9 Oct 2022 20:58:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230482AbiJIU6Y (ORCPT ); Sun, 9 Oct 2022 16:58:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231214AbiJIU4X (ORCPT ); Sun, 9 Oct 2022 16:56:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB9F82BB32; Sun, 9 Oct 2022 13:53:40 -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 ams.source.kernel.org (Postfix) with ESMTPS id 88093B80DC4; Sun, 9 Oct 2022 20:53:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72FCAC433C1; Sun, 9 Oct 2022 20:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665348818; bh=KJQPpJ32UIqN4u7A8mzjqm34rg4kJPRAbyTUOPAsbIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ok9ZolQSYVwGVQ3ON+WumWBiUa6nEHuQ7Cip/s089A+LYreo7gDIDhLge/B0dlxV+ By4lB5UBEhooh8EIxDk+O3KLChRWUququic48+h9PeKiDZED4oHalZ4c8ppWxMDB3J mQj/6+PeAFAeX0ITaCfuiOfJNciLSO7Yk+BM1WfqfDeYQsRz7D2ox/e/eZJOjAiBiV 2J7KzqfrPY1lL9LzSJz9wu1iU039WKqJXQ97mlDlTsMlf5kfhzdWkeK11s9sXwutfG O5tDzYqvEJLH4wsy4B6dimwNAnkUq4GIYBh3eooZsuyNx+vd0F5IMXZIzk8Ivl3jsb 4jnwPDKJNJ9IQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Kees Cook , kernel test robot , Russell King , linux-arm-kernel@lists.infradead.org, Sasha Levin Subject: [PATCH AUTOSEL 5.15 11/15] ARM: decompressor: Include .data.rel.ro.local Date: Sun, 9 Oct 2022 16:53:04 -0400 Message-Id: <20221009205308.1202627-11-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009205308.1202627-1-sashal@kernel.org> References: <20221009205308.1202627-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kees Cook [ Upstream commit 1b64daf413acd86c2c13f5443f6b4ef3690c8061 ] The .data.rel.ro.local section has the same semantics as .data.rel.ro here, so include it in the .rodata section of the decompressor. Additionally since the .printk_index section isn't usable outside of the core kernel, discard it in the decompressor. Avoids these warnings: arm-linux-gnueabi-ld: warning: orphan section `.data.rel.ro.local' from `arch/arm/boot/compressed/fdt_rw.o' being placed in section `.data.rel.ro.local' arm-linux-gnueabi-ld: warning: orphan section `.printk_index' from `arch/arm/boot/compressed/fdt_rw.o' being placed in section `.printk_index' Reported-by: kernel test robot Link: https://lore.kernel.org/linux-mm/202209080545.qMIVj7YM-lkp@intel.com Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kees Cook Signed-off-by: Sasha Levin --- arch/arm/boot/compressed/vmlinux.lds.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/compressed/vmlinux.lds.S b/arch/arm/boot/compressed/vmlinux.lds.S index 1bcb68ac4b01..3fcb3e62dc56 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.S +++ b/arch/arm/boot/compressed/vmlinux.lds.S @@ -23,6 +23,7 @@ SECTIONS *(.ARM.extab*) *(.note.*) *(.rel.*) + *(.printk_index) /* * Discard any r/w data - this produces a link error if we have any, * which is required for PIC decompression. Local data generates @@ -57,6 +58,7 @@ SECTIONS *(.rodata) *(.rodata.*) *(.data.rel.ro) + *(.data.rel.ro.*) } .piggydata : { *(.piggydata) -- 2.35.1