Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Apr 2023 12:55:13 -0700
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        Gary Jennejohn <garyj@gmx.de>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 4358928e235c - main - amd64 loader: plug hard hang with serial console enabled
Message-ID:  <ZCsvIf2KiwRROCU4@FreeBSD.org>
In-Reply-To: <20230401113848.3dc4fd8a@ernst.home>
References:  <202303311823.32VINOlr027796@gitrepo.freebsd.org> <20230401113848.3dc4fd8a@ernst.home>

next in thread | previous in thread | raw e-mail | index | archive | help
  Gary,

On Sat, Apr 01, 2023 at 09:38:48AM +0000, Gary Jennejohn wrote:
G> > URL: https://cgit.FreeBSD.org/src/commit/?id=4358928e235c1e188ad6b4650d78bcceb225b909
G> >
G> > commit 4358928e235c1e188ad6b4650d78bcceb225b909
G> > Author:     Gleb Smirnoff <glebius@FreeBSD.org>
G> > AuthorDate: 2023-03-31 18:19:25 +0000
G> > Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
G> > CommitDate: 2023-03-31 18:19:25 +0000
G> >
G> >     amd64 loader: plug hard hang with serial console enabled
G> >
G> >     The hang basically bricks a physical box and it can be recovered
G> >     only if you are able to boot from alternate media.  This isn't a
G> >     perfect fix, but throw it in before loader experts decide on
G> >     proper one.
G> >
G> >     Submitted by:   whu
G> >     Fixes:          927358dd98cb902160093e0dc0bac002d6b43858
G> > ---
G> >  stand/efi/loader/efiserialio.c | 2 ++
G> >  1 file changed, 2 insertions(+)
G> >
G> > diff --git a/stand/efi/loader/efiserialio.c b/stand/efi/loader/efiserialio.c
G> > index 5fbc700f6ac2..0f37ef8b87dd 100644
G> > --- a/stand/efi/loader/efiserialio.c
G> > +++ b/stand/efi/loader/efiserialio.c
G> > @@ -265,6 +265,8 @@ comc_probe(struct console *sc)
G> >  	 */
G> >  	env = getenv("smbios.bios.version");
G> >  	if (env == NULL || strncmp(env, "Hyper-V", 7) != 0) {
G> > +		/* Disable being seen as "comconsole". */
G> > +		comconsole.c_name = "efiserialio";
G> >  		return;
G> >  	}
G> >  #endif
G> >
G> 
G> What if env is NULL?  Shouldn't the code return without changing anything?
G> Seems to me that this if() should be split into two if() clauses.

You are absolutely right. The code looks concerning to me, too.

However, this is just a quick plug of a real bad problem, a quick
short term solution.  Soon Warner and other boot loader expers will
come up with proper fix of 927358dd98cb902160093e0dc0bac002d6b43858.

-- 
Gleb Smirnoff



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