[dpdk-dev] [PATCH v2] kni: fix possible kernel crash with va2pa
ferruh.yigit at intel.com
Tue Mar 19 19:35:19 CET 2019
On 3/12/2019 9:22 AM, Yangchao Zhou wrote:
> va2pa depends on the physical address and virtual address offset of
> current mbuf. It may get the wrong physical address of next mbuf which
> allocated in another hugepage segment.
> In rte_mempool_populate_default(), trying to allocate whole block of
> contiguous memory could be failed. Then, it would reserve memory in
> several memzones that have different physical address and virtual address
> offsets. The rte_mempool_populate_default() is used by
> Signed-off-by: Yangchao Zhou <zhouyates at gmail.com>
> v2: Add an explanation that causes this problem.
> Use m->next to store physical address.
Overall code looks good to me, thanks for the work, it looks pretty clean.
I would like to do some test before giving an ack.
Meanwhile, can you please update kni documentation, to document for the mbufs
sent to kernel has mbuf->next fields as physical address. It is OK to send as a
new version of the patch with documentation.
More information about the dev