All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@penguinppc.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: multiboot2: remove "a.out kludge" requirement
Date: Fri, 17 Nov 2006 18:32:04 -0600	[thread overview]
Message-ID: <1163809924.20484.61.camel@basalt> (raw)
In-Reply-To: <BD404255-2CEF-453E-8E89-67E2F58A6197@gmail.com>

That is true. However I'm not sure how easily that field can be
modified. Would we need a custom tool for that? Could it be done with a
linker script? We are talking specifically about ELF here, so it might
make more sense to require a PT_NOTE segment.

I'm not sure I agree with Okuji though. If the multiboot header is
beyond the 8KB limit, it is an OS programming error, and GRUB cannot be
responsible for trying to prevent all programming errors.

On the other hand, if this is an error we could catch that would make OS
debugging easier, it might be worth it.

Right now in my loader I just have a debug message that appears if the
header is not found. An OS developer who finds her kernel no longer
boots could simply 'set debug=loader' and then boot, and the debug
message would indicate the problem (since she knows she's *supposed* to
have a multiboot header).

I think the debug message solves the debugging issue, and it doesn't
burden OSs that don't need the header.

-Hollis

On Fri, 2006-11-17 at 16:36 -0600, Andrei E. Warkentin wrote:
> No, I think Okuji mentioned that he didn't want to omit the Multiboot
> header out of the possibility of not registering the Multiboot
> header's presence if it is past the 8K mark (i.e. corrupt multiboot
> kernel).
> 
> 
> With a custom e_type you could be sure it's really a Multiboot kernel
> or not... and not ever be concerned with corrupt files with the header
> past 8K. 
> 
> Andrei Evgenievich Warkentin
> andrey.warkentin@gmail.com
> Cell: (+1) (847) 321-15-55
> 
> 
> 
> On 17.11.2006, at 16:01, Hollis Blanchard wrote:
> 
> > On Fri, 2006-11-17 at 15:27 -0600, Andrei E. Warkentin wrote:
> > > How about having a custom e_type for ELF images booted by GRUB?
> > > Something in the range between ET_LOOS and ET_HIOS (the OS
> > > specific
> > > types). This way one could avoid the Multiboot header in ELF, as
> > > the
> > > file would itself would identify self as GRUB-bootable or not. 
> > 
> > 
> > Why would we need a custom e_type? We know how to load ELF; we can
> > already omit the multiboot header.
> > 
> > 
> > Are you worried about a user accidentally running
> > "multiboot /bin/ls"?
> > I'm not... :)
> > 
> > 
> > > Also...
> > > I am not familiar with the module architecture in GRUB2 (whether
> > > mods
> > > are ET_REL or ET_DYN), but having a custom type for those would
> > > sure
> > > simplify those code paths too. 
> > 
> > 
> > How would it simplify the code?
> > 
> > 
> > (Modules are ET_REL, for the record.)
> > 
> > 
> > -Hollis
> > 
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > http://lists.gnu.org/mailman/listinfo/grub-devel
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel




  reply	other threads:[~2006-11-18  0:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-17 21:10 multiboot2: remove "a.out kludge" requirement Hollis Blanchard
2006-11-17 21:27 ` Andrei E. Warkentin
2006-11-17 22:01   ` Hollis Blanchard
2006-11-17 22:36     ` Andrei E. Warkentin
2006-11-18  0:32       ` Hollis Blanchard [this message]
2006-11-19 10:26   ` Brano Zarnovican
2006-11-19 16:55     ` Tristan Gingold
2006-11-19 19:31       ` Andrei E. Warkentin
2006-11-19 19:58         ` Tristan Gingold
2006-11-20 19:13       ` Hollis Blanchard
2006-11-20 20:24         ` Tristan Gingold
2006-11-20 19:14     ` Hollis Blanchard
2006-11-25  3:01 ` Yoshinori K. Okuji

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=1163809924.20484.61.camel@basalt \
    --to=hollis@penguinppc.org \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.