** Description changed:

+ [ Impact ]
+ 
  On riscv64, heap allocations from Grub are using the biggest available
  block first.
  
  On the SpacemiT V100 system, it was observed during PXE booting that:
  - Grub was loaded just below 4 GiB, at 0xf4000000
  - The biggest available block was at 0xc010000000 (~45 GiB)
  
  Boot fails with:
  
  Booting UEFI PXEv4 (MAC:6CB311B683B4) 
(PciRoot(0x3)/Pci(0x0,0x0)/Pci(0x0,0x0)/MAC(6CB311B683B4,0x1)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0))
  relocation overflow
  Aborted. Press any key to exit.
  
  Relocation overflow, because the modules need to be in a +/- 2GiB range
  of the image, as PC-relative relocations (R_RISCV_CALL_PLT,
  R_RISCV_PCREL_HI20) are used by Grub and instruction encoding of those
  only allows +/- 2 GiB range from PC.
+ 
+ Backporting that fix to Noble makes sense because MAAS is still using Noble 
bootloaders, even for newer platforms. So even if no direct Noble-supported
+ platform is affected, booting Resolute-supported platform with this Noble
+ bootloader fails, and that is something we should fix.
+ 
+ [ Test Plan ]
+ 
+ The bug can be reproduced on the SpacemiT V100 in the Toronto lab.
+ I will coordinate with the MAAS team to make sure that the new version fixes 
the bug correctly.
+ 
+ Otherwise, this is a bootloader change only affecting riscv64 thanks to
+ the ifdefs in the patch. But this would still require testing on Noble-
+ supported boards to make sure we don't regress there. I will test on the
+ boards that I have that this still boots fine.
+ 
+ [ Where problems could occur ]
+ 
+ This is a bootloader change, affecting only riscv64. So technically any
+ Noble-supported riscv64 board could end up not booting at all if
+ something is wrong.
+ 
+ [ Other Info ]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2175038

Title:
  [SRU] grub2: riscv64: heap allocations can fall outside the 2GiB
  relocation range

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2175038/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to