Skip site navigation (1)Skip section navigation (2)


| raw e-mail | index | archive | help
I'm attaching a kernel module source for easy reproduction of the issue. The
module creates a dma tag which requires 64 alignment, allocates memory alig=
ned
to 64 bytes and then immediately moves the pointer by 4 bytes to misalign it
and loads the DMA map with misaligned pointer. This forces the bounce page =
to
be created. Everything, including the DMA tag is then cleaned up. This
allocation/deallocation loop happens every second. When the module is loade=
d,
calling `vmstat -m | grep bounce` should show that M_BOUNCE malloc usage is
rising, even though everything should be freed properly. Additionally, one =
can
observe the bounce page malloc by using dtrace with one-liner `dtrace -n
'dtmalloc::bounce: {}'`. Dtrace should print malloc calls but no frees will=
 be
visible.

I've seen the issue on arm64 and amd64, but it should be present on every
hardware platform.

[1] https://cgit.freebsd.org/src/tree/sys/kern/subr_busdma_bounce.c#n293

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?>