diff options
| author | Candice Li <candice.li@amd.com> | 2026-07-30 17:55:07 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-08-06 09:26:21 -0400 |
| commit | c0122bf2ccb1a677bd9e564580d3a5c81c4b0739 (patch) | |
| tree | 152a1ff36ef3d28b1f2ab0287de68a32b5c74988 /tools/perf/scripts/python/flamegraph.py | |
| parent | 6c9e0328d1dee58cd2ebbcc34b43eefc342d6d62 (diff) | |
drm/amdgpu: fix userq VA validation for sub-page buffers
amdgpu_userq_input_va_validate() converts expected_size to page count
with a plain right shift. For expected_size smaller than one GPU page,
the computed size becomes 0 and the range check is effectively bypassed.
This allows sub-page userq buffers (e.g. EOP/CSA) to pass validation
as long as the start VA is mapped, without verifying the full span.
Fix it by rejecting zero expected_size, checking overflow when
computing end address, and deriving page span from [start_addr,
end_addr] inclusive.
Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
