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]
Date:	Mon, 06 Jun 2011 17:40:18 +0200
From:	Jim Bos <jim876@...all.nl>
To:	Maarten Lankhorst <m.b.lankhorst@...il.com>
CC:	Matthew Garrett <mjg59@...f.ucam.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Greg KH <gregkh@...e.de>,
	"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: Re: 2.6.39.1 immediately reboots/resets on EFI system

On 06/06/2011 05:01 PM, Maarten Lankhorst wrote:
> Hi Matthew,
> 
> 2011/6/3 Matthew Garrett <mjg59@...f.ucam.org>:
>> On Fri, Jun 03, 2011 at 04:26:27PM +0200, Jim Bos wrote:
>>> On 06/03/2011 03:33 PM, Matthew Garrett wrote:
>>>> ? You've got 143 boot services/code regions, which is more than I'd
>>>> tested against, so I'm unsure whether we're overflowing something here.
>>>>
>>>
>>> That's seems to be the only EFI patch in 2.6.39.1 and I effectively
>>> removed by =not= applying (skipping) the parts of the 2.6.39.1 patch to
>>> above 3 files.
>>> So yes removing "x86, efi: Retain boot service code until after
>>> switching to virtual mode" indeed fixes the problem for me.
>>
>> Ok, thanks. I'll look into that. Might be best to drop it from stable
>> for the moment until I've made sure it works on machines with excessive
>> maps.
> 
> Looking at your patch in 2.6.39.1
> 
> I see:
> +               memblock_x86_reserve_range(start, start + size, "EFI Boot");
> 
> and to free it:
> +               free_bootmem_late(start, size);
> 
> Maybe this is causing the pager issue on 3.0, can you test this patch?
> 
> 
> efi: free memory with the correct call
> 
> Commit 916f676f8dc introduced a call to free_bootmem_late while it
> reserves memory with memblock_x64_reserve_range
> Fix this call to silence the swapper BUGs:
> 
> BUG: Bad page state in process swapper  pfn:00000
> 
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 0d3a4fa..d2eefaa 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -29,7 +29,6 @@
>  #include <linux/kernel.h>
>  #include <linux/init.h>
>  #include <linux/efi.h>
> -#include <linux/bootmem.h>
>  #include <linux/memblock.h>
>  #include <linux/spinlock.h>
>  #include <linux/uaccess.h>
> @@ -334,7 +333,7 @@ static void __init efi_free_boot_services(void)
>  		    md->type != EFI_BOOT_SERVICES_DATA)
>  			continue;
>  
> -		free_bootmem_late(start, size);
> +		memblock_x86_free_memory_in_range(start, start + size);
>  	}
>  }
>  
> 
> --
> ~Maarten
> 

For me that indeed gets rid of the "BUG Bad page state...", ie. all is
fine on 3.0-rc1 with this patch on top.

Tested-By: Jim Bos <jim876@...all.nl>

Jim.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ