Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp189317rdb; Thu, 1 Feb 2024 06:03:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYxlZMLRJCye0RGJD9QYIGdBvnqH28qRdFnbjvXOWEGBnO42f9ij6FjDXl2uR2Ue92Qrdd X-Received: by 2002:a05:6808:1881:b0:3be:2ceb:fae0 with SMTP id bi1-20020a056808188100b003be2cebfae0mr5672303oib.6.1706796224643; Thu, 01 Feb 2024 06:03:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706796224; cv=pass; d=google.com; s=arc-20160816; b=WZcMCW209fIJ/AAjQMzVQFEjBosuBfPrw6BaycS1VST3+TJtn0beGJAx+IPy1J5a2P zkKkRWhRkJIMnyUtEEEYbmye+8k3CTMTE4khhdtU7AF06GPBMIxErjnRZW3Tv45BXxqM WxuBgK0KFFYg81wpmfdsJFedMOfiYR2TGYd25lMiwNPOzQJtiTc8AA0IcOMltslDQlkY Xd2zgKTb+pfr3iMmfx81dSuwi5n+ZygLDIq6YopsaGheSHTUYaqMPKrrNLgOkdEU+VWY QKtVxc+Wmrtk6CXhOXf+Inp7fwhNx8IxoKMnrI0aGN5H28DqTjDTiiGRRbvwTeD7DKy4 w7Zw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=UFqKBFx9916FRrB9+w9LQlnhGJJKgZ+US7vE7hHv4do=; fh=fhwoM6RjC1nTJ20oH7LCnscg8thh5iD0mL1k5hCBnfE=; b=ruLO4yHA1l6EnxR2RsIplmuLXSm2qdyrTHK1bOjiQtnqF9cRngtphU6VWKktySe+uU 6RbmaBZGCtYk/G8D8QMQ9UMFHljBGTTGEyusRtDv2J7F4rai01Bhmk71MCxVUfHEfM29 KBPLucPnPYw64fG4a1nMfZzUh5MFuquiy+qNMldpO/KnUlNhYd5mXQD1bS7jWlZ8nUNY wqbxJTyKu1uoxoxQZDMSWXKWSFcJYq0+JZte/YG9pPaCde+twcJ0qEjSfFYm2juzTPI7 uTLvmQo8vQaDq15LAWMVUuzAxW4B651cbMNNB1JqqK8fn3YHndmI2Rstkln0PRNUXht7 cgMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YjjTvuXz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-crypto+bounces-1777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1777-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWvLxSru+mns2Ck0UUV/PkeOX43HCCRFFo50gc7NPsFbZzjSpfZMzzu7c/xkHBRuyUgxdxDQX1OnOGuMLZZGmZARCfW4xvYxQkGwIB3tQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h23-20020aca1817000000b003bb6f3cf02bsi4327362oih.243.2024.02.01.06.03.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 06:03:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YjjTvuXz; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-crypto+bounces-1777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1777-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0DAE728C239 for ; Thu, 1 Feb 2024 13:59:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAC4D5D474; Thu, 1 Feb 2024 13:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YjjTvuXz" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6CD65D468 for ; Thu, 1 Feb 2024 13:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706795980; cv=none; b=RJBQsZc8lfWslQ02f1Nk3XFs1WYjirYbMYInr/p0bHRTkt+pqknDSnSctjvr58OI5EpVGwsdhhRmuHrZwL7yDliOtmGB6PxktsBTEPhM2cHgGogWK0h647vXtlP2adaokH8nmn+0ztiNnRVyJYrA2XX6hSBrsStIf+CHDLD54XI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706795980; c=relaxed/simple; bh=/TanjX0ls+2d9VS5aORID8aw8bmRlMZB4HWbPt8Yr6c=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=jIAdBCKQt3fCc9j7ppx/I6P4hWcndF7Gl5Cdmqn4QaMAVfHEfQC01qDHoBCV/9WmtcAk5TpXMVKkmEK92t/AwJ8Dn9YzQoRJTq9tCCCzO9/35WM+b/KMfi6t9rkiJnUbdXDUHZyEfj/E6Cy+Yx45vtjm0/u77htAFbHZtxIkC9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=YjjTvuXz; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-5112a04c7acso1451008e87.3 for ; Thu, 01 Feb 2024 05:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706795977; x=1707400777; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=UFqKBFx9916FRrB9+w9LQlnhGJJKgZ+US7vE7hHv4do=; b=YjjTvuXzdEvtvxdT+n30v9T1Bxi69nC/ngLKeAubcU15Sd2BPTj54JDByBZgEfavO6 H4ls83yQPhtlQikepIeKWooNfEeorPJfi6Ai/YeEVIRWM0oP5/yi7RBSxY/jUki8kJik xSTXw6mmw/2m2fOFYTOyyHz+EztJYMZZE/NrhG9jkS32SRlSyey7nnP9YsBJSPeocBgf F13nJHlZUVkD8K0THHq+MnG8NQpZNJ8opAhmWkShMkmLSyldq44+djgXu7Ic7zcXBMg6 loiI4csUx4Cb/shM1wjvgB1YtzHQAgGlnLIOH3Z12el/QWLuYrLdUzcnFNYBVX6uRZ4O W87A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706795977; x=1707400777; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=UFqKBFx9916FRrB9+w9LQlnhGJJKgZ+US7vE7hHv4do=; b=go1x9dxKLnmwxINQ0NjXFXHfzriuypSJmPXhsMnWYQSMpyqNAfvSrMp/xXhW3zPeX9 8UuYUpb8fn3h64d4ILMxKVLPqXrMAWu1qVzTBru5Jeh5CZn7ZuQi7uCEtKKXSrdEdGG8 ejcqOrl0fJI8ejn1qZetPQNk3kvkEjyMAYk1mmA2h4IDE7NljeB6w7B2etRMI7C1MxY7 XKs9bFLpU4SM4KnpyAGJ/slvmOgTiXQk1JTgMrEE9d4Zt6j3HoGOSSDw6GyVt0uQa/zt f7UEzOiDaPRYm3qhS/v1ojs/GDftTJHhl/xJZYSYHv2SjETU5stgxzUN3vBeXqHjP9xr zGuA== X-Gm-Message-State: AOJu0YyULPuCAduIMebj/1rtopATXb9te3i5c6XIUS4Zpp6zjMpL7LwF adGmJ/Hryvh03ZcyogWot42NXkFxNjDgHaN8CYYf/f+HKApagI6x6BeBHU9DqeI= X-Received: by 2002:a05:651c:1cd:b0:2d0:6eff:6e38 with SMTP id d13-20020a05651c01cd00b002d06eff6e38mr3795058ljn.39.1706795976622; Thu, 01 Feb 2024 05:59:36 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCWLyIsxBDsE2B0dXMqRm6wtczTF1NBWRF64AAabsGaeRxyluNS74tM2RaiEMGm4qoqoU3xyTBZ1/fJkF4yGNhKI2PfuFFiFV+ul/a54NxGlLAxUtedGYwTUMPTx1aBRdivipMHqtSLysUCQAB2+HPccvJIR1zB/gqwphNd18UbpeXg5rSLKhrmtwZaBjVoPDsY3JNs0y1zhbSCPx6kussx3h1mD/uDYtoGot5E77YSwyYqB8Ifkgt9XfSs2b4LWdpJmA9LHk6YdhvuKMJEcofiTXARMhsoWjUCUSkKBgitCe1GtfYhW6gNmbu0J2Ij0RFJW/Ay1aJCKAIomdPPSynzslKP2GfFpmZOEcjOd5Ivd9dCLQv7irwf0eUM0/Fp2jXvuUy1CpDt9o+rZah+NZ9rEaUs33MjQJZg6FpK0fAcNLJOTodZ0bnlq3FfVvjIaogm92Hn5/37sqPT4SwtxzgfFlZ9Pwx7kjhgK55m1NHg+ouqOjmaYoMWEgGYPKxPsgiI2koPdqdPgylRWAp/Ro5uZG9ZxDGbhUgXUoajoEftShAnwEkbDlpDqN7xSJQhqfIA4B44i6BIP9dcYKt7fB6/5sIMDsVy8Gt+8XFqVnBYI2IckbnuCsLHxgZSGiKpsbchlvG+wbPYJEe0/h+6ZSpwA+Pg9/8fJvvMbgJgMTem3u+U//6YkYgCrpn5q5iv41XN7MApiVIkqNIto7g9Xi92yjXZS1OMJgWF0LyMhAj2Ps9JoCYZ0FKL5/jRgAMsCUHVT8J5J1OIcjMqaUzLoea6Okwi1ja7anEi1NAw+yNGv1bD5YLVjKGzGirxmcb03rIxFvVY46vMqaATZ8OakPS8= Received: from ?IPV6:2a01:e0a:982:cbb0:cfdd:eab5:fd8:5436? ([2a01:e0a:982:cbb0:cfdd:eab5:fd8:5436]) by smtp.gmail.com with ESMTPSA id bh23-20020a05600c3d1700b0040d5a9d6b68sm4533841wmb.6.2024.02.01.05.59.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Feb 2024 05:59:36 -0800 (PST) Message-ID: <24dbe013-60d2-49dc-8568-3277d721366d@linaro.org> Date: Thu, 1 Feb 2024 14:59:34 +0100 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v4 15/15] arm64: dts: qcom: sm8550: add hwkm support to ufs ice Content-Language: en-US, fr To: Om Prakash Singh , Dmitry Baryshkov , Gaurav Kashyap Cc: linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, andersson@kernel.org, ebiggers@google.com, srinivas.kandagatla@linaro.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, kernel@quicinc.com, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, quic_nguyenb@quicinc.com, bartosz.golaszewski@linaro.org, konrad.dybcio@linaro.org, ulf.hansson@linaro.org, jejb@linux.ibm.com, martin.petersen@oracle.com, mani@kernel.org, davem@davemloft.net, herbert@gondor.apana.org.au References: <20240127232436.2632187-1-quic_gaurkash@quicinc.com> <20240127232436.2632187-16-quic_gaurkash@quicinc.com> Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwX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Developer Services In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 01/02/2024 10:55, Om Prakash Singh wrote: > > > On 1/28/2024 6:31 AM, Dmitry Baryshkov wrote: >> On Sun, 28 Jan 2024 at 01:28, Gaurav Kashyap wrote: >>> >>> The Inline Crypto Engine (ICE) for UFS/EMMC supports the >>> Hardware Key Manager (HWKM) to securely manage storage >>> keys. Enable using this hardware on sm8550. >>> >>> This requires two changes: >>> 1. Register size increase: HWKM is an additional piece of hardware >>>     sitting alongside ICE, and extends the old ICE's register space. >>> 2. Explicitly tell the ICE driver to use HWKM with ICE so that >>>     wrapped keys are used in sm8550. >>> >>> NOTE: Although wrapped keys cannot be independently generated and >>> tested on this platform using generate, prepare and import key calls, >>> there are non-kernel paths to create wrapped keys, and still use the >>> kernel to program them into ICE. Hence, enabling wrapped key support >>> on sm8550 too. >>> >>> Signed-off-by: Gaurav Kashyap >>> --- >>>   arch/arm64/boot/dts/qcom/sm8550.dtsi | 3 ++- >>>   1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi >>> index ee1ba5a8c8fc..b5b41d0a544c 100644 >>> --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi >>> +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi >>> @@ -1977,7 +1977,8 @@ ufs_mem_hc: ufs@1d84000 { >>>                  ice: crypto@1d88000 { >>>                          compatible = "qcom,sm8550-inline-crypto-engine", >>>                                       "qcom,inline-crypto-engine"; >>> -                       reg = <0 0x01d88000 0 0x8000>; >>> +                       reg = <0 0x01d88000 0 0x10000>; >> >> Does the driver fail gracefully with the old DT size? At least it >> should not crash. > When adding  qcom,ice-use-hwkm property, DT size needs to be updated. > Without any DT change, there will be know issue. This must be fixed in the code because new kernels could be run with older DTs, so it should not fail with older DTs. In this case, simply disable the HWKM if size from DT is too small. Neil > >> >>> +                       qcom,ice-use-hwkm; >>>                          clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>; >>