From nobody Mon Apr 03 19:55:13 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pr1pK34qzz43DfH; Mon, 3 Apr 2023 19:55:21 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4Pr1pJ5GZWz4ZHG; Mon, 3 Apr 2023 19:55:20 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org; dmarc=none Received: by glebi.us (Postfix, from userid 1000) id 93D6168510; Mon, 3 Apr 2023 12:55:13 -0700 (PDT) Date: Mon, 3 Apr 2023 12:55:13 -0700 From: Gleb Smirnoff To: Gary Jennejohn 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: References: <202303311823.32VINOlr027796@gitrepo.freebsd.org> <20230401113848.3dc4fd8a@ernst.home> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230401113848.3dc4fd8a@ernst.home> X-Spamd-Result: default: False [0.51 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_TO(0.00)[gmx.de]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[glebius]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Pr1pJ5GZWz4ZHG X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N 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 G> > AuthorDate: 2023-03-31 18:19:25 +0000 G> > Commit: Gleb Smirnoff 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