From patchwork Mon Apr 12 08:41:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 419523 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1572676jaj; Mon, 12 Apr 2021 02:18:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2aJF2LtpeyMEQgE9ihPV6ErkYNrTJ8kMASzXqtJbFQE1PgrS4fkY2q8p6RJEtM6GxZ1Ia X-Received: by 2002:a17:90a:e501:: with SMTP id t1mr26910433pjy.203.1618219136079; Mon, 12 Apr 2021 02:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618219136; cv=none; d=google.com; s=arc-20160816; b=DXcYFF9B5GvftljjwYHyWSZf5VfPd0FrU0ZufJKBNKcd4AiSO9WhH6u7iFpbX6RGkf Fs9b5KROTqiCMgNF0wUcqGLrzx533tmLk9Iq+PZz7YInAqrc7gjGv/jDG8Doly8WwWtf ivmeducO590wUWT33KdkZ7WMJtgIxZNJ4W5nzhgZetHKXb/1Hf3iwzNc0y+Rjq7y4i/P kybEJ37G4W3KOzbQ2c0Gjp8MUtotbRdgLS3fK8vKgBe32L0wIm4e8rVti4cec6OdMTdf 19RuleDqkOjKULAE0fNFP0jKGlm82exnOEZowT00Xfm2hrUmZ7DvBq6uc3zNxbXSzVtw Eh2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+lijSU4SFDk5fOcttArdWMiaa/FFKy2VL70ID5Lo/rs=; b=i9HYGrtAix91IeXptTPmr2wwZmm3jpXer9dUgtwpJvmTmLuHpa0b0E5AJB5LtsvNe9 eNOpDSORztDpV5Hc5waAfd/NKbIRBiGgV/ZBBWM/IYBstRP8MfFs2apCzVnZa/OLJlRP 4DgxyfOqLlYaOJzJ1PiCVqylk+lXbRfHGZvPtqdt4Z2HmABD5hgsTIAFne0VGzbqAT99 cJsWIjSuHUte3i8cB0ITLEtcc2RotNyauozAbINeMeJQ8qMd61ar1TS5atK3hTrLyTp1 taFRCyXj+Mqoi1Ta/eenhDJw0iWsribRguEeXZA3VIhueSnE6YFOxrRqRACRXvl57IOG j2BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hAd5GkfL; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si12368322pga.317.2021.04.12.02.18.55; Mon, 12 Apr 2021 02:18:56 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hAd5GkfL; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241322AbhDLJPb (ORCPT + 12 others); Mon, 12 Apr 2021 05:15:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:34724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240466AbhDLJKT (ORCPT ); Mon, 12 Apr 2021 05:10:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5EE7261286; Mon, 12 Apr 2021 09:05:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218341; bh=Uml8lBs8mbcuKsNkLY6GOCN37CVSsJZ9u0Cfl7oZalI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hAd5GkfLViI6HsKGOIzv48pcGDHqHvPz1Ed1zf7pEqMshbwEfPloP3tiLcarmUTul HC38nRx2Blx0blkgblhDr+YPBZFShuNzwpQqPPYR4qH9wta47VqISwR8A8OCVhA+T7 ISvwl2kQNFSOUrPWoaRiTowQ4Mfo2QJV3aF+IR3A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Akhil P Oommen , Jordan Crouse , Dmitry Baryshkov , Jordan Crouse , Rob Clark , Sasha Levin Subject: [PATCH 5.11 160/210] drm/msm: a6xx: fix version check for the A650 SQE microcode Date: Mon, 12 Apr 2021 10:41:05 +0200 Message-Id: <20210412084021.346978935@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dmitry Baryshkov [ Upstream commit 6ddbfa1f5adbd5dea14ff66778ca58257f09f17d ] 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 Cc: Jordan Crouse Signed-off-by: Dmitry Baryshkov Acked-by: Jordan Crouse Message-Id: <20210331140223.3771449-1-dmitry.baryshkov@linaro.org> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.30.2 diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index e7a8442b59af..a676811ef69d 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -566,17 +566,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); } /*