Files
nvdriver/kernel-open
BlivionIaG 51d7d35c4a rmapi_node: bound external DMA-BUF sgt addresses by the GPU DMA width (#605)
nv_rs_rmapi_register_external_sgt() (GEM_EXPORT_DMABUF_MEMORY bridge,
#587) copied the importer's sg_dma_address() values verbatim into
external_dma_addrs[], which page_dma/page_dma_batch hand straight to
GPU sysmem PTEs. Nothing checked them against the GPU's addressing
width, so on GV11B (dma_bits = 40, platform_driver.c) a scatterlist
mapped for a different/wider device would be silently truncated by
the MMU. Refuse any segment ending past DMA_BIT_MASK(dma_bits) with
-EINVAL, before the RM object is created (caller keeps ownership).

Also derive page_dma_batch's renegotiation width from
nv_rs_rmapi_gpu_dma_bits() like page_dma does instead of a literal 47
(no behaviour change: negotiate already clamps to the node's width).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 07:21:03 -08:00
..