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 D62D0C433F5 for ; Sun, 9 Oct 2022 21:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231194AbiJIVAX (ORCPT ); Sun, 9 Oct 2022 17:00:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231211AbiJIU7l (ORCPT ); Sun, 9 Oct 2022 16:59:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F7E03135A; Sun, 9 Oct 2022 13:55:09 -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 12D1560CA0; Sun, 9 Oct 2022 20:54:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7CC3C433C1; Sun, 9 Oct 2022 20:54:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665348856; bh=KJQPpJ32UIqN4u7A8mzjqm34rg4kJPRAbyTUOPAsbIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P2GXlHSw77/ULDQClxk5+gfwj5M/68i5VmC0QVLUojXU3nJQ0Djwd0IT2aTnbLwXe rFxpYL8eyFuRJOtul+5wAvIwfk302SO3HVVU7vq6t13flek2TyPP42ajgZkM4lX3NE /NWNRQvlqJWBwC6KoWAFUGA2Ia65KcYN/zMCWbcfcegw8u2y6JSZGuzRoqAN1quJH1 6wTAsTD/NvZTtWNa2iZKYj5pmqDCElf0NiIjJxLJBuPMH5EQgkbWKhxRW6W/Q45kEf gjMKMLlcuxFh6hp9yTlKRjuMt1LQRuW6oE1POMAvOkvYek2IH2UDE2kQ3G7+G6CNcb Vh4tDcuxB+JOg== 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.10 07/10] ARM: decompressor: Include .data.rel.ro.local Date: Sun, 9 Oct 2022 16:53:46 -0400 Message-Id: <20221009205350.1203176-7-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009205350.1203176-1-sashal@kernel.org> References: <20221009205350.1203176-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: stable@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