From patchwork Mon Oct 24 11:27:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp534903wru; Mon, 24 Oct 2022 09:12:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79eunVM+AAtqYQtJbtM8cVrzqJrK/nyLqXXylF1IKec3wKhGwALZ4wUEyiP4zl8afy9XBW X-Received: by 2002:a17:902:b092:b0:17b:833e:74f7 with SMTP id p18-20020a170902b09200b0017b833e74f7mr33746209plr.149.1666627921217; Mon, 24 Oct 2022 09:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627921; cv=none; d=google.com; s=arc-20160816; b=dXFRVtpmmK6a33D+9x0m2LiGq52boqNJ9GMw/HZ8k1q+vADy4Qj/To4bTYtQ6IYx4G vlEFsqDydD6WrXkj9ojlwzW9jPzG40YQTsacAAqjMVgLXLCujXnur2Cg8g8HICsD4COz wEqt8DwJwfRCf4KvBBPJRX0juYg7IB3Mx0z0497SkP5OvrlIrQl06R4pxOgOzOATIhiu 299dY75xqAcb+osh04LKm1jF6AMIiEynBxzW95i1C523dtcmjfBqrh9v0AKCMZzQgoer anCP5Vh/B79yPCWSAsy8QEKrM8DzE8NVLDzlgPnEsBYsbCv+7wU42iQpzEaHmxB/cj8T iZbQ== 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=g0kx5KQFSJx2cxZRV5cBgqYgy2f3xnBe7gG1Nlhe3lQ=; b=ZGz3frxGUfrQ0nbzlJp1i3fGmKOsKxje2F0ikL4+FG0oRB1Cb7V2/SMd6mGGerNyth hWEXQdAe7KB1vV5YXQN/ijkHLdx1kmMz/gf2ZIwW6TJ70Koc5mhaw+yJ4QndpnO/TEan TtvyKj3DKLA9k6zbHEB//vGenu3xOfSk8ia6VWdqJjnfRmSvIELcMAL/pLeMmvWwyC/t uyWq0Dd4+u/Z4eNZK5J22bGouxlrZhE2+CxvS4Fzsd69vNT1syLG8YR98IGCh4aomuwf ylIgZDhHSYDnpX1Fs8Iiek4+oeeGKBCUWqrlWOHXRTFlqqO+3ZfinNj82hZkN8MvBbqs K02Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DBMCRuHL; 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 h7-20020a170902ac8700b001868a25da0dsi8529102plr.40.2022.10.24.09.11.47; Mon, 24 Oct 2022 09:12:01 -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=DBMCRuHL; 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 S233102AbiJXQLG (ORCPT + 99 others); Mon, 24 Oct 2022 12:11:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233839AbiJXQFC (ORCPT ); Mon, 24 Oct 2022 12:05:02 -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 89AF211E472; Mon, 24 Oct 2022 07:57:51 -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 4F92CB81658; Mon, 24 Oct 2022 12:21:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A588BC433D6; Mon, 24 Oct 2022 12:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614069; bh=7drasZaXyRBxiatrZXSHUCbArSVbNrOy1uqnbBkzW9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DBMCRuHLTuNvSWVk+0onFKSQcMf/rYxtW/hvdSoj7cnDmftN0cSSvJ2uj97MRrDss R1//qsZ5+JeQQIiDhGgoWNW6EFTtalEpMi5DCyPurObgDP7Ax+Y/oZvjRzUX/5s+0n cllcHb2gvDdChsjLhdSy5+ZdYWkrxkQz0OisP9h8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 5.10 080/390] efi: libstub: drop pointless get_memory_map() call Date: Mon, 24 Oct 2022 13:27:57 +0200 Message-Id: <20221024113026.018659861@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?1747586039250156775?= X-GMAIL-MSGID: =?utf-8?q?1747586039250156775?= 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 @@ -281,14 +281,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);