lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221024173533.GB25198@duo.ucw.cz>
Date:   Mon, 24 Oct 2022 19:35:33 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [PATCH 5.10 080/390] efi: libstub: drop pointless
 get_memory_map() call

Hi!

> From: Ard Biesheuvel <ardb@...nel.org>
> 
> 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.

In mainline, map is not used after this point.

But in 5.10, map is passed to

        status = efi_exit_boot_services(handle, &map, &priv, exit_boot_func);

few lines below. Can someone verify this reasoning still holds?

Thanks and best regards,
								Pavel
> +++ 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);
> 

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ