From nobody Sat Nov 23 21:03:04 2024 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2075.outbound.protection.outlook.com [40.107.22.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A8DF19AD93 for ; Mon, 11 Nov 2024 12:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.75 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731327061; cv=fail; b=DYnM5ijTIvQIlvfoD2HjBehnbnXmaVAsW287lASTA7h95d/7dz4reETw12rddm+lbslp/8jwDbBqDfYsE37ZpYZ+Pg7f48ZNi5u5ay6d4YrqtCzxrW3pZBt6cT9Ci9OMiK47zi8uqIia3ONuDokVYoALqf9hOu5KK05Fp3wSqpg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731327061; c=relaxed/simple; bh=RUB4zyGxfIayHq3XuknMTd7GF//9SnsSrvMTUKZzAl8=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=R1ex52aeTswe8to4Yg/HN/KNlirmo0p5qMgVsP5yLVzIeb1lEOjZ5vFj3/m+ma4ZPSsc3gletcXbWk8H0r4D5/ijSD4U9ZGI8imFYrK6DF2cFzEPbocBTfh++sueZbIHHsXr1M0APg7axVEiZI8sYPIS9yBmF9XxbMMambH8FRk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=kt5B2CzG; arc=fail smtp.client-ip=40.107.22.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="kt5B2CzG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iyitdykz1K1SZYlnO9HS5eRUO71Jlb4NN4E4wldr3u/SaeYX6l5TX/H4S6CFadvpHMurWbvHqFMKW33fGekIibejS4jjJhL1pxZZT6BsFybfm5fyaTmajlYGtYH5D+pKaAAVkR3iulU8RUJVyZkLP774QHxyWSTMIq3RtV3GTFvwpTy+EAysKsGaDdtTsZz0D9nPdZ4ZktBu+Bm67KTkyxCZVeolm8yore95WV3Dy+Kkf6A9Ng+joxGyFp6MFwSre5N4RlbGU3RjCKqUnj20sIuMCRpH3cj1j9bZ/4T1uD39/Hiiknx1NUarEwdP69Iq6bI2EemTrXaWSoUcxvzBpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ieqSFTh4KeBwa53tpwp0iUAhMivK7HpaO5ro7AW5n08=; b=l0xZOfkG8B1Toczb0IXZZjyYgshL/KmbzxiyfuWwrrlMU17nYUZ6m9Fx/UYSzUYKJt5Kx52IfCEkkugmGYOheZ9mkhnwzQMrJv4Gim5NACkR2RDBkFZhj6KQcg+ecoXORRtTURZJC9F9WirfV60xPRoSxu8nSnEC7dRC+0b/l0h1zews1aBGfTtjZ/IYDRcqFg7QZhvOhIUpIjvf6mqhbN38Rjz3nHbVDoKFii3FEA40ETP6foOW8QtySb/cr1wCRqW1Cm5ormhSJhuw1TvvjMHb7pFMmbv9v4X9Io5f0IGorZrlDcVnmJKDHZRKfpFnI4UrcCI7kofzpSqAAQDaLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ieqSFTh4KeBwa53tpwp0iUAhMivK7HpaO5ro7AW5n08=; b=kt5B2CzGNMM1JX0ahl2qeMtft50xC8LhqLwC4Ly5z5QOgBR093HqfZn1wOd2L4wTFOfORPKKDUedM50mz2YmnbTqkexMdQE3lNm2iAcUypxwHGt2PIi/AeOIankqAI34UsDIAW7Eixzi9DX+DLqKDYZkwcyXNg4wDy67qRHpzD+qReVtYhGkbE4HFZhCoKXHyj0vVXjXbzFggirqWTzRYB1zWGHcyMfa5veFXD1EDnKBdNmryvfNpweEHU2JPAkGIXWt9tmwA84w6EAHYTgfOTqFW4BluT6fGnLQfYpbNCuc9aO4rINrWRLdAmnGsyF0H1j/TV9aAwVTuYJADUlC6w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB8409.eurprd04.prod.outlook.com (2603:10a6:10:244::6) by DU2PR04MB8776.eurprd04.prod.outlook.com (2603:10a6:10:2e3::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 12:10:56 +0000 Received: from DB9PR04MB8409.eurprd04.prod.outlook.com ([fe80::1436:d8ba:25b8:1637]) by DB9PR04MB8409.eurprd04.prod.outlook.com ([fe80::1436:d8ba:25b8:1637%3]) with mapi id 15.20.8137.027; Mon, 11 Nov 2024 12:10:56 +0000 From: Gaurav Jain To: =?UTF-8?q?Horia=20Geant=C4=83?= , Pankaj Gupta , Herbert Xu , "David S . Miller" , Silvano Di Ninno , Varun Sethi , Meenakshi Aggarwal , Sahil Malhotra , Nikolaus Voss , Ahmad Fatoum Cc: =linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Gaurav Jain Subject: [PATCH] crypto: caam - use JobR's space to access page 0 regs Date: Mon, 11 Nov 2024 17:40:20 +0530 Message-Id: <20241111121020.4013077-1-gaurav.jain@nxp.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SI2PR01CA0003.apcprd01.prod.exchangelabs.com (2603:1096:4:191::16) To DB9PR04MB8409.eurprd04.prod.outlook.com (2603:10a6:10:244::6) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB8409:EE_|DU2PR04MB8776:EE_ X-MS-Office365-Filtering-Correlation-Id: db1d0de1-0024-4e85-5a03-08dd0249e53e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?h96KtEWr5oSox34uxeMUuPCkdFJHaJ3d3xHRXH1cQHHKzt299cu2GvUz0xVw?= =?us-ascii?Q?tr0pA+uZliQhcIvv7X+VSs7T2rigMk0y7sMJfh4Atntrk4TGxN1JxZBQPvDb?= =?us-ascii?Q?fEfxRUusfRgJd2HIhY9eTqp6bBL0F57vVLNLd2p+xji1S+TJL1STcLHLgE6I?= =?us-ascii?Q?SOkFH9iW+Mnz1VhlzCe1YVO6/wJh1/1l1Dtup+GOXpQOzQPwJRVq5T232ZQZ?= =?us-ascii?Q?LNhC/3zW7qlvUmxwljaFJkTOMOBJAYYjc/a2pVfFA1HvmjOY/56UejuhlsNN?= =?us-ascii?Q?ZbpxKhS1R7NWdkFNh5KEySpXKhrnHZxcUNnpGOglnZEr8Hu3jLDtUJ7cLiwA?= =?us-ascii?Q?eDBZCTZRsjv7BDeyYoKoiuUIIjti+6TAtn8bZJ32+qpB9Sz2ipmaZ3ZU0Vn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w5+8Sg96HrsocGhomKA6/7BvKNX+AdmhSFYuBz?= =?us-ascii?Q?mnYlTyRnSofAE+MhBpdcnF5G+CL5OYGZPTmcB9s62RXZjRikgwp+tPfL3MB/?= =?us-ascii?Q?xg/Lbh0CRAvnKwVCj2iZUn4m0M5z?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB8409.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Qs+6uFA7gXgcVQwPCwQIS7dWYeKOQN9n0Tjy82cLXN4vExJRaiq4ATAh1ynf?= =?us-ascii?Q?IKdHgDDaUwkzlKFzZ1B6Iik4owFvyfq0PF2Kd4bKjKmRjoMgmjSt5Li+YeEz?= =?us-ascii?Q?pxXXVHXoK0AtEjnhES3ndC1E3IpCUWeGSKxzi2DN28SvlTbe9RaMQU8qKDNs?= =?us-ascii?Q?p8mCXtH62njRldBdtLmqesKy0wNo9+Lzz4wUNw+vCHYVrkZt0Lm6so7O1vh4?= =?us-ascii?Q?RPB24bMEwEwSb75tSkYpZzpyunUn1uBKyispy4gNMid/NJUiO/683EYaKrkW?= =?us-ascii?Q?PE+AZfJTBxnMF9iVGflDiwo2rhKCjsHR8nLBrCm1cnqUDwc3aM8tybStEC3k?= =?us-ascii?Q?e4nBWC1gN4XX9rrR92tRLIZS9hQ3IIpLlTPjdTzI1NePeJMUu7sgoi3aAXDu?= =?us-ascii?Q?HyqCE372lVks9xNVSdEweH3FIK++keYCG9tvBG/R/f0En8oP1bZFg7we9uYS?= =?us-ascii?Q?Rw3Tu46WtjfQahOur1FNGt8j6dvHhQipBSpOqwhO/hZ/X5yz3OvSkSRNW5FV?= =?us-ascii?Q?gC5Kg9oDr/AdP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aymg3?= =?us-ascii?Q?ZEKPiKUt079xcf2Z8VKWJAjx4g7hV8pY/akPkgWXjn0btHQr8qtKAa1JhYnM?= =?us-ascii?Q?cA7aJSVyKqLMd+RRjiHoZ+k6qXFkH4qhTNqiqCjsSwev/gCEYI7TTplgmp+7?= =?us-ascii?Q?NRIuiX4/X+s5JqRvlmeoDqTDO0vfeyFFEr2vhfQd?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: db1d0de1-0024-4e85-5a03-08dd0249e53e X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB8409.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 12:10:56.1957 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: I2wH8UCv1NkNDdCsRyGd2km077pKDQvCIgcto+hEuAsDbnYUjNn3ROQMJhTcDdpNBcl2rZpN5vf9CmHyHCORFA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8776 Content-Type: text/plain; charset="utf-8" Access to controller region is not permitted. use JobR's register space to access page 0 registers. Fixes: 6a83830f649a ("crypto: caam - warn if blob_gen key is insecure") Signed-off-by: Gaurav Jain --- drivers/crypto/caam/blob_gen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/caam/blob_gen.c b/drivers/crypto/caam/blob_gen.c index 87781c1534ee..079a22cc9f02 100644 --- a/drivers/crypto/caam/blob_gen.c +++ b/drivers/crypto/caam/blob_gen.c @@ -2,6 +2,7 @@ /* * Copyright (C) 2015 Pengutronix, Steffen Trumtrar * Copyright (C) 2021 Pengutronix, Ahmad Fatoum + * Copyright 2024 NXP */ =20 #define pr_fmt(fmt) "caam blob_gen: " fmt @@ -104,7 +105,7 @@ int caam_process_blob(struct caam_blob_priv *priv, } =20 ctrlpriv =3D dev_get_drvdata(jrdev->parent); - moo =3D FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status)); + moo =3D FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->jr[0]->perfmon.status)); if (moo !=3D CSTA_MOO_SECURE && moo !=3D CSTA_MOO_TRUSTED) dev_warn(jrdev, "using insecure test key, enable HAB to use unique device key!\n"); --=20 2.25.1