From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id AC933AC17DE for ; Tue, 13 Feb 2024 15:08:02 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5f6vGFSXN0xp5UzaAe6TYER4ZtdNI4Z9H1UsEn0+34I=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707836881; v=1; b=byhqo0LmU42qk0yyotrmPZxNCphWTWbagiGB3JEUYL3DaWpXeMnXEH6o2cc9QOkThlSEgd5U beMofswhF6/exCAHW6yBgANRqx37aZxd3AL9Ic5oLZ6ZLsHiyPVqS/A4kfgmOfhwHIlhcWTf5Jw L52M/vLKYJ9MOX9XZzdgjJuY= X-Received: by 127.0.0.2 with SMTP id zNktYY7687511xJzoJTUJNZ9; Tue, 13 Feb 2024 07:08:01 -0800 X-Received: from mail-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) by mx.groups.io with SMTP id smtpd.web11.13847.1707836880690790190 for ; Tue, 13 Feb 2024 07:08:00 -0800 X-Received: by mail-oi1-f176.google.com with SMTP id 5614622812f47-3c049ccb623so21678b6e.1 for ; Tue, 13 Feb 2024 07:08:00 -0800 (PST) X-Gm-Message-State: bRRfcDfJRP2W0b3MV5qUZbsNx7686176AA= X-Google-Smtp-Source: AGHT+IEAQkc5cqbQ5cmCLKflqqW32E6LpcrcmCLTMMBP1f0w/IHJ1dEoE1zRKMn8pa+MzbFv0U/kRXCK1d/rCDLcSk0= X-Received: by 2002:a05:6870:5246:b0:218:f129:8a98 with SMTP id o6-20020a056870524600b00218f1298a98mr9957754oai.42.1707836879840; Tue, 13 Feb 2024 07:07:59 -0800 (PST) MIME-Version: 1.0 References: <20240213085925.687848-1-kraxel@redhat.com> <64005185-3cfd-de56-f086-da301aff13ba@redhat.com> In-Reply-To: From: "Pedro Falcato" Date: Tue, 13 Feb 2024 15:07:48 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/QemuVideoDxe: purge VbeShim To: Ard Biesheuvel Cc: devel@edk2.groups.io, kraxel@redhat.com, Laszlo Ersek , Oliver Steffen , Ard Biesheuvel , Jiewen Yao , dun.tan@intel.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=byhqo0Lm; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Tue, Feb 13, 2024 at 2:56=E2=80=AFPM Ard Biesheuvel wr= ote: > > On Tue, 13 Feb 2024 at 15:55, Pedro Falcato wro= te: > > > > On Tue, Feb 13, 2024 at 2:02=E2=80=AFPM Gerd Hoffmann wrote: > > > > > > On Tue, Feb 13, 2024 at 11:44:17AM +0100, Laszlo Ersek wrote: > > > > Hi Gerd, > > > > > > > > On 2/13/24 09:59, Gerd Hoffmann wrote: > > > > > Removing CSM support broke VbeShim. > > > > > > > > > > I see ASSERTS being triggered, both in vbeshim code and elsewhere= . > > > > > Didn't investigate in detail, but apparently the real mode addres= s space > > > > > is not considered being special any more, which invalidates some > > > > > assumptions of the vbeshim code. > > > > > > > > > > The guest os which depends on vbeshim for video support is -- acc= ording > > > > > to the comments -- Windows 2008 R2. Which went EOL in January 20= 20, > > > > > more than four years ago. > > > > > > > > > > Time to retire VbeShim. RIP. > > > > > > > > I don't understand this, and/or disagree. > > > > > > > > (1) Please collect more information about the ASSERT()s (the failur= e mode you are seeing). > > > > Because, (a) in the code that's being removed in this patch, I don'= t see any ASSERT() that should fire, and (b) I cannot reproduce the issue. = (In fact my log contains "InstallVbeShim: VBE shim installed".) > > > > > > Fair enough. The ASSERT() I see firing is this: > > > > > > ASSERT /home/kraxel/projects/edk2/OvmfPkg/QemuVideoDxe/VbeShim.c(142)= : Int0x10->Segment =3D=3D 0x0000 > > > > > > It reproduces for me when booting with a bunch of hot-pluggable CPUs = (qemu -smp 2,maxcpus=3D32). > > > > > > I bisected this, and it seems indeed totally unrelated to CSM removal= : > > > > > > 725acd0b9cc047b20a1b9379e46f05d3ebcf485e is the first bad commit > > > commit 725acd0b9cc047b20a1b9379e46f05d3ebcf485e > > > Author: Dun Tan > > > Date: Fri Dec 1 10:53:32 2023 +0800 > > > > > > UefiCpuPkg: Avoid assuming only one smmbasehob > > > > > > New theory: This is a NULL pointer dereference corrupting the zero pa= ge. > > > > Tangentially related: Maybe it's time to unmap the NULL page? :) > > > > > That would break many 3rd party GPU and network drivers. Do they need the zero page to be writable, at least? The fact that it's 2024 and most of EFI still has the zero page mapped *and* writable is, uh, annoying to say the least. Even write-protecting would be a great option. IMO there's currently little incentive in fixing those 3rd party blobs, because everything Just Works(tm), except when it doesn't. Like it seems to have happened this time around. (and to compound the problem, there's no sort of UBSAN or ASAN support to catch these issues either. So you virtually can't find NULL pointer derefs, unless the compiler can see it and trap) --=20 Pedro -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115386): https://edk2.groups.io/g/devel/message/115386 Mute This Topic: https://groups.io/mt/104329097/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-