From nobody Thu Sep 24 07:24:18 2026 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 4hr51Z5CqYz6tjV2 for ; Thu, 24 Sep 2026 07:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hr51Z4dgQz3KB7 for ; Thu, 24 Sep 2026 07:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790234658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UMCpy7aoueJRmSW1cKsDT9VWWcEp8N1W/WP9jy+twkA=; b=jwAaYpkfHum3ATY4SUbiyZHGLuieNjdMOt4BWrf17fpjYEhaMNJaPmaa1dQLJBU2j+xVlo lJLICvvdN4nBnReLLCMkhyKzZ1t9E867adh+xV5yZ7jEJSGFtUwSe878HBfCDH2lxJjEn3 1fyrQrcz0G6rEcbMAca64HK89oEuGGnGPer2YN+D/MiDtwSaw0IY6pQ6hYUfUMoyDxOzt7 ilngYKdWm60l9IJnfW+/p4fAS3BICnhkcgK0nrz1JUNAaWWwSrIaAgIB6uAODEX0IzJn88 FhI1XGijHShksASc7KiZM6KONbA8k+u0JCTGGDzJxofotXlYfVhICtJ9fK+seg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790234658; b=lhUR58UMV3J94N3v7aM/1c2LQxNFMqGG52TJ41cbQB+ngf1ZMze7NBSMEQNNjiOeyzCgvV dvxBsX6YKspNB8D071fUyHsgM13dGelPCqD/9KizRbdyj90hIS+MYVdSl+VJqTnfUal15S 4DYycumGgvZZx0k1Cjl2kJeyTNPXVd+hNgr4MaHhnLzIGQ6XHYL+O3vIRskn+GPFes8Ts6 QVitgD8mX3WJq3yaLTz/hfes1aKYOzmj1o9IsYw+lWgfE3k0HVH1uAGssFGoa3NMRx2X4B pGpBUvoFUL7ebAtjdv8T8t41JYQGPTjMfVqSVpgQoijjgPyn12rzYrUgRYXbbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790234658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UMCpy7aoueJRmSW1cKsDT9VWWcEp8N1W/WP9jy+twkA=; b=lo0F8E9y2ZAhyXRhQfNy74Cf0Vb6fqB+SKOOdPdENDX9xbVa9inlaBoy0SoYP7SPa31P95 To28EaXh4Hi0PtbZ4BE0b0sTT16x8FZjqoX3N3Gc6KVBxMpVwKF4MIVusuQSm0xNAy0RLe t5TdokmZebw+4xt8aRdcu5O9uNWVUi0biA0u6I8GLFZhpIaosBK7vQe5jknunKHoHLe6rm DWj2h3ika24Hz16mghuoj6y7rigK3oLW3Sz355wbhFAbLase+XgJRlkSw683DgzRNgMvxQ 6CobRiQCNHEQ30eblATb8vPfaXkWn1vIA5DH7V5OFHIsb41/Wv96gh1EQ5HTag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hr51Z3jlfzDjx for ; Thu, 24 Sep 2026 07:24:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25996 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 24 Sep 2026 07:24:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b5f0e7f36afc - main - loader.efi: Be cautious about using GOPs 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5f0e7f36afc20bf17e9e955454b445d686cda06 Auto-Submitted: auto-generated Date: Thu, 24 Sep 2026 07:24:18 +0000 Message-Id: <6ab4d022.25996.7fb1f81e@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b5f0e7f36afc20bf17e9e955454b445d686cda06 commit b5f0e7f36afc20bf17e9e955454b445d686cda06 Author: Warner Losh AuthorDate: 2026-09-24 07:22:16 +0000 Commit: Warner Losh CommitDate: 2026-09-24 07:22:25 +0000 loader.efi: Be cautious about using GOPs When we're searching for the EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID (GOPs) to use, skip any whose Mode or Mode->Info pointers are NULL. The spec requires these to be non-null, however, some firmwares seem to fail to populate the Info when, for example, a monitor is not present. Work around these bugs by skipping any GOPs with bad pointers. PR: 288900 Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D59830 --- stand/efi/loader/framebuffer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index 632377613f58..6a95a1b98db4 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -632,7 +632,14 @@ efi_find_framebuffer(teken_gfx_t *gfx_state) if (status != EFI_SUCCESS) continue; - if (tgop->Mode->Info->PixelFormat == PixelBltOnly || + /* + * Some platforms half initialize the graphics protocol + * here when no monitor present, even though spec says + * they are non-optional. Windows and Linux don't access + * Mode->Info generally, so such bugs can slip through. + */ + if (tgop->Mode == NULL || tgop->Mode->Info == NULL || + tgop->Mode->Info->PixelFormat == PixelBltOnly || tgop->Mode->Info->PixelFormat >= PixelFormatMax) continue;