lkml.org 
[lkml]   [2014]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/7] arm64/efi: do not enter virtual mode in case booting with efi=noruntime or noefi
On Thu, Aug 14, 2014 at 10:15:30AM +0100, Dave Young wrote:
> In case efi runtime disabled via noefi kernel cmdline arm64_enter_virtual_mode
> should error out.
>
> At the same time move early_memunmap(memmap.map, mapsize) to the beginning of
> the function or it will leak early mem.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
> arch/arm64/kernel/efi.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c
> index 6ed0362..309fab1 100644
> --- a/arch/arm64/kernel/efi.c
> +++ b/arch/arm64/kernel/efi.c
> @@ -392,11 +392,16 @@ static int __init arm64_enter_virtual_mode(void)
> return -1;
> }
>
> + mapsize = memmap.map_end - memmap.map;
> + if (efi_runtime_disabled()) {
> + early_memunmap(memmap.map, mapsize);

Should this early_memunmap really be conditional? With this change, we no
longer unmap it before setting up the permanent mapping below.

Will

> + pr_info("EFI runtime services will be disabled.\n");
> + return -1;
> + }
> +
> pr_info("Remapping and enabling EFI services.\n");
>
> /* replace early memmap mapping with permanent mapping */
> - mapsize = memmap.map_end - memmap.map;
> - early_memunmap(memmap.map, mapsize);
> memmap.map = (__force void *)ioremap_cache((phys_addr_t)memmap.phys_map,
> mapsize);
> memmap.map_end = memmap.map + mapsize;
> --
> 1.8.3.1
>
>


\
 
 \ /
  Last update: 2014-08-15 17:41    [W:2.179 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site