summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChenglei Xie <Chenglei.Xie@amd.com>2026-05-07 10:29:10 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-06-03 13:55:41 -0400
commit10358a396d9779c995ca8ecdbf3c50e6c0977b66 (patch)
tree71828abb6b6a455fa78f8ac2e4fd99753c926a0c /include/linux
parent758a868043dcb07eca923bc451c16da3e73dc47c (diff)
drm/amdgpu: grow VF RAS bad page table with bounded dynamic alloc
The VF RAS error handler used fixed-size bps[] / bps_bo[] arrays (512 slots). When the PF2VF bad-page block listed more entries than fit, amdgpu_virt_ras_add_bps() could memcpy() past the end of those arrays. Replace the fixed backing store with a dynamically grown table: - Add capacity to track allocated slots separately from count. - Start at 512 slots and realloc bps / bps_bo together when full. - Refuse growth beyond maximum EEPROM record limit (AMDGPU_VIRT_RAS_BAD_PAGE_TABLE_MAX_CAPACITY). - Return failure from amdgpu_virt_ras_add_bps() and stop processing the PF2VF block if allocation fails or the cap is reached. Signed-off-by: Chenglei Xie <Chenglei.Xie@amd.com> Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions