From owner-dev-commits-src-all@freebsd.org Fri Feb 5 20:33:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 26D83529765 for ; Fri, 5 Feb 2021 20:33:08 +0000 (UTC) (envelope-from tsoome@me.com) Received: from pv50p00im-ztdg10012101.me.com (pv50p00im-ztdg10012101.me.com [17.58.6.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DXRv76rV0z4VsX for ; Fri, 5 Feb 2021 20:33:07 +0000 (UTC) (envelope-from tsoome@me.com) Received: from nazgul.lan (148-52-235-80.sta.estpak.ee [80.235.52.148]) by pv50p00im-ztdg10012101.me.com (Postfix) with ESMTPSA id CD7A084020B; Fri, 5 Feb 2021 20:33:04 +0000 (UTC) From: Toomas Soome Message-Id: <68A78067-CE19-4024-B6A9-D924F8972A35@me.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: 0c839497c174 - stable/13 - loader.efi: There are systems without ConOut, also use ConOutDev Date: Fri, 5 Feb 2021 22:33:02 +0200 In-Reply-To: Cc: Toomas Soome , src-committers , "" , dev-commits-src-branches@freebsd.org To: Warner Losh References: <97F5C09F-7AE3-4763-AD32-BFEA25101CE5@me.com> <014891C8-7B1F-4908-9495-2ED1A5FAABCF@me.com> X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.737 definitions=2021-02-05_11:2021-02-05, 2021-02-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2006250000 definitions=main-2102050128 X-Rspamd-Queue-Id: 4DXRv76rV0z4VsX X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2021 20:33:08 -0000 > On 5. Feb 2021, at 22:21, Warner Losh wrote: >=20 >=20 >=20 > On Fri, Feb 5, 2021 at 1:09 PM Toomas Soome > wrote: >=20 >=20 >> On 5. Feb 2021, at 21:43, Warner Losh > wrote: >>=20 >>=20 >>=20 >> On Fri, Feb 5, 2021 at 10:24 AM Toomas Soome > wrote: >>=20 >>=20 >>> On 5. Feb 2021, at 18:44, Warner Losh > wrote: >>>=20 >>>=20 >>>=20 >>> On Thu, Feb 4, 2021 at 11:38 PM Toomas Soome > wrote: >>>=20 >>>=20 >>>> On 5. Feb 2021, at 01:56, Warner Losh > wrote: >>>>=20 >>>> =EF=BB=BF >>>> And why the instaMFC? Changes are supposed to cook force days = before merging... I have questions about the wisdom of this change... >>>>=20 >>>> Warner=20 >>>>=20 >>>=20 >>> Reason is in PR. There is someone with the system without ConOut but = ConOutDev is set. Instead of falling back to arbitrary device (which in = this case was totally wrong choice), we can try the possible devices = list. We do not change the ConOut parsing. >>>=20 >>> We could have the same effect defaulting to Video. This bug should = have been discussed / reviewed before it was committed. >>=20 >> How is is different from defaulting to serial, it is just as bad? we = can not guess there, thats why we do have ConOutDev list. >>=20 >>=20 >>>=20 >>> If it would appear, there are systems with unusable devices listed = in ConOutDev, then we need to think how to handle such case. >>>=20 >>> Yes. We fall back to the arbitrary device... It's just a flag that = can be overridden. We can easily fall back to video too. >>=20 >> We *should not* fall back on arbitrary devices when there is source = for alternate options. And that option is from specification: >>=20 >> "The ConInDev, ConOutDev, and ErrOutDev variables each contain an = EFI_DEVICE_PATH_PROTOCOL descriptor that defines all the possible = default devices to use on boot. These variables are volatile, and are = set dynamically on every boot. ConIn, ConOut, and ErrOut are always = proper subsets of ConInDev, ConOutDev, and ErrOutDev.=E2=80=9D >>=20 >> Right. Except they aren't a proper subset in this case. Since they = aren't a proper subset, can you count on them having any meaningful = meaning? In the cases you found they do, but it's just as arbitrary. >=20 > Well, we can argue if empty set is or is not subset of (any) other = set. But, we do have specification. And we should not arbitrary pick = what part we are going to follow and what not. >=20 > The empty set isn't a proper subset. It is a subset, but not a proper = subset, by definition. Therefore, it's not standards complaint. >> =20 >> UEFI Spec 2.8A, Page 82. >>=20 >> There may or may not be Video (or Serial) device listed. If not, = there are good chance we will be in trouble because the firmware = internals may not be set up properly and we can just as well end up in = hung system. >>=20 >> For x86, there's almost always Video. For !x86 it gets more = troublesome. >=20 > There is almost always ConOut as well. Except when there is not. And = in this case, there is not. >=20 > I still do not get what it is we are arguing about. Do we have case = where ConOut is not set and ConOutDev does have garbage? >=20 > We have one sighting of 'ConOut' being missing. Any extrapolation from = there is tricky. We know in this one case the info appears to be good. = But this is not standards compliant, so how can we be sure that others = will be similar? >=20 > Warner It is tricky, agree. But we also have other assumptions. Like we can = get handles for all devices (vmware devs at one point in time did decide = to only give handles for devices used at boot time - no handles fot = non-boot disks, serial ports and such). But we are not going to tell user to buy better computer, do we?:) = Otherwise, we should tell the same for other non-standard cases we = already do know about=E2=80=A6 Thanks for all the feedback, toomas