]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: check for overflow to DMATRFBASE1
authorTimur Tabi <ttabi@nvidia.com>
Wed, 7 Jan 2026 20:16:46 +0000 (14:16 -0600)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 12 Jan 2026 13:43:31 +0000 (14:43 +0100)
commit5cf76277cdec872aef9ff2e9008ae129bb303787
tree4c634705c555d1d5006662584376f9eb1a4495f7
parent0cc83fc23debf3e2df19c4510a77fe2d60ab2693
gpu: nova-core: check for overflow to DMATRFBASE1

The NV_PFALCON_FALCON_DMATRFBASE/1 register pair supports DMA addresses
up to 49 bits only, but the write to DMATRFBASE1 could exceed that.
To mitigate, check first that the DMA address will fit.

Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Fixes: 69f5cd67ce41 ("gpu: nova-core: add falcon register definitions and base code")
Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Link: https://patch.msgid.link/20260107201647.2490140-1-ttabi@nvidia.com
[ Import ::kernel::dma::DmaMask. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/nova-core/falcon.rs