drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 4 Oct 2023 20:22:52 +0000 (15:22 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:19:40 +0000 (17:19 +0000)
commit92a775e7c9707aed28782bafe636bf87675f5a97
treef59e15717a89fd7f3e0609698a3e6a797587872a
parentea1e7d6fdc5e4452e78f73bd59fdad24e0b452b1
drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7

[ Upstream commit 760efbca74a405dc439a013a5efaa9fadc95a8c3 ]

For pptable structs that use flexible array sizes, use flexible arrays.

Suggested-by: Felix Held <felix.held@amd.com>
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2874
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/include/pptable.h
drivers/gpu/drm/amd/pm/powerplay/hwmgr/pptable_v1_0.h