lkml.org 
[lkml]   [2014]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: Loading initrd above 4G causes freeze on boot
From
On Sat, Aug 9, 2014 at 3:45 PM, Mantas Mikulėnas <grawity@gmail.com> wrote:
> On Sat, Aug 9, 2014 at 10:23 PM, Matt Fleming <matt@console-pimps.org> wrote:
> [However... Whether it's five chunks, four (after making the initrd
> smaller), or just one (with your efi=nochunk), I noticed that it
> *always* hangs during the *last* read, and the allocated memory always
> ends at roughly the same address (0x137fffXXX). I wonder if it's
> selecting a memory location already in use, or something like that...]
>
> (The laptop is Asus K52JT, AMI firmware v206, no updates available.)

wonder if efi_file_read return with wrong chunksize.

Can you try attached patch ?

Thanks

Yinghai
---
drivers/firmware/efi/libstub/efi-stub-helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/firmware/efi/libstub/efi-stub-helper.c
===================================================================
--- linux-2.6.orig/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ linux-2.6/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -431,7 +431,8 @@ efi_status_t handle_cmdline_files(efi_sy
status = efi_file_read(files[j].handle,
&chunksize,
(void *)addr);
- if (status != EFI_SUCCESS) {
+ if (status != EFI_SUCCESS ||
+ chunksize > size || !chunksize) {
pr_efi_err(sys_table_arg, "Failed to read file\n");
goto free_file_total;
}
\
 
 \ /
  Last update: 2014-08-10 08:01    [W:0.079 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site