All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
@ 2021-03-31 14:02 ` Dmitry Baryshkov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2021-03-31 14:02 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, Jonathan Marek
  Cc: Stephen Boyd, David Airlie, Daniel Vetter, linux-arm-msm,
	dri-devel, freedreno, Akhil P Oommen, Jordan Crouse

I suppose the microcode version check for a650 is incorrect. It checks
for the version 1.95, while the firmware released have major version of 0:
0.91 (vulnerable), 0.99 (fixing the issue).

Lower version requirements to accept firmware 0.99.

Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
Cc: Akhil P Oommen <akhilpo@codeaurora.org>
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index cb2df8736ca8..896b47dc9c85 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
 	}  else {
 		/*
 		 * a650 tier targets don't need whereami but still need to be
-		 * equal to or newer than 1.95 for other security fixes
+		 * equal to or newer than 0.95 for other security fixes
 		 */
 		if (adreno_is_a650(adreno_gpu)) {
-			if ((buf[0] & 0xfff) >= 0x195) {
+			if ((buf[0] & 0xfff) >= 0x095) {
 				ret = true;
 				goto out;
 			}
 
 			DRM_DEV_ERROR(&gpu->pdev->dev,
 				"a650 SQE ucode is too old. Have version %x need at least %x\n",
-				buf[0] & 0xfff, 0x195);
+				buf[0] & 0xfff, 0x095);
 		}
 
 		/*
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
@ 2021-03-31 14:02 ` Dmitry Baryshkov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2021-03-31 14:02 UTC (permalink / raw)
  To: Rob Clark, Sean Paul, Jonathan Marek
  Cc: Stephen Boyd, linux-arm-msm, Akhil P Oommen, dri-devel,
	David Airlie, Jordan Crouse, freedreno

I suppose the microcode version check for a650 is incorrect. It checks
for the version 1.95, while the firmware released have major version of 0:
0.91 (vulnerable), 0.99 (fixing the issue).

Lower version requirements to accept firmware 0.99.

Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
Cc: Akhil P Oommen <akhilpo@codeaurora.org>
Cc: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index cb2df8736ca8..896b47dc9c85 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
 	}  else {
 		/*
 		 * a650 tier targets don't need whereami but still need to be
-		 * equal to or newer than 1.95 for other security fixes
+		 * equal to or newer than 0.95 for other security fixes
 		 */
 		if (adreno_is_a650(adreno_gpu)) {
-			if ((buf[0] & 0xfff) >= 0x195) {
+			if ((buf[0] & 0xfff) >= 0x095) {
 				ret = true;
 				goto out;
 			}
 
 			DRM_DEV_ERROR(&gpu->pdev->dev,
 				"a650 SQE ucode is too old. Have version %x need at least %x\n",
-				buf[0] & 0xfff, 0x195);
+				buf[0] & 0xfff, 0x095);
 		}
 
 		/*
-- 
2.30.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
  2021-03-31 14:02 ` Dmitry Baryshkov
@ 2021-03-31 15:07   ` Rob Clark
  -1 siblings, 0 replies; 7+ messages in thread
From: Rob Clark @ 2021-03-31 15:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Sean Paul, Jonathan Marek, Stephen Boyd, David Airlie,
	Daniel Vetter, linux-arm-msm, dri-devel, freedreno,
	Akhil P Oommen, Jordan Crouse

fixing Jordan's email so he actually sees this

On Wed, Mar 31, 2021 at 7:02 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> I suppose the microcode version check for a650 is incorrect. It checks
> for the version 1.95, while the firmware released have major version of 0:
> 0.91 (vulnerable), 0.99 (fixing the issue).
>
> Lower version requirements to accept firmware 0.99.
>
> Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
> Cc: Akhil P Oommen <akhilpo@codeaurora.org>
> Cc: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index cb2df8736ca8..896b47dc9c85 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
>         }  else {
>                 /*
>                  * a650 tier targets don't need whereami but still need to be
> -                * equal to or newer than 1.95 for other security fixes
> +                * equal to or newer than 0.95 for other security fixes
>                  */
>                 if (adreno_is_a650(adreno_gpu)) {
> -                       if ((buf[0] & 0xfff) >= 0x195) {
> +                       if ((buf[0] & 0xfff) >= 0x095) {
>                                 ret = true;
>                                 goto out;
>                         }
>
>                         DRM_DEV_ERROR(&gpu->pdev->dev,
>                                 "a650 SQE ucode is too old. Have version %x need at least %x\n",
> -                               buf[0] & 0xfff, 0x195);
> +                               buf[0] & 0xfff, 0x095);
>                 }
>
>                 /*
> --
> 2.30.2
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
@ 2021-03-31 15:07   ` Rob Clark
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Clark @ 2021-03-31 15:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jonathan Marek, Stephen Boyd, linux-arm-msm,
	Akhil P Oommen, dri-devel, Jordan Crouse, David Airlie,
	Sean Paul

fixing Jordan's email so he actually sees this

On Wed, Mar 31, 2021 at 7:02 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> I suppose the microcode version check for a650 is incorrect. It checks
> for the version 1.95, while the firmware released have major version of 0:
> 0.91 (vulnerable), 0.99 (fixing the issue).
>
> Lower version requirements to accept firmware 0.99.
>
> Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
> Cc: Akhil P Oommen <akhilpo@codeaurora.org>
> Cc: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index cb2df8736ca8..896b47dc9c85 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
>         }  else {
>                 /*
>                  * a650 tier targets don't need whereami but still need to be
> -                * equal to or newer than 1.95 for other security fixes
> +                * equal to or newer than 0.95 for other security fixes
>                  */
>                 if (adreno_is_a650(adreno_gpu)) {
> -                       if ((buf[0] & 0xfff) >= 0x195) {
> +                       if ((buf[0] & 0xfff) >= 0x095) {
>                                 ret = true;
>                                 goto out;
>                         }
>
>                         DRM_DEV_ERROR(&gpu->pdev->dev,
>                                 "a650 SQE ucode is too old. Have version %x need at least %x\n",
> -                               buf[0] & 0xfff, 0x195);
> +                               buf[0] & 0xfff, 0x095);
>                 }
>
>                 /*
> --
> 2.30.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
  2021-03-31 14:02 ` Dmitry Baryshkov
@ 2021-04-01 19:07   ` Jordan Crouse
  -1 siblings, 0 replies; 7+ messages in thread
From: Jordan Crouse @ 2021-04-01 19:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Rob Clark, Sean Paul, Jonathan Marek, Stephen Boyd,
	linux-arm-msm, Akhil P Oommen, dri-devel, David Airlie,
	Jordan Crouse, freedreno

On Wed, Mar 31, 2021 at 05:02:23PM +0300, Dmitry Baryshkov wrote:
> I suppose the microcode version check for a650 is incorrect. It checks
> for the version 1.95, while the firmware released have major version of 0:
> 0.91 (vulnerable), 0.99 (fixing the issue).
> 
> Lower version requirements to accept firmware 0.99.

Ugh, my ugly.  .95 is the actual version that fixed it but since .99 is what is
going into the l-f repo it is fine to use that as a baseline.

Acked-by: Jordan Crouse <jordan@cosmicpenguin.net>


> Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
> Cc: Akhil P Oommen <akhilpo@codeaurora.org>
> Cc: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index cb2df8736ca8..896b47dc9c85 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
>  	}  else {
>  		/*
>  		 * a650 tier targets don't need whereami but still need to be
> -		 * equal to or newer than 1.95 for other security fixes
> +		 * equal to or newer than 0.95 for other security fixes
>  		 */
>  		if (adreno_is_a650(adreno_gpu)) {
> -			if ((buf[0] & 0xfff) >= 0x195) {
> +			if ((buf[0] & 0xfff) >= 0x095) {
>  				ret = true;
>  				goto out;
>  			}
>  
>  			DRM_DEV_ERROR(&gpu->pdev->dev,
>  				"a650 SQE ucode is too old. Have version %x need at least %x\n",
> -				buf[0] & 0xfff, 0x195);
> +				buf[0] & 0xfff, 0x095);
>  		}
>  
>  		/*
> -- 
> 2.30.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
@ 2021-04-01 19:07   ` Jordan Crouse
  0 siblings, 0 replies; 7+ messages in thread
From: Jordan Crouse @ 2021-04-01 19:07 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: freedreno, Jordan Crouse, Jonathan Marek, Stephen Boyd,
	linux-arm-msm, Akhil P Oommen, dri-devel, David Airlie,
	Sean Paul

On Wed, Mar 31, 2021 at 05:02:23PM +0300, Dmitry Baryshkov wrote:
> I suppose the microcode version check for a650 is incorrect. It checks
> for the version 1.95, while the firmware released have major version of 0:
> 0.91 (vulnerable), 0.99 (fixing the issue).
> 
> Lower version requirements to accept firmware 0.99.

Ugh, my ugly.  .95 is the actual version that fixed it but since .99 is what is
going into the l-f repo it is fine to use that as a baseline.

Acked-by: Jordan Crouse <jordan@cosmicpenguin.net>


> Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
> Cc: Akhil P Oommen <akhilpo@codeaurora.org>
> Cc: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index cb2df8736ca8..896b47dc9c85 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -567,17 +567,17 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,
>  	}  else {
>  		/*
>  		 * a650 tier targets don't need whereami but still need to be
> -		 * equal to or newer than 1.95 for other security fixes
> +		 * equal to or newer than 0.95 for other security fixes
>  		 */
>  		if (adreno_is_a650(adreno_gpu)) {
> -			if ((buf[0] & 0xfff) >= 0x195) {
> +			if ((buf[0] & 0xfff) >= 0x095) {
>  				ret = true;
>  				goto out;
>  			}
>  
>  			DRM_DEV_ERROR(&gpu->pdev->dev,
>  				"a650 SQE ucode is too old. Have version %x need at least %x\n",
> -				buf[0] & 0xfff, 0x195);
> +				buf[0] & 0xfff, 0x095);
>  		}
>  
>  		/*
> -- 
> 2.30.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode
  2021-03-31 14:02 ` Dmitry Baryshkov
                   ` (2 preceding siblings ...)
  (?)
@ 2021-05-26 19:03 ` patchwork-bot+linux-arm-msm
  -1 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-05-26 19:03 UTC (permalink / raw)
  To: Dmitry Baryshkov; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Wed, 31 Mar 2021 17:02:23 +0300 you wrote:
> I suppose the microcode version check for a650 is incorrect. It checks
> for the version 1.95, while the firmware released have major version of 0:
> 0.91 (vulnerable), 0.99 (fixing the issue).
> 
> Lower version requirements to accept firmware 0.99.
> 
> Fixes: 8490f02a3ca4 ("drm/msm: a6xx: Make sure the SQE microcode is safe")
> Cc: Akhil P Oommen <akhilpo@codeaurora.org>
> Cc: Jordan Crouse <jcrouse@codeaurora.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> 
> [...]

Here is the summary with links:
  - drm/msm: a6xx: fix version check for the A650 SQE microcode
    https://git.kernel.org/qcom/c/6ddbfa1f5adb

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-26 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 14:02 [PATCH] drm/msm: a6xx: fix version check for the A650 SQE microcode Dmitry Baryshkov
2021-03-31 14:02 ` Dmitry Baryshkov
2021-03-31 15:07 ` Rob Clark
2021-03-31 15:07   ` Rob Clark
2021-04-01 19:07 ` Jordan Crouse
2021-04-01 19:07   ` Jordan Crouse
2021-05-26 19:03 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.