From patchwork Mon Oct 24 11:32:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 10195 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp641968wru; Mon, 24 Oct 2022 13:37:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7oUyUvtqew0cgEbBp+9Ftx5Caes37NOZ1T07f861+InFQEvhPahQ/8W88OviH7ESaOS0Pj X-Received: by 2002:a63:5b05:0:b0:460:a6a:ec38 with SMTP id p5-20020a635b05000000b004600a6aec38mr29027240pgb.485.1666643820173; Mon, 24 Oct 2022 13:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666643820; cv=none; d=google.com; s=arc-20160816; b=aq11F7HoWi4M6uWYKF6h3Nv0ssQ6hfZr05XuoF7ZHVhpeJ5AMHdzMS9L1mVjmBot41 n4xriAZqvRG38ceE4WKyjLsFCDejOWhStVtC9NJe4P+JgWjZkyvqsltVm8FntVlKHX+P RN/b44jMo3O3smT88d+fyE2cUlYI/WN5OjPiTfQz2oFQEv/v+EvmjFBBpfSXBrJKJHw3 ZBiLKuECcjz3DPvxZQ4PeG2xdm1aGQ91ifR7nqjhV89oVLJzMGW/J1Anwu06hDhjWVRj 9QXYLP4VhjA95ay//kGLaTRCEdCRkF+hNG67pvViZro2Cpoun8LviCmPV3L8tn3fZz8K Kdtg== 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=Z2qCFqdfKp9muGIyXck3g8CrcBSpCScg9fQNX+FemV+r3CSAJAGijhQvx/HSVA3ZXG WPprBI9LM7vveV0J0nX8uoc14prAowraUayc5iva/6uTeS0R/sCP8mbaHUdiWk8rDV5w bzwX/xn80+v0LzEWEdHcIxny7vheaoUabKZQswCmGaN0oSq3QxGs/MRBeIrBcWBQlMrJ jusmmqEf0I/kQTYIaEYvvpIWJVU28RGz3I+aklVjgt6oqgMU/xaBD62kGtPrpTsobxn2 osde5Unjy7geEe/ClR8lumChXYHpx05d+d5MFoNXv++5pU3K6kCkh1HRboe96A3A2Bps qAvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hvUisClK; 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 p3-20020a056a000b4300b00542deddc4e0si850762pfo.46.2022.10.24.13.36.46; Mon, 24 Oct 2022 13:37:00 -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=hvUisClK; 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 S231468AbiJXU3t (ORCPT + 99 others); Mon, 24 Oct 2022 16:29:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234379AbiJXU3C (ORCPT ); Mon, 24 Oct 2022 16:29:02 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D0710F8AF; Mon, 24 Oct 2022 11:41:33 -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 sin.source.kernel.org (Postfix) with ESMTPS id 1A528CE16DE; Mon, 24 Oct 2022 12:50:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A430C433D6; Mon, 24 Oct 2022 12:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666615856; bh=KJQPpJ32UIqN4u7A8mzjqm34rg4kJPRAbyTUOPAsbIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hvUisClKraLRx0/yysAjMTJ52+ZjjdkS9QaL1/q7pZz0GSR/89LL28asOdgnsl6B3 KMCepmu4dAQafTZbXqNPKjuy2TjQz0fPA33BR99l129+LOFt7vru0n/v2wN6TlTco8 Mi5GPPIMBsCTht3xfqkpt+jo5SePQRloc4mOuYFI= 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.15 410/530] ARM: decompressor: Include .data.rel.ro.local Date: Mon, 24 Oct 2022 13:32:34 +0200 Message-Id: <20221024113103.643088356@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113044.976326639@linuxfoundation.org> References: <20221024113044.976326639@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?1747602710600438641?= X-GMAIL-MSGID: =?utf-8?q?1747602710600438641?= 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)