]> www.infradead.org Git - users/hch/misc.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 15:02:24 +0000 (11:02 -0400)
commit98f9e5ea474d834eed2e1fb163ef3ab956ef8205
tree82e044979b5d079664c6cf05798a7641ebec8ccb
parent34a6aa4e12dfa7a9cac031193bfc586bc015adf3
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