Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1467791

Re: [PATCH 3/6] efi/libstub: Introduce ExitBootServices helper

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/6] efi/libstub: Introduce ExitBootServices helper
Date 2016-08-22 18:50 +0200
Message-ID <s90A9-iZ-7@gated-at.bofh.it> (permalink)
References <s7YK5-1V6-1@gated-at.bofh.it> <s7YK5-1V6-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Matt Fleming <matt@codeblueprint.co.uk> wrote:

> From: Jeffrey Hugo <jhugo@codeaurora.org>
> 
> The spec allows ExitBootServices to fail with EFI_INVALID_PARAMETER if a
> race condition has occurred where the EFI has updated the memory map after
> the stub grabbed a reference to the map.  The spec defines a retry
> proceedure with specific requirements to handle this scenario.
> 
> This scenario was previously observed on x86 - commit d3768d885c6c ("x86,
> efi: retry ExitBootServices() on failure") but the current fix is not spec
> compliant and the scenario is now observed on the Qualcomm Technologies
> QDF2432 via the FDT stub which does not handle the error and thus causes
> boot failures.

It's unclear what this 'scenario' is. How does the user notice?

> Add a helper to the stub library that correctly adhears to the spec in the
> case of EFI_INVALID_PARAMETER from ExitBootServices and can be universally
> used across all stub implementations.

s/'adheres to'

> +		status = efi_call_early(exit_boot_services, handle,
> +					*map->key_ptr);

Please don't add spurious linebreaks in such a case - just keep it a bit longer 
than col80.

> +	if (status != EFI_SUCCESS)
> +		/* exit_boot_services() was called, thus cannot free*/
> +		goto fail;

Non-standard comment format and comment placement.

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[GIT PULL 0/6] EFI urgent fixes Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
  [PATCH 1/6] efi: Make for_each_efi_memory_desc_in_map() cope with running on Xen Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
  [PATCH 2/6] efi/libstub: Allocate headspace in efi_get_memory_map() Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
    Re: [PATCH 2/6] efi/libstub: Allocate headspace in  efi_get_memory_map() Ingo Molnar <mingo@kernel.org> - 2016-08-22 18:40 +0200
  [PATCH 6/6] efi/fdt: Fix handling error value in fdt_find_uefi_params Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
    Re: [PATCH 6/6] efi/fdt: Fix handling error value in  fdt_find_uefi_params Ingo Molnar <mingo@kernel.org> - 2016-08-22 18:50 +0200
  [PATCH 5/6] x86/efi: Use efi_exit_boot_services() Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
  [PATCH 4/6] efi/libstub: Use efi_exit_boot_services() in FDT Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
    Re: [PATCH 4/6] efi/libstub: Use efi_exit_boot_services() in FDT Ingo Molnar <mingo@kernel.org> - 2016-08-22 19:00 +0200
  [PATCH 3/6] efi/libstub: Introduce ExitBootServices helper Matt Fleming <matt@codeblueprint.co.uk> - 2016-08-19 22:40 +0200
    Re: [PATCH 3/6] efi/libstub: Introduce ExitBootServices helper Ingo Molnar <mingo@kernel.org> - 2016-08-22 18:50 +0200

csiph-web