From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] x86: only load initrd above 4g on second try Date: Wed, 27 Aug 2014 10:49:31 -0700 Message-ID: <53FE1A2B.80204@zytor.com> References: <1409089544-24221-1-git-send-email-yinghai@kernel.org> <53FD01D0.8020203@zytor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Yinghai Lu Cc: Matt Fleming , Ingo Molnar , =?UTF-8?B?TWFudGFzIE1pa3VsxJduYXM=?= , Anders Darander , linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux Kernel Mailing List List-Id: linux-efi@vger.kernel.org On 08/26/2014 03:05 PM, Yinghai Lu wrote: > > 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. > File size, or alignment? Different things. Again, your patch description is not just incomplete, but seems to be actively misleading. This does, however, suggest at least two possible solutions: 1. We can read the initramfs into a temporary buffer and memcpy() it to the target. 2. We might be able to align the initramfs buffer to a 512-byte section and then round up the size. The 512 bytes here is probably a hardware sector, I'm not sure how this will play on 4K-hard-sectored media, although those are few and far between. -hpa