[Bug 253521] bhyve crash with e1000 emulation

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 16 18:11:09 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253521

--- Comment #1 from sigsys at gmail.com ---
Patch is wrong. There's a check further down for iovcnt being too high.

It crashed again. The problem must be something else.

I added an assert to check for paddr_guest2host() returning NULL and it got
triggered.  This probably would have caused a crash later on.

diff --git i/usr.sbin/bhyve/pci_e82545.c w/usr.sbin/bhyve/pci_e82545.c
index dca981be85fa..61f6ed69c072 100644
--- i/usr.sbin/bhyve/pci_e82545.c
+++ w/usr.sbin/bhyve/pci_e82545.c
@@ -1152,6 +1152,7 @@ e82545_transmit(struct e82545_softc *sc, uint16_t head,
uint16_t tail,
                                iov[iovcnt].iov_base = paddr_guest2host(
                                    sc->esc_ctx, dsc->td.buffer_addr, len);
                                iov[iovcnt].iov_len = len;
+                               assert(iov[iovcnt].iov_base != NULL);
                        }
                        iovcnt++;
                }

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-virtualization mailing list