]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/ras: Fix SMU EEPROM record field decoding
authorXiang Liu <xiang.liu@amd.com>
Mon, 11 May 2026 08:45:08 +0000 (16:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 15:49:46 +0000 (11:49 -0400)
commitb5fa84e805a61d3c1a741035ac793674833d3ca0
treedee1c98f585a8d18ed9f69bf5e862730c850c81a
parent4d695e66d7027a0c78302e47ac76293675fbbb4d
drm/amd/ras: Fix SMU EEPROM record field decoding

The SMU EEPROM read paths pass byte-sized record field addresses
to mca_ipid_parse(), whose outputs are u32 pointers.

Writing through those widened pointers can clobber adjacent fields
and bytes beyond the record storage.

Parse the IPID values into local u32 temporaries instead, then
explicitly narrow the values when storing them in the EEPROM record.

Signed-off-by: Xiang Liu <xiang.liu@amd.com>
Reviewed-by: Stanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c