Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp499892rdb; Sat, 27 Jan 2024 17:01:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLcPNseHMd1x4Wtce1HeofIJt2sP8s1THAa+UCKW8TeOxozIckw2mjnqEEHFGhz3SqFfyN X-Received: by 2002:a05:620a:2495:b0:783:f409:801e with SMTP id i21-20020a05620a249500b00783f409801emr1364184qkn.108.1706403700785; Sat, 27 Jan 2024 17:01:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706403700; cv=pass; d=google.com; s=arc-20160816; b=IrnbH/Kst8u0le2IAr15suWUF2AKlz8va6eFxdHhJgmeLpIxFzyPXdzSAaOqA+suHS Mz+1RnhcNEOhw3PRazqu36sTNHY/vCp0L9QHabUOCRI3oKvc+8x5mc5NJWF7Mfs9Idhd 3MP7Vk1MvZHYRtUXbufqmqlJ1EpPMB8LT1A0QBurLi64HfVvmfUC4PjxFq7SZqTHWWel HlhkCd9Nr3Q/s/ZdP8aPeVaUJ6iKqebzQAEYg+Ksofi55QTib9bobJFoH5wBrjvz1+1F 3MlNP0+80LhzZb4wIFgLnDhskhFZNN1ot4CBczzRs3x+z/UA17oGmXY1i8aHTyT3L37P rvHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=Akq4ZUpGAZUPtZ9ZSl7kec9+rWKqnjhKQTKGm0D6B4E=; fh=MFpvK351Suw7cBUXHccv5J6S9DrGCAKM7Rh6qziqev8=; b=gPqRcMtpwa9DuXCtgAicYw3TwtKJ5qgXvPSIjMjfzAdLKaHJ47BUnMBPRXnyVqxJWx ofO0DJRLI+8JZP55bTqD6d+SaruTcO6AgFM9wrRAvBky21JjPoFCsNL/pX2+NEhS8+6B pbLoVfNAryjW+3PS0HSFGs9Euk1zAilQjECX8o8t8Gn3gRaAjWEnd85vgpufr4peeZ0S moFk7b2GIFyvBKu4tMrayeAMMLLxDK1/r6W9jRXVvEPNKcoomeHMOYe3W08g8t8wzWGw JNHzpN1BI0osWIfIpAUq3EyDD3laxIdmyWC1VdCmMFyr4V+jhAcQ7BxSW5JhmioTAO1P UuAQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iU3z4Mk8; 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-1720-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1720-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c22-20020a05620a201600b00783364b9feasi4616070qka.558.2024.01.27.17.01.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 17:01:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-1720-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iU3z4Mk8; 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-1720-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-1720-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 73E7F1C21682 for ; Sun, 28 Jan 2024 01:01:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2890715A4; Sun, 28 Jan 2024 01:01:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iU3z4Mk8" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) (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 5E5F11109 for ; Sun, 28 Jan 2024 01:01:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706403692; cv=none; b=YsG3MiUZvhZmhJvO8pFUZBZwb6nDCQbsHhR0RPCV58iakFS77OLOOWVm1ZnL5nVruK8ZOGPhlFD/wc4pAldY6G6o+dQeulB3PGRkuz2+z/Xv7s+PlvhnqsyM6acBCLzrwSv9qgd8ZgN1lw4IbfwfzP8gK8P1nCm3uo+yAWL9cOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706403692; c=relaxed/simple; bh=s1ktUUM3CbOPG51ADbCX7yYyhsiSqRrPySzxWGfX3cw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=uHXg3k0+mSkXu2or/YujqJzBTYahThlWf7LCtOLTVMBST+ePIp5YFudZjtElmc+2/8MG7/s8fman5aXQLxsAjXDJZ2WqO+6zbXEPVyiJVCYgPOAUa0BviIoSoBXa/fhNXKKRatZgv4C2709Ic3WNy99VTKpnI4I9mhV6u7+GaOo= 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=iU3z4Mk8; arc=none smtp.client-ip=209.85.219.179 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-yb1-f179.google.com with SMTP id 3f1490d57ef6-dc223463ee4so1909623276.2 for ; Sat, 27 Jan 2024 17:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706403690; x=1707008490; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Akq4ZUpGAZUPtZ9ZSl7kec9+rWKqnjhKQTKGm0D6B4E=; b=iU3z4Mk8LGTYyxCHw/aQclMPmjNBcd6xju8kqXbvDKIjCe792H4H12h8GKYp8Uy8d4 Rjq5Y/zOfU9cOqx5HHIFFnXUGVZHKKSTb/nNx+JmBdefMcUafRWfu+wK6eUJq41YcY34 tXVlwMIxzH+6zTm6iifdoo73zlWuLESVF6QHAa1PQLXB9RhUvrFrS3b1NjrZ+ziVn7Oy Lc86UxfxxeWlSGWmVPez6uje9gdDop/if/+xXDfjbQKocyrbUEAe1rBcEggCOTDUQypZ lZxQspP/3QGzHMRSMW95OSF8g7spAcO6QUOlEgo4ukdymr4uYOPWAYOM8u+sHJCsQcrG 79ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706403690; x=1707008490; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Akq4ZUpGAZUPtZ9ZSl7kec9+rWKqnjhKQTKGm0D6B4E=; b=eDvaFZ5tVl07GhjbPJUXF8moxtlyMWF8Za/LyMA9lAKDi4TBtSOPmNTlP3Zu+0EAtT bMyScwyKlJneYzHZiY3nomIp24zOm/DGEtWySgrzO8o2i5i24Z5bjgyHTpSCEN6R7lTx RGaIjnNdXQ1JMwqUdVuRI53Kc8aqmyrm+RvCKjCi/+7AnEy9+slnFOZrpig7rqbTRtoo CmvhOOf+ju5XTYovxT8jTmagTxRn+5x2Fj37t55ZQAJ6IB44g+lpNprAQ+aTDBfncjRH CcA5L8WH15rq+ISIwmCFNQyMczPLQaB2B8Vqa6k09STEkLOgpREPH6OkBojVGSfZ3Zvp zrNg== X-Gm-Message-State: AOJu0Yx0zr7c3rSm/G0RsCfA/CttTHE2qKUTb0TGLcynLIrBhdt7uGkG YVbp6vCFF1eu5ivEmvhafoK1SZmNOBHtpRpQjCCTtcXa1DGGQ4dFvIHzwXmX78zZKwDHJLMuZhx krrNLG6yGxEozP5nD+vIe8oKv9yENjMch7SJhdg== X-Received: by 2002:a81:6d4a:0:b0:5d7:1941:aa6 with SMTP id i71-20020a816d4a000000b005d719410aa6mr2551028ywc.65.1706403689965; Sat, 27 Jan 2024 17:01:29 -0800 (PST) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240127232436.2632187-1-quic_gaurkash@quicinc.com> <20240127232436.2632187-16-quic_gaurkash@quicinc.com> In-Reply-To: <20240127232436.2632187-16-quic_gaurkash@quicinc.com> From: Dmitry Baryshkov Date: Sun, 28 Jan 2024 03:01:18 +0200 Message-ID: Subject: Re: [PATCH v4 15/15] arm64: dts: qcom: sm8550: add hwkm support to ufs ice To: Gaurav Kashyap Cc: linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, andersson@kernel.org, ebiggers@google.com, neil.armstrong@linaro.org, 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_omprsing@quicinc.com, 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 Content-Type: text/plain; charset="UTF-8" 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. > + qcom,ice-use-hwkm; > clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>; -- With best wishes Dmitry