From patchwork Mon Oct 24 11:32:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9017 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp441298wru; Mon, 24 Oct 2022 06:05:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7azqrvlJB/Ca0GOXctQ6mFFBdzMDNs/Krts23/NzlAETvWKDL722AecNYSNVOTX4NHLQm3 X-Received: by 2002:a17:902:b20a:b0:178:6f5b:f903 with SMTP id t10-20020a170902b20a00b001786f5bf903mr34378074plr.39.1666616742791; Mon, 24 Oct 2022 06:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666616742; cv=none; d=google.com; s=arc-20160816; b=XavqmQoHq4QXEs/5+OmZDzQ75i/wPSW6DCN4nArCcNGxQpozS9hczud41or8i9pPQl 1b1AjOj7visaLkh3//RGSaevaECR4Zj1ezUtVRPrpzxE+x9oZ37upeXMNfDTvx9+b/Oh vgYpXvxLsEPh64tf+ffk8MEX9ozcixS5Yu8mrhf7+wUnF9bZNT9XjNYj3CDcbIkFqO7d NB/nnvns+3clxJ5uUr5P92orJvqCC9PnQ6yMGGFPZTFpgOuH6O3tqBBtt1IUh1/7OCIG 4Sn18f2leJoeCJ7tdzCBgMXd6t/7A3L2H23zvb7z7Ty0DBaQooi3ir2wNXBiUwn8Uci6 jRHg== 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=KoyxwZn6X1wThRDckOywlX+i4OhYO5cRjgxTSSOJf00=; b=NT9GgY8Mw7BBpdW4GXovxDm6yH4frieFWoGmSR2GPzXRd0b/AF+hXE3AQy8EePm59l 3hlzQsG1Wo+vZVeFqfGn00ha5Tg0M54d/NjrNu+PYzn4kpJh25tS1NDIckOxOQtLKuH+ mcffhQOjTm6pcRB/nwUaU2eT5TgvV3S3W+nHyHhWXiVzL1dnERT+B5FAPzmW73DvFJbd wuCV+mJYrE+LwQcCsQiCbDs/Fk0PKctVOBaY4ZzilaE9V3qg9tdUZUbT5oYwQNwZfziR chX5TIA6fuVj/eNuItK/zd7zk0PTl+gtPiJWsGa5VDDRwb7MosEuxKAfxG7PKiqGGX/P YZcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZtMMnkrj; 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 h13-20020a65480d000000b0041c506dde92si32947884pgs.636.2022.10.24.06.04.54; Mon, 24 Oct 2022 06:05:42 -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=ZtMMnkrj; 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 S235010AbiJXNDm (ORCPT + 99 others); Mon, 24 Oct 2022 09:03:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235314AbiJXM7z (ORCPT ); Mon, 24 Oct 2022 08:59:55 -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 C364D265E; Mon, 24 Oct 2022 05:19:28 -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 59A61612B4; Mon, 24 Oct 2022 12:04:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BD28C433C1; Mon, 24 Oct 2022 12:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613066; bh=/GUBL19Jp9NmcH/HaL4btiEfO1T1Pkk6YALZLRd1jc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZtMMnkrjEkT1zqFX5r9JbiBAK4BhirHQcChf5oEoy/rmBF1ylxp7P/DJYOAKzVa9d Jz8hKvpTaosuRxxWYfK92H8qIt2C6MUl5UYbbMUXq3aVkbzM4/9Huo2RtWQe3N6P7X 5SZPYfkonYsghqAxozTPSuoQzHa1kYit1KDfHpnQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 4.19 226/229] efi: libstub: drop pointless get_memory_map() call Date: Mon, 24 Oct 2022 13:32:25 +0200 Message-Id: <20221024113006.590063404@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747574317547425574?= X-GMAIL-MSGID: =?utf-8?q?1747574317547425574?= 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 @@ -301,14 +301,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(sys_table, &map); - if (status != EFI_SUCCESS) - goto fail_free_new_fdt; - status = update_fdt(sys_table, (void *)fdt_addr, fdt_size, (void *)*new_fdt_addr, MAX_FDT_SIZE, cmdline_ptr, initrd_addr, initrd_size);