Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2012 14:06:12 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        rank1seeker@gmail.com
Cc:        Roman Divacky <rdivacky@freebsd.org>, hackers@freebsd.org, Andriy Gapon <avg@freebsd.org>
Subject:   Re: BUG: 9.0 stage 2 boot (/boot/boot)
Message-ID:  <201203051406.12776.jhb@freebsd.org>
In-Reply-To: <20120305.181803.677.1@DOMY-PC>
References:  <20120302.151703.536.2@DOMY-PC> <201203051244.44681.jhb@freebsd.org> <20120305.181803.677.1@DOMY-PC>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, March 05, 2012 1:18:03 pm rank1seeker@gmail.com wrote:
> ----- Original Message -----
> From: John Baldwin <jhb@freebsd.org>
> To: rank1seeker@gmail.com
> Cc: hackers@freebsd.org, "Roman Divacky" <rdivacky@freebsd.org>, "Andriy Gapon" <avg@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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203051406.12776.jhb>