From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.1990.1689058696099012767 for ; Mon, 10 Jul 2023 23:58:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TuzZMfJ0; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689058695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8tp6Les84AvzJp7LPtdOiwnIAtdHoSsIDtbAhS2b6NI=; b=TuzZMfJ0fGn734QUzdjGzNBYZBboaoE1LdQWdgXAr/CtBumbgy3FTD3gzoTEDDAGz7uYwa oveLFOauQ7lqhf14zODYJC9Kn3f+zQTWslouBSS7PjdkMwu2E4HzzR4k7LnoP5mrhVpvTI 6+aUkNiVYRnez+/SBgx4XB3qalN8Hy0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-491-_k0b8o1sO-Kg3lFE4OZO9g-1; Tue, 11 Jul 2023 02:58:08 -0400 X-MC-Unique: _k0b8o1sO-Kg3lFE4OZO9g-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1AB0F800193; Tue, 11 Jul 2023 06:58:08 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.252]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C5980492C13; Tue, 11 Jul 2023 06:58:07 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6C3C8180093B; Tue, 11 Jul 2023 08:58:06 +0200 (CEST) Date: Tue, 11 Jul 2023 08:58:06 +0200 From: "Gerd Hoffmann" To: Pedro Falcato Cc: devel@edk2.groups.io, osy@turing.llc, Ard Biesheuvel , Leif Lindholm , dann frazier Subject: Re: [edk2-devel] ArmVirtPkg: non-executable EFI_LOADER_DATA breaks GRUB on Ubuntu 22.04 Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Jul 10, 2023 at 04:58:15PM +0100, Pedro Falcato wrote: > On Mon, Jul 10, 2023 at 2:28 PM wrote: > > > > I have an existing install of Ubuntu 22.04 on a QEMU virtual machine which I've decided to update the UEFI firmware. After doing so, GRUB no longer boots ("Synchronous Exception" message seen). After a git bisect session, I found the problematic 2997ae38739756ecba9b0de19e86032ebc689ef9. The comment says GRUB should have been fixed in 2017, but for one reason or another, my VM which was built in 2022 still had the issue. Regardless, I don't think it's a good idea to break GRUB, even if it's fixed in 2017. In the very least, a better error message would be preferable to crashing with an "Synchronous Exception." Googling this error message shows that other people may be hitting this issue as well but the vague error symptom means its impossible to know if it's the same issue or not. > > +CC Some of the folks involved in the original discussion > > In the original thread, people discussed some alternative behavior to > just crashing on a NX fault. Is this still an alternative? The idea is: Improve page fault handler to (a) print a big'n'fat warning, and (b) loosening up memory permissions for the faulting page address. No patch for that emerged (yet?). > I'm kind of thinking this should be addressed by distros anyway.... > How is $CURRENT_YEAR Ubuntu still shipping bad GRUBs? I know the > situation around GRUB and distro patching is complicated but... > Do we have any idea of how many distros/GRUBs are affected by this? Too many :( > Personally, I would like to avoid loosening up memory permissions. Well, you can't have both. You have to pick between strict nx handling and grub bug compatibility ... take care, Gerd