BUG: 9.0 stage 2 boot (/boot/boot)
John Baldwin
jhb at freebsd.org
Mon Mar 5 19:25:50 UTC 2012
On Monday, March 05, 2012 1:18:03 pm rank1seeker at gmail.com wrote:
> ----- Original Message -----
> From: John Baldwin <jhb at freebsd.org>
> To: rank1seeker at gmail.com
> Cc: hackers at freebsd.org, "Roman Divacky" <rdivacky at freebsd.org>, "Andriy Gapon" <avg at freebsd.org>
> Date: Mon, 5 Mar 2012 12:44:44 -0500
> Subject: Re: BUG: 9.0 stage 2 boot (/boot/boot)
>
> > On Saturday, March 03, 2012 3:59:19 am rank1seeker at gmail.com wrote:
> > > Using: MD5 (boot2_test.patch) = c2d6d2c9806df5915419987f200c05af
> > >
> > > Still fails to build.
> > >
> > > /usr/src/sys/boot/i386/boot2/boot2.c: In function 'main':
> > > /usr/src/sys/boot/i386/boot2/boot2.c:282: error: expected ':' before ')' token
> >
> > My test build didn't actually build all of boot2. This should be fixed now.
> >
> > --
> > John Baldwin
>
>
> Using: MD5 (boot2_test.patch) = b06e290859041cefc8ab38df37d06a36
>
> Built and installed ...
> Checking 2 times in a row ...
> BINGO! It works!
>
> Excellent job John!
> ;)
>
> So, what was an issue?
The problem is that in your case when you used a custom loader string,
kname was set to point to 'cmd', but 'cmd' is set to an empty string
(to avoid re-parsing it) after the initial parse is done. This caused
kname to point to an empty string. Even worse, if a user entered some
unparseable text, with kname pointing at 'cmd', kname could effectively
be overwritten with garbage.
--
John Baldwin
More information about the freebsd-hackers
mailing list