Your message dated Fri, 13 Nov 2026 14:32:07 +0000
with message-id <[email protected]>
and subject line Bug#1140542: fixed in grub2 2.12-9+deb13u4
has caused the Debian Bug report #1140542,
regarding grub-efi-riscv64: relocation overflow crash on systems with
multi-range memory layout (>4GB RAM)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1140542: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1140542
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: grub-efi-riscv64
Version: 2.12-9+deb13u2
Severity: grave
Tags: upstream
grub-efi-riscv64: relocation overflow crash on systems with multi-range memory
layout (>4GB physical RAM)
-- System Information:
Hardware: SpacemiT V100-C2201 (RISC-V, SpacemiT V100 SoC)
Debian Release: 13 (trixie)
APT: APT version 3.x
Kernel: 6.12.86+deb13-riscv64 (riscv64)
Locale: (not relevant)
-- Description:
When booting the Debian riscv64 DVD installer (from
https://cdimage.debian.org/debian-cd/current/riscv64/iso-dvd/) on a
SpacemiT V100 RISC-V server (128 GB RAM), GRUB crashes immediately
with "relocation overflow" before loading any menu or kernel.
Running grubriscv64.efi from the UEFI shell produces:
InstallProtocolInterface: 752F3136-4E16-4FDC-A22A-E5F46812F4CA 83FFF720
CpuSetMemoryAttributes: Set memory attributes not supported yet
relocation overflow
Aborted. Press any key to exit
This is a known upstream bug in grub-core/kern/riscv/dl.c,
grub_arch_dl_relocate_symbols(), where R_RISCV_CALL / R_RISCV_CALL_PLT
relocation handling checks:
if (off != (grub_int32_t) off)
return grub_error (GRUB_ERR_BAD_MODULE, "relocation overflow");
The offset `off = sym_addr - (grub_addr_t) place` overflows int32 because
UEFI allocates GRUB's EFI image in high memory (above 4 GB) when the
physical address space contains a multi-range layout.
-- Memory layout on this machine:
The SpacemiT V100 has 128 GB RAM exposed via ACPI SRAT as two NUMA nodes
with non-contiguous ranges:
Node 0: [mem 0x00000000-0xffffffff] (first 4 GB, with holes)
[mem 0xc0100000000-0xc0fffffffff] (range above 768 GB)
Node 1: [mem 0xe0000000000-0xe0fffffffff]
Because the low 4 GB region is heavily fragmented by firmware/MMIO
reservations, UEFI places the GRUB EFI image at an address such as
0xBDCCB000 (per the log above — still within 32-bit range on this
machine, but the loaded modules end up relocated far above), causing
the R_RISCV_CALL relocation offset to exceed ±2 GB.
This is documented in the upstream RISC-V initiative tracker:
https://lf-rise.atlassian.net/wiki/spaces/HOME/pages/8586141/DI_01_01+GRUB+-+Relocation+overflow+on+RISC-V+with+multi-range+memory+layout
And the related LKML thread:
https://lore.kernel.org/all/cakmqykmtazt5sacumd4vxyfgaqibpzqjahttsusb+yekhcy...@mail.gmail.com/T/
-- Impact:
The Debian riscv64 installer is completely unbootable on RISC-V
systems with large RAM (e.g., SpacemiT V100, or any system where UEFI
may allocate GRUB's image or its modules outside the ±2 GB window of
each other).
-- Steps to reproduce:
1. Download https://cdimage.debian.org/debian-cd/current/riscv64/iso-dvd/
2. Write to USB or mount the ISO
3. Boot on a SpacemiT V100 (or similar RISC-V system with >4 GB RAM
and fragmented low memory)
4. GRUB immediately crashes with "relocation overflow"
-- Fix:
The fix requires GRUB to emit a PLT/trampoline for R_RISCV_CALL
relocations that cannot be satisfied within ±2 GB, similar to how
other architectures handle out-of-range relocations. The upstream RISC-V
RISE initiative (project DI_01_01) is tracking this fix.
A workaround may be to link GRUB as a position-independent image or
to ensure the EFI memory allocator keeps all GRUB code and modules
within a contiguous ±2 GB region, but a proper fix in dl.c is needed.
-- Additional info:
grub-efi-riscv64: 2.12-9+deb13u2
grub-efi-riscv64-bin: 2.12-9+deb13u2
grub-common: 2.12-9+deb13u2
grub2-common: 2.12-9+deb13u2
CPU ISA: rv64imafdcvh + (extensive extensions including V, Zb*, Zk*)
MMU: sv48
EFI: v2.7 by SpacemiT
BIOS: SpacemiT v1.0.0
This message and any attachment are confidential and may be privileged or
otherwise protected from disclosure. If you are not an intended recipient of
this message, please delete it and any attachment from your system and notify
the sender immediately by reply e-mail. Unintended recipients should not use,
copy, disclose or take any action based on this message or any information
contained in this message. Emails cannot be guaranteed to be secure or error
free as they can be intercepted, amended, lost or destroyed, and you should
take full responsibility for security checking.
本邮件及其任何附件具有保密性质,并可能受其他保护或不允许被披露给第三方。如阁下误收到本邮件,敬请立即以回复电子邮件的方式通知发件人,并将本邮件及其任何附件从阁下系统中予以删除。如阁下并非本邮件写明之收件人,敬请切勿使用、复制、披露本邮件或其任何内容,亦请切勿依本邮件或其任何内容而采取任何行动。电子邮件无法保证是一种安全和不会出现任何差错的通信方式,可能会被拦截、修改、丢失或损坏,收件人需自行负责做好安全检查。
--- End Message ---
--- Begin Message ---
Source: grub2
Source-Version: 2.12-9+deb13u4
Done: Steve McIntyre <[email protected]>
We believe that the bug you reported is fixed in the latest version of
grub2, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Steve McIntyre <[email protected]> (supplier of updated grub2 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Fri, 06 Nov 2026 11:48:32 +0000
Source: grub2
Architecture: source
Version: 2.12-9+deb13u4
Distribution: trixie
Urgency: medium
Maintainer: GRUB Maintainers <[email protected]>
Changed-By: Steve McIntyre <[email protected]>
Closes: 1140542
Changes:
grub2 (2.12-9+deb13u4) trixie; urgency=medium
.
[ Han Gao ]
* Apply patch from upstream to fix relocation overflow crash on riscv64
in grub.efi (Closes: #1140542)
- configure-Add-mno-relax-on-riscv
from 8fef533cf69547576f522b0e563c9c6fee635ece
- configure-Defer-check-for-mcmodel-large-until-PIC-PI
form 1aa0dd0c04a7e66d127915c54d7d7f1de5974d4f
Checksums-Sha1:
724fdac3e57d92355fca60f666698ceebc1e6246 8128 grub2_2.12-9+deb13u4.dsc
f6a0bf4ae129ecabeb0034317955006a776cbd0a 1130468
grub2_2.12-9+deb13u4.debian.tar.xz
5e9c107e42db8ac7329eaafae1384f2c42ec4b27 15047
grub2_2.12-9+deb13u4_source.buildinfo
Checksums-Sha256:
157c784912981f24499c917b2a25b6aecb9487065156efbcae97f58798e97f36 8128
grub2_2.12-9+deb13u4.dsc
14c4765993f73966dad8dddff258824fe9336395fd852934d03a062e71248869 1130468
grub2_2.12-9+deb13u4.debian.tar.xz
96220f809899c0a393f307cc9c02bd3df961310841e0b3a12a7dae565d94a249 15047
grub2_2.12-9+deb13u4_source.buildinfo
Files:
ed3f6fa1da1dee733f56bbe2a9f2184c 8128 admin optional grub2_2.12-9+deb13u4.dsc
16fccda5c9dd712695a51e562eda9afe 1130468 admin optional
grub2_2.12-9+deb13u4.debian.tar.xz
dbce3c52a2d80feb17763a35b1482e0d 15047 admin optional
grub2_2.12-9+deb13u4_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEEzrtSMB1hfpEDkP4WWHl5VzRCaE4FAmrtwS8RHDkzc2FtQGRl
Ymlhbi5vcmcACgkQWHl5VzRCaE4JQg/+JwoKy+xWr95niI+yO/R/Wl6qDAUyvN2k
REmuqyfEFzrnvewJykoJTzGruuhShjPvAhmIwTCi8I/lytqML5BP+UULbE+Ygbej
KqDynP9hqoaEvOW6HPkzjPlmSmZoDTiS+UnapffpmzU9heXgBDSF1FVEhXC4UjSC
CRf9r3uLyjbTD3kPoRFzm5ylxgSyfw9Oat9rcktvuBng3geSM0x3aWRc83Y5h587
R7oxjRyoa/+PLsBcbYgtk+zaHnpBmAwaFh5USFYlOMIH7HqlJlfuguzy6VikCXuy
TS/WCD/8Mh7PA5yG9vkKVSfxh/gUSzh24eBES5lzF395ExNUCR8xIut4+MFuyrKe
UwviTIuJ0gMhLSflrnqFvMtRoAYDPRGhJhvH54eyKaJAV2zNQBYBoojXkgjsz6Mr
kqeBbt6A0w7W1Ms9zXqpF0YI1wLrBDSw4Tx0SFgzGx6DdSQ0zXmZqbQ3Vs7lGF3M
ToRHOI2K/Vl3XnQ7ugCDpLTFsAQQNzeu0PloV4Pdr37Ko46RYlkwtzTk4y/zserz
8BmRrW67nxWXAdD2sJaFKFX36GOWUzXuYWFyw3zI4z4L0lgNY2C0ijhzkWNlU/zy
0+R+UdBX0vFnvWhCWVMNEoLF6E72RGZHF/JcW6f7uQtB8TAPLHOBX6+O07mVdSaP
0diMqGaI/hU=
=MtNS
-----END PGP SIGNATURE-----
pgpMKfkyDDRTL.pgp
Description: PGP signature
--- End Message ---