From patchwork Sat Oct 22 07:20: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: 7202 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1090040wrr; Sat, 22 Oct 2022 00:45:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60ExowFjDHxe5lJt57aaZsbgUIhpe1hizBqr0mPj6T32m2Ugip8ILRSZ0kUdchY506vMmm X-Received: by 2002:a63:5a63:0:b0:42f:e143:80d4 with SMTP id k35-20020a635a63000000b0042fe14380d4mr19828772pgm.456.1666424728999; Sat, 22 Oct 2022 00:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424728; cv=none; d=google.com; s=arc-20160816; b=TWAiiQAv1jtevXkly1L6QQVAAFIJD5yC0OvDhGWiE8g2Y5VxlybhPoTcSbFqtugPcH HLms3Tpka2DL3ZfxZEPxskZMwnvDTxvmtfpeccpQTXSfcTuP/toNnTyVezW6mU/ZLVJl y0e1FTFKTgH+4jBA+DVp66WXKvUngZXFCGeJaXl0dhEpTUh/Ph8tetaGQa3CLVraNj2F BT3kbMNmfea7cT1MuEUCZMliTsCDF8ivDI2rXBD3D41X0Fjj1j1+2ApwC1ViBbDXsuT7 8iFrCxr1a/J+tjcmEodhBKDK+sUDQBjnrE21MEGUjobBqH/O++bqcBSNvG5qWsRkdWz5 prxQ== 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=s2gKcQ/IDsP1dabzlcd7EszbvivbP0MKCvj4h22jt40=; b=Piq7fuOKTxlgEJU8xN3Dt8qblAaj84X8TYDwZFdbmyxyO5fTwbxF89/JurmB11Jqur 1IVJEV37P1lbLNwqc/7mXkcsSNxCYZQfJlIRjHmcBzScYODX7SU5PGXrAb8dgXJIVyw+ c93rvNswOPs48H/LASf9SZcV4Ad+fn8zel0mIlBxtaU7nMxfa2/EiPqyGXXC4I6k+y3O wH/erobo6HkR4wBfouWGxQJnZcPpqsVeVsTeOdH9t3Ai3hxOQrMCiaMqA/roFwMOH1hi BaWFEIOpS+Sp4hG/e3BJwRm9jNQPXYIew+cD233ylzgDETM7XugtKHRoyT2Y6PXQfbg6 0NdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dbwJOVkW; 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 bm10-20020a656e8a000000b0046afc3948c4si29970640pgb.707.2022.10.22.00.45.15; Sat, 22 Oct 2022 00:45: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=dbwJOVkW; 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 S231345AbiJVHnp (ORCPT + 99 others); Sat, 22 Oct 2022 03:43:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230476AbiJVHnL (ORCPT ); Sat, 22 Oct 2022 03:43:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C993D1B94F6; Sat, 22 Oct 2022 00:42: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 ams.source.kernel.org (Postfix) with ESMTPS id F1FBCB82E0B; Sat, 22 Oct 2022 07:41:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A24CC4347C; Sat, 22 Oct 2022 07:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424463; bh=nFCeWBlb71nzHFatGST1sfWN1nDJByc2HnNY5OXQHfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dbwJOVkWdpkoC/SJvgTDsXwIll5nz4FMenygmLIYawln52KnI9pCDd0WD31MNk+Vg RrtCMQYWVDrgJsdB5fh6GICqWdEO61BpYHpYVcxeBbPTmGa8/c7JKmRLchtysKtcez 7G+z+qJG88hGVRzS2bauSmELsRwDbj3hV023TYX4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 5.19 155/717] efi: libstub: drop pointless get_memory_map() call Date: Sat, 22 Oct 2022 09:20:34 +0200 Message-Id: <20221022072442.871548970@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 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?1747372976434996608?= X-GMAIL-MSGID: =?utf-8?q?1747372976434996608?= From: Ard Biesheuvel commit d80ca810f096ff66f451e7a3ed2f0cd9ef1ff519 upstream. Currently, the non-x86 stub code calls get_memory_map() redundantly, given that the data it returns is never used anywhere. So drop the call. Cc: # v4.14+ Fixes: 24d7c494ce46 ("efi/arm-stub: Round up FDT allocation to mapping size") Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/libstub/fdt.c | 8 -------- 1 file changed, 8 deletions(-) --- a/drivers/firmware/efi/libstub/fdt.c +++ b/drivers/firmware/efi/libstub/fdt.c @@ -280,14 +280,6 @@ efi_status_t allocate_new_fdt_and_exit_b goto fail; } - /* - * Now that we have done our final memory allocation (and free) - * we can get the memory map key needed for exit_boot_services(). - */ - status = efi_get_memory_map(&map); - if (status != EFI_SUCCESS) - goto fail_free_new_fdt; - status = update_fdt((void *)fdt_addr, fdt_size, (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr, initrd_addr, initrd_size);