Hi Mike and Alperen,
Thank you both for the feedback.
@Alperen: Thanks a lot for the thorough review and for catching those
edge cases in the
fallback and loop handling (zero-length transfers, short reads/writes,
and the bd->taken
check order).
@Mike: Thanks for pointing out debian/patches/dma_bounce_buffers.diff in
rumpkernel. I
hit this issue on the 2026-03-14 debian-hurd-amd64 image, which predates
that patch.
Handling bounce buffers at the bus_dma layer in rumpkernel is definitely
cleaner and more
general than duplicating the < 4 GiB workaround in rumpdisk, so we can
drop this patch.
Regarding whether anything is missing from dma_bounce_buffers.diff: for
rumpdisk (which
goes through bus_dmamap_load()), it looks complete; the only minor note
in that diff is
that bus_dmamap_load_mbuf() and bus_dmamap_load_uio() still panic() if
they ever hit
addresses above the bounce threshold, though as noted there Hurd doesn't
currently use
those two interfaces.
Best regards,
Sophiel
On 28/11/2026 15:13, Michael Kelly wrote:
On 28/11/2026 01:30, Sophiel Zhou via Bug reports for the GNU Hurd wrote:
On x86_64 systems with 4 GiB or more of RAM (e.g. Debian
GNU/Hurd amd64 running under QEMU/KVM with >= 4 GiB of memory),
boot fails when ext2fs accesses the root disk through piixide0:
ext2fs: part:2:device:wd0: Input/output error
On x86_64, GNU Mach may allocate physical pages above 4 GiB,
which cannot be accessed by legacy 32-bit DMA controllers such as
piixide. The existing write path only used a low-memory bounce
buffer for unaligned source buffers, leaving page-aligned writes
and reads vulnerable to DMA failures.
This issue has already been addressed by adding bounce buffer support
(where necessary) at a lower layer within rumpkernel itself via the
following patch in https://salsa.debian.org/hurd-team/rumpkernel.git:
debian/patches/dma_bounce_buffers.diff
Is there something missing from this patch?
Mike.