]> git.ipfire.org Git - thirdparty/linux.git/commit
gpu: nova-core: use checked arithmetic in RISC-V firmware parsing
authorJoel Fernandes <joelagnelf@nvidia.com>
Mon, 26 Jan 2026 20:23:05 +0000 (15:23 -0500)
committerAlexandre Courbot <acourbot@nvidia.com>
Tue, 24 Feb 2026 23:16:55 +0000 (08:16 +0900)
commit4bef417ea46cbc701500b1b92b962586ec6e0900
tree790563d9c9ec771e02b0d440a30e0bacf4e613e2
parent35ae4e58a7c0edd7249a0bcd0d2c151afc185bc2
gpu: nova-core: use checked arithmetic in RISC-V firmware parsing

Use checked_add() when computing offsets from firmware-provided values
in the RISC-V firmware parsing code. These values come from the BinHdr
structure parsed from the firmware file header.

Reviewed-by: Zhi Wang <zhiw@nvidia.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260126202305.2526618-6-joelagnelf@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/firmware/riscv.rs