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 D78AEC433FE for ; Sun, 9 Oct 2022 20:53:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230387AbiJIUxY (ORCPT ); Sun, 9 Oct 2022 16:53:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbiJIUwx (ORCPT ); Sun, 9 Oct 2022 16:52:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8FE32FFF8; Sun, 9 Oct 2022 13:52:16 -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 8E451B80DC2; Sun, 9 Oct 2022 20:52:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3A25C433D6; Sun, 9 Oct 2022 20:52:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665348733; bh=KJQPpJ32UIqN4u7A8mzjqm34rg4kJPRAbyTUOPAsbIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MK7AFfjLR3+lH5s3JsQGgAjI5GXkNs7DxsLi0dmQat9NRbgUoMm3X8d7txW5i2XR/ 7tyaTbip0nXDMIwM3fyC+94jSS6n7cyOFqh5ne05lKpmj+7pD/ulhQ1obR8svul8wY svR+Ex8zBqzMw3l4nNexvVL3GWXPCa9erdxk/wgWjp8Xkm+N92mniRBjBoCUqO1Co/ x89p7LpTfDVYufY1E95D3tOD7u66H+CiQQP9N8ZHitzkx/QkM2wtjPyltQ+o14k+tP N4PxwGUTsTG1GTGzj9euf3wPpyn3j5TJRvqrjn2zS8gJeKULWMoFNW/2TMjOZHZ4sJ vAWY6uzvUQg7g== 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 6.0 14/18] ARM: decompressor: Include .data.rel.ro.local Date: Sun, 9 Oct 2022 16:51:31 -0400 Message-Id: <20221009205136.1201774-14-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009205136.1201774-1-sashal@kernel.org> References: <20221009205136.1201774-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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DE8AC433F5 for ; Sun, 9 Oct 2022 20:53:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ga5UcxxmEtGXpt97jYN4HsISS/ZFTRTf4nLugc4255g=; b=HGhSyxvb7BTSws IjCA/wxXGQXukditQ4G4MPxYD1qzkF8pzbex9ranTT0r/0Gyl7680rgdJ87ZbyDfA4HoE3hiQ9gwG pzGRkkwi/UBgzzjzHVaaYJZcAsPvH7tu01CWj0AKkXjnVDYTld+bX1kPKs59IMsKqqtk7f2Cbu3WU /aklPDiEv75Vcybq9oJZ0dQDgkyghSBMAGgj7rCU4xtn11SqstaFmr7sulRFwW8A/Y5XCQeBnaypt wUZuxqKjRa4o3ADmF3qW3i4hzduZzqqsdT4q/ox6Z9sZmlJgNSHJ6O9wmcWlDYyd7/bZ95ckAurFm BY2eR+1hZYN+FVnZR9Eg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohdHc-00GAMt-7r; Sun, 09 Oct 2022 20:52:24 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ohdHY-00GAMT-8s for linux-arm-kernel@lists.infradead.org; Sun, 09 Oct 2022 20:52:21 +0000 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 F041160C4F; Sun, 9 Oct 2022 20:52:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3A25C433D6; Sun, 9 Oct 2022 20:52:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665348733; bh=KJQPpJ32UIqN4u7A8mzjqm34rg4kJPRAbyTUOPAsbIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MK7AFfjLR3+lH5s3JsQGgAjI5GXkNs7DxsLi0dmQat9NRbgUoMm3X8d7txW5i2XR/ 7tyaTbip0nXDMIwM3fyC+94jSS6n7cyOFqh5ne05lKpmj+7pD/ulhQ1obR8svul8wY svR+Ex8zBqzMw3l4nNexvVL3GWXPCa9erdxk/wgWjp8Xkm+N92mniRBjBoCUqO1Co/ x89p7LpTfDVYufY1E95D3tOD7u66H+CiQQP9N8ZHitzkx/QkM2wtjPyltQ+o14k+tP N4PxwGUTsTG1GTGzj9euf3wPpyn3j5TJRvqrjn2zS8gJeKULWMoFNW/2TMjOZHZ4sJ vAWY6uzvUQg7g== 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 6.0 14/18] ARM: decompressor: Include .data.rel.ro.local Date: Sun, 9 Oct 2022 16:51:31 -0400 Message-Id: <20221009205136.1201774-14-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009205136.1201774-1-sashal@kernel.org> References: <20221009205136.1201774-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221009_135220_375726_4AF6A147 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel