| 2ccdefee | 19-Mar-2026 |
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> |
drm/amd/ras: Add input pointer validation in ras core helpers
Add NULL checks for helper input/output pointers that are directly dereferenced, such as tm, seqno, dev_info and init_config.
Cc: Tao Z
drm/amd/ras: Add input pointer validation in ras core helpers
Add NULL checks for helper input/output pointers that are directly dereferenced, such as tm, seqno, dev_info and init_config.
Cc: Tao Zhou <tao.zhou1@amd.com> Cc: YiPeng Chai <YiPeng.Chai@amd.com> Cc: Dan Carpenter <dan.carpenter@linaro.org> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 2b8101cc | 15-Mar-2026 |
Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> |
drm/amd/ras: Fix NULL deref in ras_core_get_utc_second_timestamp()
ras_core_get_utc_second_timestamp() retrieves the current UTC timestamp (in seconds since the Unix epoch) through a platform-specif
drm/amd/ras: Fix NULL deref in ras_core_get_utc_second_timestamp()
ras_core_get_utc_second_timestamp() retrieves the current UTC timestamp (in seconds since the Unix epoch) through a platform-specific RAS system callback and is used for timestamping RAS error events.
The function checks ras_core in the conditional statement before calling the sys_fn callback. However, when the condition fails, the function prints an error message using ras_core->dev.
If ras_core is NULL, this can lead to a potential NULL pointer dereference when accessing ras_core->dev.
Add an early NULL check for ras_core at the beginning of the function and return 0 when the pointer is not valid. This prevents the dereference and makes the control flow clearer.
Fixes: 13c91b5b4378 ("drm/amd/ras: Add rascore unified interface function") Cc: YiPeng Chai <YiPeng.Chai@amd.com> Cc: Dan Carpenter <dan.carpenter@linaro.org> Cc: Tao Zhou <tao.zhou1@amd.com> Cc: Hawking Zhang <Hawking.Zhang@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: YiPeng Chai <YiPeng.Chai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 72289903 | 15-Dec-2025 |
Gangliang Xie <ganglxie@amd.com> |
drm/amd/ras: adapt page retirement process for pmfw eeprom
read bad page data from pmfw eeprom when retirement is triggered, use timestamp read from eeprom
Signed-off-by: Gangliang Xie <ganglxie@am
drm/amd/ras: adapt page retirement process for pmfw eeprom
read bad page data from pmfw eeprom when retirement is triggered, use timestamp read from eeprom
Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 42c46be2 | 15-Dec-2025 |
Gangliang Xie <ganglxie@amd.com> |
drm/amd/ras: add read func for pmfw eeprom
add read func for pmfw eeprom, and adapt address converting for bad pages loaded from pmfw eeprom
v2: change label 'Out' to 'out'
Signed-off-by: Tao Zhou
drm/amd/ras: add read func for pmfw eeprom
add read func for pmfw eeprom, and adapt address converting for bad pages loaded from pmfw eeprom
v2: change label 'Out' to 'out'
Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 3972f41b | 15-Dec-2025 |
Tao Zhou <tao.zhou1@amd.com> |
drm/amd/ras: make MCA IPID parse global
add a new IPID parse interface for umc, so we can implement it for each ASIC, and so we can call it in other blocks
Signed-off-by: Tao Zhou <tao.zhou1@amd.co
drm/amd/ras: make MCA IPID parse global
add a new IPID parse interface for umc, so we can implement it for each ASIC, and so we can call it in other blocks
Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 0d21084c | 12-Dec-2025 |
Gangliang Xie <ganglxie@amd.com> |
drm/amd/ras: add wrapper funcs for pmfw eeprom
add wrapper funcs for pmfw eeprom interface to make them easier to be called
Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <ta
drm/amd/ras: add wrapper funcs for pmfw eeprom
add wrapper funcs for pmfw eeprom interface to make them easier to be called
Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 12f4d448 | 12-Dec-2025 |
Gangliang Xie <ganglxie@amd.com> |
drm/amd/ras: add uniras smu feature flag init func
add flag to indicate if pmfw eeprom is supported or not, and initialize it
v2: change copyright from 2025 to 2026
Signed-off-by: Gangliang Xie <g
drm/amd/ras: add uniras smu feature flag init func
add flag to indicate if pmfw eeprom is supported or not, and initialize it
v2: change copyright from 2025 to 2026
Signed-off-by: Gangliang Xie <ganglxie@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 7783a8bf | 26-Feb-2026 |
YiPeng Chai <YiPeng.Chai@amd.com> |
drm/amdgpu: Fix static assertion failure issue
Since the PAGE_SIZE is 8KB on sparc64, the size of structure amdsriov_ras_telemetry will exceed 64KB, so use absolute value to fix the buffer size.
Fi
drm/amdgpu: Fix static assertion failure issue
Since the PAGE_SIZE is 8KB on sparc64, the size of structure amdsriov_ras_telemetry will exceed 64KB, so use absolute value to fix the buffer size.
Fixes the issue: drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:2: error: static assertion failed due to requirement 'sizeof(struct amdsriov_ras_telemetry) <= 64 << 10': amdsriov_ras_telemetry must be 64 KB | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10, drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:40: note: expression evaluates to '115616 <= 65536' | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
Fixes: cb48a6b2b61d ("drm/amd/ras: use dedicated memory as vf ras command buffer") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202602261700.rVOLIw4l-lkp@intel.com/ Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|
| 74c2689e | 26-Feb-2026 |
Yujie Liu <yujie.liu@intel.com> |
drm/amd/ras: fix kernel-doc warning for ras_eeprom_append()
Warning: drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_eeprom.c:845 function parameter 'ras_core' not described in 'ras_eeprom_append' War
drm/amd/ras: fix kernel-doc warning for ras_eeprom_append()
Warning: drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_eeprom.c:845 function parameter 'ras_core' not described in 'ras_eeprom_append' Warning: drivers/gpu/drm/amd/amdgpu/../ras/rascore/ras_eeprom.c:845 expecting prototype for ras_core_eeprom_append(). Prototype was for ras_eeprom_append() instead
Fixes: 5c3be5defc92 ("drm/amd/ras: Add eeprom ras functions") Signed-off-by: Yujie Liu <yujie.liu@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
show more ...
|