tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: _bus_dmamap_sync fires assertion
On Thu, Sep 11, 2025 at 03:29:24PM +0000, Emmanuel Dreyfus wrote:
> Hello
>
> I am still working on ucom console. boot -a works, DDB works, exitting DDB
> crashes.
>
> There is an assertion in _bus_dmamap_sync() that fires:
> 829 KASSERTMSG(len <= map->dm_mapsize - offset,
> 830 "bad length 0x%"PRIxBUSADDR" + 0x%"PRIxBUSSIZE
> 831 " > 0x%"PRIxBUSSIZE,
> 832 offset, len, map->dm_mapsize);
>
> Values are len = 472, map->dm_mapsize = 4096, offset = 3712.
>
~~~~~
> The 3712 comes from the USB xfer: ux_dmabuf.udma_offs = 3712
> The error is cryptic. What am I doing wrong?
It's simple buffer overflow. The sum of 3712 and 472 is greater (by 88)
than 4096.
Home |
Main Index |
Thread Index |
Old Index