public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Kristian Høgsberg" <krh@bitplanet.net>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Rik van Riel" <riel@redhat.com>,
	"Kristian Høgsberg" <krh@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Use structs instead of hardcoded offsets in x86 boot decompressor.
Date: Sun, 25 May 2008 00:25:27 -0400	[thread overview]
Message-ID: <20080525042527.GA12989@bitplanet.net> (raw)
In-Reply-To: <4838E5D4.4050708@zytor.com>

On Sat, May 24, 2008 at 09:06:44PM -0700, H. Peter Anvin wrote:
> Rik van Riel wrote:
>> On Fri, 23 May 2008 23:17:01 -0700
>> "H. Peter Anvin" <hpa@zytor.com> wrote:
>>
>>> Uhm... except it doesn't live at address zero, at all.
>>>
>>> It's called "zeropage" because we used to recycle it into 
>>> empty_zero_page, a long long time ago.
>>>
>>> The bootparms structure is pointed to by %esi being passed from the setup 
>>> code to the decompressor to the kernel.
>>
>> Then why does dereferencing the uninitialized
>> pointer work, both in the code before and after
>> the patch?
>>
>> What am I misssing?
>
> Heck if I know.  It definitely *shouldn't* work...

Damn, I lost a chunk of the patch.  There's supposed to be a

        rm_screen_info = &real_mode->screen_info;

after the real_mode = rmode assignment.  In the code before,
RM_SCREEN_INFO was a macro that just referenced the real_mode pointer:

	#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0))

Thanks, wil resend.
Kristian



      reply	other threads:[~2008-05-25  4:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 21:59 [PATCH 1/2] Use structs instead of hardcoded offsets in x86 boot decompressor Kristian Høgsberg
2008-05-23 21:59 ` [PATCH 2/2] Only print "Decompressing Linux" etc when 'noisy' is passed Kristian Høgsberg
2008-05-23 22:42   ` Johannes Weiner
2008-05-24  9:25   ` Mikael Pettersson
2008-05-24 18:07     ` Diego Calleja
2008-05-24  1:07 ` [PATCH 1/2] Use structs instead of hardcoded offsets in x86 boot decompressor Rik van Riel
2008-05-24  6:17   ` H. Peter Anvin
2008-05-25  4:03     ` Rik van Riel
2008-05-25  4:06       ` H. Peter Anvin
2008-05-25  4:25         ` Kristian Høgsberg [this message]

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=20080525042527.GA12989@bitplanet.net \
    --to=krh@bitplanet.net \
    --cc=hpa@zytor.com \
    --cc=krh@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.com \
    /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