drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10
Seems like newer cards can have even more instances now. Found by UBSAN: array-index-out-of-bounds in drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:318:29 index 8 is out of range for type 'uint32_t *[8]'
Signed-off-by Ernst Sjöstrand <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
@@ -758,7 +758,7 @@ enum amd_hw_ip_block_type {MAX_HWIP }; -#define HWIP_MAX_INSTANCE 8 +#define HWIP_MAX_INSTANCE 10struct amd_powerplay {void *pp_handle;
Signature · 1 line
2.30.2
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 29 lines · Ernst Sjöstrand
Seems like newer cards can have even more instances now. Found by UBSAN: array-index-out-of-bounds in
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:318:29index 8 is out of range for type 'uint32_t*[8]'Signed-off-by Ernst Sjöstrand <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-2@@ -758,7 +758,7 @@ enum amd_hw_ip_block_type {MAX_HWIP }; -#define HWIP_MAX_INSTANCE 8 +#define HWIP_MAX_INSTANCE 10struct amd_powerplay {void *pp_handle; --2.30.2