]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds
authorTasos Sahanidis <tasos@tasossah.com>
Fri, 31 May 2024 16:23:30 +0000 (19:23 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Jun 2024 17:43:34 +0000 (13:43 -0400)
commitc6c4dd54012551cce5cde408b35468f2c62b0cce
tree62d67f2d23974ad8fd17598c7d1d32da906ee152
parent267cace556e8a53d703119f7435ab556209e5b6a
drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds

Flexible arrays used [1] instead of []. Replace the former with the latter
to resolve multiple UBSAN warnings observed on boot with a BONAIRE card.

In addition, use the __counted_by attribute where possible to hint the
length of the arrays to the compiler and any sanitizers.

Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/include/pptable.h