grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: booting kernel of NetBSD (Re: UFS (FFS) support seems broken in grub


From: Bean
Subject: Re: booting kernel of NetBSD (Re: UFS (FFS) support seems broken in grub2)
Date: Thu, 7 Feb 2008 00:03:52 +0800

On Feb 6, 2008 11:32 PM, Robert Millan <address@hidden> wrote:
> On Sat, Jan 26, 2008 at 11:01:49PM +0800, Bean wrote:
> >
> >       * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
> >       address of entry.
> >       (grub_multiboot_load_elf64): Likewise.
> >       (grub_multiboot): Initialize mbi structure.
> >
> >
> > diff --git a/loader/i386/pc/multiboot.c b/loader/i386/pc/multiboot.c
> > index fa6346e..2fd2b24 100644
> > --- a/loader/i386/pc/multiboot.c
> > +++ b/loader/i386/pc/multiboot.c
> > @@ -96,6 +96,7 @@ grub_multiboot_load_elf32 (grub_file_t file, void *buffer)
> >  {
> >    Elf32_Ehdr *ehdr = (Elf32_Ehdr *) buffer;
> >    Elf32_Phdr *phdr;
> > +  grub_addr_t real_entry = 0;
>
> I would suggest a more explicit name, like physical_entry_addr or so.  That'd
> make it easier to understand without the context of your mail and changelog
> entry.
>
> > +  grub_memset (mbi, 0, sizeof (struct grub_multiboot_info));
>
> I wonder if it'd make sense to do this in grub_malloc().  This would save us
> from similar bugs in the future (and have the advantage that memory handling
> bugs would be exposed earlier).  What do you think, is this idea too crazy? 
> :-)
>
> (I would still add grub_memset here for now, though; makes no sense to delay
> it)

thanks for your advise, fix and committed.

-- 
Bean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]