From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DA74C352A5 for ; Mon, 10 Feb 2020 16:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1D7D20838 for ; Mon, 10 Feb 2020 16:03:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581350580; bh=/KC+vTeLrkRYzD0b3w6OUkEw760BQRu7pNW9oIQZ9+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a8p9v9v1Ujz8w1e9bBz5uAAliGDiU1QxjWQN0xyogpJ4a4Eto8bx1e0GS521ColyV TrdU/q3ez/TFlrAyFSLfKaqtiZeHXB8vWin5cosiE1H4lsz03wA3ri9vkukozb2lum G72C2ormALEUmCmG/0KdZHtP13aCPmey9dE+/5UA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727771AbgBJQDA (ORCPT ); Mon, 10 Feb 2020 11:03:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:52556 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727435AbgBJQDA (ORCPT ); Mon, 10 Feb 2020 11:03:00 -0500 Received: from e123331-lin.home (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B6B5A2085B; Mon, 10 Feb 2020 16:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581350580; bh=/KC+vTeLrkRYzD0b3w6OUkEw760BQRu7pNW9oIQZ9+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o8B9oQYHIj5Vf5ECSZ2SCjvsmbmJMr/+pdhSkTf8Flcy73MpDV1JDJIvOsPkhPx4p w7s6DxqS2yGgjHICu55V/cyHK7m8enO5lMbDw6Y5jnihrv2wwuaowvPYKC1rLtpYZJ dnX4Akn0n+gpHtWD/jE+iqhuEf5cr8vOLoLrfe78= From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: Ard Biesheuvel , nivedita@alum.mit.edu, mingo@kernel.org, lukas@wunner.de, atish.patra@wdc.com Subject: [PATCH 01/19] efi/libstub/x86: Remove pointless zeroing of apm_bios_info Date: Mon, 10 Feb 2020 17:02:30 +0100 Message-Id: <20200210160248.4889-2-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200210160248.4889-1-ardb@kernel.org> References: <20200210160248.4889-1-ardb@kernel.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org We have some code in the EFI stub entry point that takes the address of the apm_bios_info struct in the newly allocated and zeroed out boot_params structure, only to zero it out again. This is pointless so remove it. Signed-off-by: Ard Biesheuvel --- arch/x86/boot/compressed/eboot.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 32423e83ba8f..4745a1ee7953 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -358,7 +358,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg) { struct boot_params *boot_params; - struct apm_bios_info *bi; struct setup_header *hdr; efi_loaded_image_t *image; efi_guid_t proto = LOADED_IMAGE_PROTOCOL_GUID; @@ -389,7 +388,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, memset(boot_params, 0x0, 0x4000); hdr = &boot_params->hdr; - bi = &boot_params->apm_bios_info; /* Copy the second sector to boot_params */ memcpy(&hdr->jump, image->image_base + 512, 512); @@ -416,9 +414,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, hdr->ramdisk_image = 0; hdr->ramdisk_size = 0; - /* Clear APM BIOS info */ - memset(bi, 0, sizeof(*bi)); - status = efi_parse_options(cmdline_ptr); if (status != EFI_SUCCESS) goto fail2; -- 2.17.1