mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>, Andi Kleen <ak@suse.de>,
	Chris Wright <chrisw@sous-sol.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Zachary Amsden <zach@vmware.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 1/3] Replace paravirt_probe with "platform type" boot header field
Date: Fri, 04 May 2007 13:10:08 -0600	[thread overview]
Message-ID: <m1d51gpfqn.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <463B81BC.1030504@zytor.com> (H. Peter Anvin's message of "Fri, 04 May 2007 11:55:56 -0700")

"H. Peter Anvin" <hpa@zytor.com> writes:

> Eric W. Biederman wrote:
>> 
>> You should be able to just include linux/screen_info.h instead of duplicating
>> it inline.
>> 
>
> I'm working on it!!!!!

Sure. I meant that linux/screen_info.h should already be safe.

>> I like the use of struct header in the middle of boot_params that
>> seems like a nice maintenance device, although I'm not quite certain about
>> 
>> However you haven't documented the old swap_dev field in struct header.
>> At least rdev still knows about it, so it is probably inappropriate to
>> merge it with syssize.  Not that syssize is actually useful for anything
>> in a modern system.
>
> Actually, ROM bootloaders care about it, which is why it was expanded
> out in boot loader protocol 2.04; see the documentation.

Interesting. I missed that one.

>> So I just looked at what /sbin/kexec does so we know what to expect.
>> If I have a bzImage I just grab the first setup_sects (i.e. setup.S) and make
>> it the initial linux boot parameters, placing the command line immediately
>> afterwards.
>> 
>> If I just have a vmlinux so I have to fake it I memset
> x86_linux_faked_param_header
>> to zero, before placing in the values I care about.  And the size.  4K aka 1
> page.
>> Although I due put the command line at 2K, I think that is actually the
> historical
>> kernel usage of the zero page.
>
> Oh flippin' hell.  *STABBITY STAB STAB STAB*.

Yep, a real pain.

At this point it looks like a bug in kexec to me, and the bzImage loader
which is the primary way to boot linux doesn't have this problem.  Yea.

> All of which is just evil.  So much for "oh, the definition of the
> zeropage never changes, so it doesn't matter."

>> elilo does something similar but starts with a 16K pages and then backs up
>> 2K for the command line.
>> 
>> Gujin does something similar but also seems to place a command line at 2K.
>> 
>> So short of the first 2K we can reasonably expect new parameters to be zero
>> initialized.  Past that we need to be a little more careful.
>
> Oh flippin' hell.

And now you understand why I am surveying these things and want to get
the 32bit entry point well documented.  So the situation doesn't get worse.

Frankly while I consider what we are doing pretty sane I have always considered
the 32bit entry point at least partly experimental.  But we have enough users
of it now and enough reasons to have users of it, that it looks like we need to
do things a little more methodically.

>> And 4K seems to be our maximum size for backwards compatibility.  Although
>> we use it in a fairly sparse way, so we should be ok.
>
> Sort of.  It's pretty full.

True.  For small little extensions we have room.  For big things probably
not.

Eric

  reply	other threads:[~2007-05-04 19:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-04 12:59 Rusty Russell
2007-05-04 13:02 ` [RFC PATCH 2/3] lguest: Boot with virtual == physical to get closer to native Linux Rusty Russell
2007-05-04 13:07   ` [RFC PATCH 3/3] boot bzImages under paravirt Rusty Russell
2007-05-04 14:38     ` Eric W. Biederman
2007-05-04 14:55       ` Rusty Russell
2007-05-04 15:49         ` H. Peter Anvin
2007-05-04 15:15       ` Jeremy Fitzhardinge
2007-05-04 15:45         ` H. Peter Anvin
2007-05-04 16:13           ` Jeremy Fitzhardinge
2007-05-04 16:43             ` H. Peter Anvin
2007-05-04 16:57             ` Eric W. Biederman
2007-05-04 17:07               ` H. Peter Anvin
2007-05-04 17:30                 ` Eric W. Biederman
2007-05-04 18:22                   ` Jeremy Fitzhardinge
2007-05-04 18:48                     ` Eric W. Biederman
2007-05-04 18:55                       ` Jeremy Fitzhardinge
2007-05-04 19:21                         ` Eric W. Biederman
2007-05-04 16:46         ` Eric W. Biederman
2007-05-04 17:25           ` Jeremy Fitzhardinge
2007-05-04 17:27             ` H. Peter Anvin
2007-05-04 17:36             ` Eric W. Biederman
2007-05-04 17:44               ` H. Peter Anvin
2007-05-04 18:25               ` Jeremy Fitzhardinge
2007-05-04 14:01 ` [RFC PATCH 1/3] Replace paravirt_probe with "platform type" boot header field Eric W. Biederman
2007-05-04 14:18   ` Rusty Russell
2007-05-04 14:23     ` Eric W. Biederman
2007-05-04 15:52       ` H. Peter Anvin
2007-05-04 16:48         ` Eric W. Biederman
2007-05-04 17:13           ` H. Peter Anvin
2007-05-04 18:30             ` Eric W. Biederman
2007-05-04 18:55               ` H. Peter Anvin
2007-05-04 19:10                 ` Eric W. Biederman [this message]
2007-05-04 19:14                   ` H. Peter Anvin
2007-05-04 19:31                     ` Eric W. Biederman
2007-05-04 19:19                   ` H. Peter Anvin
2007-05-04 15:10     ` Eric W. Biederman
2007-05-04 15:53     ` H. Peter Anvin

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=m1d51gpfqn.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.org \
    --cc=zach@vmware.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

Powered by JetHome