public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: "Matt Fleming" <matt.fleming@intel.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Mantas Mikulėnas" <grawity@gmail.com>,
	"Anders Darander" <anders@chargestorm.se>,
	linux-efi@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: only load initrd above 4g on second try
Date: Wed, 27 Aug 2014 10:49:31 -0700	[thread overview]
Message-ID: <53FE1A2B.80204@zytor.com> (raw)
In-Reply-To: <CAE9FiQUF4THLRfzbnhK61QHpM2zyox4E8LTmyzVF7PnPdpb7jQ@mail.gmail.com>

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


  parent reply	other threads:[~2014-08-27 17:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 21:45 [PATCH] x86: only load initrd above 4g on second try Yinghai Lu
2014-08-26 21:53 ` H. Peter Anvin
2014-08-26 22:05   ` Yinghai Lu
2014-08-26 22:16     ` Mantas Mikulėnas
2014-08-26 22:58       ` Yinghai Lu
2014-08-27 17:49     ` H. Peter Anvin [this message]
2014-08-27 18:50       ` Yinghai Lu
2014-08-27 10:59 ` Matt Fleming
2014-08-27 17:13   ` Yinghai Lu
2014-08-30 11:24     ` Matt Fleming
2014-09-02  6:57       ` Anders Darander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FE1A2B.80204@zytor.com \
    --to=hpa@zytor.com \
    --cc=anders@chargestorm.se \
    --cc=grawity@gmail.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox