drm/amd/pm: correct the gpu metrics version
Subsystems (3)
PATCH 1/1 drm/amd/pm: correct the gpu metrics version
For V1_0 and V1_1, they come with different size. Misuse may cause out of memory access.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +1 -1
@@ -206,7 +206,7 @@ static int aldebaran_tables_init(struct smu_context *smu)return -ENOMEM ; smu_table->metrics_time =0 ; - smu_table->gpu_metrics_table_size =sizeof (struct gpu_metrics_v1_0 ); + smu_table->gpu_metrics_table_size =sizeof (struct gpu_metrics_v1_1 ); smu_table->gpu_metrics_table =kzalloc (smu_table->gpu_metrics_table_size,GFP_KERNEL );if (!smu_table->gpu_metrics_table) {kfree (smu_table->metrics_table);
Signature · 6 lines
2.29.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Best Regards,
Kevin
________________________________
From: amd-gfx <[email protected]> on behalf of Evan Quan <[email protected]>
Sent: Wednesday, March 10, 2021 3:34 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/pm: correct the gpu metrics version
For V1_0 and V1_1, they come with different size. Misuse may cause out of memory access.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +1 -1
@@ -206,7 +206,7 @@ static int aldebaran_tables_init(struct smu_context *smu)return -ENOMEM ; smu_table->metrics_time =0 ; - smu_table->gpu_metrics_table_size =sizeof (struct gpu_metrics_v1_0 ); + smu_table->gpu_metrics_table_size =sizeof (struct gpu_metrics_v1_1 ); smu_table->gpu_metrics_table =kzalloc (smu_table->gpu_metrics_table_size,GFP_KERNEL );if (!smu_table->gpu_metrics_table) {kfree (smu_table->metrics_table);
--
2.29.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CKevin1.Wang%40amd.com%7Cc31b1fd942bb40c1588608d8e396f111%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637509584725486440%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=S3QQf%2FepFOcCSvDcU%2BGQVgXFTJcqlt5DCfueMArlIBg%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Evan Quan
Sent: Wednesday, March 10, 2021 1:04 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Quan, Evan <[email protected]>
Subject: [PATCH] drm/amd/pm: correct the gpu metrics version
For V1_0 and V1_1, they come with different size. Misuse may cause out of memory access.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +1 -1
@@ -206,7 +206,7 @@ static int aldebaran_tables_init(struct smu_context *smu)return -ENOMEM ; smu_table->metrics_time =0 ; - smu_table->gpu_metrics_table_size =sizeof (struct gpu_metrics_v1_0 ); + smu_table->gpu_metrics_table_size =sizeof (struct gpu_metrics_v1_1 ); smu_table->gpu_metrics_table =kzalloc (smu_table->gpu_metrics_table_size,GFP_KERNEL );if (!smu_table->gpu_metrics_table) {kfree (smu_table->metrics_table);
--
2.29.0
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Clijo.lazar%40amd.com%7Cc31b1fd942bb40c1588608d8e396f111%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637509584723831600%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=prot8ng8SzxzQXj2bjcmwU0X1OtKbF1SEnc14ia%2FD5M%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx