From patchwork Mon Oct 24 11:31:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9455 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp480129wru; Mon, 24 Oct 2022 07:20:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zqk+U5G7GVGdqrwQFz94jHsg+1rz8nVJFsalHVBhm9oCoxL6ncENG6R4fq1WSZPD7Pbe2 X-Received: by 2002:a17:907:160c:b0:78d:b6f5:9f56 with SMTP id hb12-20020a170907160c00b0078db6f59f56mr26409619ejc.325.1666621228798; Mon, 24 Oct 2022 07:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666621228; cv=none; d=google.com; s=arc-20160816; b=ViYkWf7YH5wZz7b4UNC/VjfDxjh3QR60xKVGH1Qd+UnwKMnAiOT9ZQBY4+Tf/3hwdy 8LXTOgoL+F4/3JBBr3gPpKnAwPruXfkPeO5MUrgIansipjRg3pxPZ6+7DeDvGgB91+2V J06KIWsX1FFK3EzecZTyoPpedLmXLQ7fbr4R2IobXOCQ7e7T+aFR5dNxP/BCaj1sn9KI +Cu6vT76BMscybUtV/EWrnt1cu4TMPHJCcyTMMMBPxtbx7k84OK1Cer4KAsJyPmYcb8B obTllNxvAtPrjzSjl9frRRfhS2fy3hPcjuozZ+QiJkoq0aShFk2FX0DsgjfBayChQ1Wn LKlA== 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=O8rtQZvCK3QrKkEijY70c3BNQMjq20RYlITf+boiZWE=; b=jBFL095+kIgRWPFIm07HLNmQi+47cwQfTk9PPiCe/vKnq6WBjFZ0j56cAmCk6tpBs0 F4Zf7aViirm8psnm0KDXwYAQSbYm+hM+oppmsfZ+DXtSC0rQ0IuX0oSgnj65n7tGMj85 bpeCIGTMGoX3HQtibtJyopcW6udoulyG1gpka7fT+yGeC/5g2yf9qT6oRWtXlqpK1k9v ooTWGcmB6ZfEtytdPWJi2FPgIk7xVMnBq+9afrKXIYgBJVr9pKIAlhs3ppqzSpECYCdI 1C6poRuFA0dltShktVs+lUGdYiOh+nowv17hfnbbT5+WBcSkdBUY/GaTSQjg0iuu/3If aG3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zZ9jdxTe; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s21-20020a056402015500b00458a650f3fasi24353298edu.409.2022.10.24.07.20.00; Mon, 24 Oct 2022 07:20:28 -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=zZ9jdxTe; 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 S231712AbiJXORo (ORCPT + 99 others); Mon, 24 Oct 2022 10:17:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234786AbiJXOOJ (ORCPT ); Mon, 24 Oct 2022 10:14:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C32DBCAE60; Mon, 24 Oct 2022 05:54:01 -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 5ADE46126B; Mon, 24 Oct 2022 12:29:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D5D9C433C1; Mon, 24 Oct 2022 12:29:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614541; bh=KJQPpJ32UIqN4u7A8mzjqm34rg4kJPRAbyTUOPAsbIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zZ9jdxTeDiCUHcQ9BJ9F25VWRYCfuZLLq2iOmIAwrooEMcK49e5Hy6h22xfZL452j cRmT7MSMP5VyNx6Zn13GT2gjZQoCYS8UUS0PS+1OeqvHr32uTDarky6m1D4+2M0tlV 6vOGgHr7INUaPRrKyQfhS/i8Io8F9gpI7ghwgnlo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Russell King , linux-arm-kernel@lists.infradead.org, Kees Cook , Sasha Levin Subject: [PATCH 5.10 301/390] ARM: decompressor: Include .data.rel.ro.local Date: Mon, 24 Oct 2022 13:31:38 +0200 Message-Id: <20221024113035.833900007@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747579021606180718?= X-GMAIL-MSGID: =?utf-8?q?1747579021606180718?= 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)