← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Bug 2036604] Re: Synchronous Exception when booting VMs via qemu-efi-aarch64

 

shim 15.7-0ubuntu1

qemu-efi-aarch64 now implements EFI Memory Attribute Protocol. When shim
detects this, it uses it to set memory attributes appropriately for the
sections of the bootloader image it loads before passing control to it.
After this change, fresh Ubuntu VMs began crashing on startup (bug
2036604):

  --------------------------------------
  BdsDxe: loading Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x0)
  BdsDxe: starting Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x1,0x3)/Pci(0x0,0x0)

  Synchronous Exception at 0x00000000BC300000

  Synchronous Exception at 0x00000000BC300000

  --------------------------------------

 I narrowed this down to only happening when shim executes fbaa64.efi
(thus the fresh VM). I found upstream shim is unaffected, so I used
bisection to identify the relevant change:

  From c7b305152802c8db688605654f75e1195def9fd6 Mon Sep 17 00:00:00 2001
  From: Nicholas Bishop <REDACTED>
  Date: Mon, 19 Dec 2022 18:56:13 -0500
  Subject: [PATCH] pe: Align section size up to page size for mem attrs

  Setting memory attributes is generally done at page granularity, and
  this is enforced by checks in `get_mem_attrs` and
  `update_mem_attrs`. But unlike the section address, the section size
  isn't necessarily aligned to 4KiB. Round up the section size to fix
  this.

  Signed-off-by: Nicholas Bishop <nicholasbishop@xxxxxxxxxx>

Please add this patch to shim.

** Also affects: shim (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of
Canonical's Ubuntu QA, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/2036604

Title:
  Synchronous Exception when booting VMs via qemu-efi-aarch64

Status in cloud-images:
  New
Status in autopkgtest package in Ubuntu:
  Confirmed
Status in edk2 package in Ubuntu:
  In Progress
Status in qemu package in Ubuntu:
  Confirmed
Status in shim package in Ubuntu:
  Confirmed
Status in edk2 package in Debian:
  Confirmed

Bug description:
  I try to create an autopkgtest VM on an arm64 system with

  autopkgtest-buildvm-ubuntu-cloud -v --release mantic

  or on an amd64 system with

  autopkgtest-buildvm-ubuntu-cloud --arch arm64 -v --release mantic

  In both cases I get:

  Found linux image: /boot/vmlinuz-6.5.0-5-generic
  Found initrd image: /boot/initrd.img-6.5.0-5-generic
  Found linux image: /boot/vmlinuz-6.3.0-7-generic
  Found initrd image: /boot/initrd.img-6.3.0-7-generic
  Found linux image: /boot/vmlinuz-6.2.0-20-generic
  Found initrd image: /boot/initrd.img-6.2.0-20-generic
  Warning: os-prober will not be executed to detect other bootable partitions.
  BdsDxe: loading Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x5,0x0)
  BdsDxe: starting Boot0001 "UEFI Misc Device" from PciRoot(0x0)/Pci(0x5,0x0)

  
  Synchronous Exception at 0x000000005C328000

  
  Synchronous Exception at 0x000000005C328000
  ^A^Cqemu-system-aarch64: terminating on signal 2
  Traceback (most recent call last):

  /var/crash has no entries.

  ProblemType: Bug
  DistroRelease: Ubuntu 23.10
  Package: qemu-system-arm 1:8.0.4+dfsg-1ubuntu1
  ProcVersionSignature: Ubuntu 6.3.0-7.7-generic 6.3.5
  Uname: Linux 6.3.0-7-generic aarch64
  NonfreeKernelModules: zfs
  ApportVersion: 2.27.0-0ubuntu2
  Architecture: arm64
  CasperMD5CheckResult: pass
  CloudArchitecture: aarch64
  CloudID: none
  CloudName: none
  CloudPlatform: none
  CloudSubPlatform: config
  Date: Tue Sep 19 15:37:20 2023
  InstallationDate: Installed on 2021-08-17 (763 days ago)
  InstallationMedia: Ubuntu-Server 21.10 "Impish Indri" - Alpha arm64 (20210813)
  KvmCmdLine: COMMAND         STAT  EUID  RUID     PID    PPID %CPU COMMAND
  Lspci-vt:
   -[0000:00]-+-00.0  NVIDIA Corporation GK208B [GeForce GT 730]
              \-00.1  NVIDIA Corporation GK208 HDMI/DP Audio Controller
  MachineType: {report['dmi.sys.vendor']} {report['dmi.product.name']}
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.3.0-7-generic root=/dev/mapper/ubuntu--vg-ubuntu--lv ro
  RebootRequiredPkgs: Error: path contained symlinks.
  SourcePackage: qemu
  UpgradeStatus: No upgrade log present (probably fresh install)
  acpidump:
   
  dmi.bios.date: Mar 26 2020
  dmi.bios.release: 1.0
  dmi.bios.vendor: EFI Development Kit II / Marvell
  dmi.bios.version: EDK II
  dmi.board.name: Armada 8040 MacchiatoBin
  dmi.board.vendor: SolidRun
  dmi.board.version: Rev. 1.3
  dmi.chassis.type: 2
  dmi.chassis.vendor: SolidRun
  dmi.chassis.version: Rev. 1.3
  dmi.modalias: dmi:bvnEFIDevelopmentKitII/Marvell:bvrEDKII:bdMar262020:br1.0:svnSolidRun:pnArmada8040MacchiatoBin:pvrRev.1.3:rvnSolidRun:rnArmada8040MacchiatoBin:rvrRev.1.3:cvnSolidRun:ct2:cvrRev.1.3:sku:
  dmi.product.name: Armada 8040 MacchiatoBin
  dmi.product.version: Rev. 1.3
  dmi.sys.vendor: SolidRun

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/2036604/+subscriptions



References