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:	Wed, 27 Aug 2014 01:16:57 +0300
From:	Mantas Mikulėnas <grawity@...il.com>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Matt Fleming <matt.fleming@...el.com>,
	Ingo Molnar <mingo@...hat.com>,
	Anders Darander <anders@...rgestorm.se>,
	linux-efi@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: only load initrd above 4g on second try

On Wed, Aug 27, 2014 at 1:05 AM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Tue, Aug 26, 2014 at 2:53 PM, H. Peter Anvin <hpa@...or.com> wrote:
>> On 08/26/2014 02:45 PM, Yinghai Lu wrote:
>>> Mantas found that after commit 4bf7111f5016 ("x86/efi: Support initrd
>>> loaded above 4G"), the kernel freezes at the earliest possible moment
>>> when trying to boot via UEFI on Asus laptop.
>>>
>>> There are buggy EFI implementations: with EFI run time, kernel need
>>> to load file with 512bytes alignment when buffer is above 4G.
>>>
>>
>> This makes absolutely zero sense.  Please explain what the actual
>> problem is here.
>
> The firmware has bug and can use buffer above 4G to read files.
> and if the file size is 512 bytes alignment, then reading could go through.
>
> From Mantas:
> --
> On Wed, Aug 20, 2014 at 12:05 PM, Mantas Mikulėnas <grawity@...il.com> wrote:
>>
>> I experimented with some things (like setting chunk size to a few kB
>> to see if it hangs earlier or only at the very end; etc.), and finally
>> found out that it stops freezing if I pad the initrd file to a
>> multiple of 512 bytes :/ That is, 5684268 bytes will freeze, 5684736
>> bytes will not.
>>
>> ...In other words, seems like it cannot read chunks that aren't
>> multiples of 512 into a location above 4 GB. Or something like that..

Note that I'm mostly clueless about how EFI works (my "debugging" is
mostly just 'efi_printk()'s to see where it hangs), so take my
description with a grain of salt...

In particular, I just realized yesterday that I don't know whether
it's referring to physical or virtual addresses in the initrd load
code -- and the laptop only has 4 GB of memory, so the kernel
shouldn't be using larger physical addresses in the first place.
(Virtual ones, on the other hand, /would/ mean a weird bug like
described above.)

-- 
Mantas Mikulėnas <grawity@...il.com>
--
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