summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorJoel Fernandes <joelagnelf@nvidia.com>2026-01-26 15:23:01 -0500
committerAlexandre Courbot <acourbot@nvidia.com>2026-02-25 08:16:55 +0900
commit0568b376a0b13da6582bce1f2e2bbb2eae7fc266 (patch)
tree2f7c0859b2c6850522556a9d512d95cf81306aba /tools/perf/scripts/python/stackcollapse.py
parent6ad005ce6994599e2ae338007a54dd21063aae15 (diff)
gpu: nova-core: use checked arithmetic in FWSEC firmware parsing
Use checked_add() and checked_mul() when computing offsets from firmware-provided values in new_fwsec(). Without checked arithmetic, corrupt firmware could cause integer overflow. The danger is not just wrapping to a huge value, but potentially wrapping to a small plausible offset that passes validation yet accesses entirely wrong data, causing silent corruption or security issues. 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-2-joelagnelf@nvidia.com [acourbot@nvidia.com: rewrap commit message to make checkpatch happy.] [acourbot@nvidia.com: add missing empty lines after new code blocks.] [acourbot@nvidia.com: move SAFETY comments to the unsafe statement they describe.] [acourbot@nvidia.com: remove obvious computation comments and use `CALC:` for the remaining ones.] Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions