From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 3B1DC3546EC for ; Fri, 31 Jul 2026 06:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785478074; cv=none; b=pM6Qe+5w0+giscUplJ14xTv+bvO9xuaMsSMu5FVwAuF0h5V66BikWuFY4ipSxr12xDmhhoq09ewm3Goye0ubA9LJi8imEWhgZSlMTYa4ismwDLbEgg/gUdnpORTWA6lMj4o9YKNh9gFbi6YOQV4ka/lyEziAAzDvN5vtQJHMsZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785478074; c=relaxed/simple; bh=NPgDZWp0zjQsX8p2iQgy6uXQRmUxzcpHU0jWoUp+/g0=; h=From:Subject:To:Cc:References:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=N/Tm6Z7kfSadmMpXlRLeKZ38zXBkpyNUTmsqADoqcnYXhG17f8YI20kVs2A6wgKMSLGZoM/RzL8CDKX/yI5ETi3o85k5G8yIs3L8upuDSmURiaGXK1LtWGulJCbxuv86P+mb1YN29qROzucnCq4q9sT/r40oZAPJeqJuLGKkfLs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=X2WFzYbZ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KIY8zlx+; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="X2WFzYbZ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KIY8zlx+" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66V4v4Lx3259662 for ; Fri, 31 Jul 2026 06:07:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= cBTysN2GKJ41mcelD+ifbRYjVUJ9bYWfxCx14PKUL/k=; b=X2WFzYbZrtKhMHY1 D3Kiba+nZpKXKJ69fDhMCIOxnU5KS7ovHs2+FGhXsCWSons4VNxIw+vO6bdYtwur eWusiunQkJxiT5JQ3TW6APSPOGbT/hYceMHFcBHEyLodg+dYX8QdqEzPo6v6nQD3 2yqFEoJ816vOz89XKQ69unkDZAiPn95CyCe1tBFs0e30nkPBLpxgkkO86OlzW8pJ SNgw1p8i6u9UTfjqBKJ7/00IJlvemreRWImrDq5yDuoJaJgwRMfU+Nr4/BAH2XzP qKcp/lbTFvLKMKZlE6dsstIcxlD9kn1rzexlNW464KxjeLXqpHbH3Z6llWzstoJw m0OpSg== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4frn0b08a0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 31 Jul 2026 06:07:51 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-38f5ac7416eso589728a91.3 for ; Thu, 30 Jul 2026 23:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785478071; x=1786082871; darn=vger.kernel.org; h=content-transfer-encoding:content-language:content-type:in-reply-to :mime-version:user-agent:date:message-id:references:cc:to:subject :from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=cBTysN2GKJ41mcelD+ifbRYjVUJ9bYWfxCx14PKUL/k=; b=KIY8zlx+kmXk7Do9pumkLKR3lti8UiQEXQlE4dY7bOEicsOZtZEShBUzvHinFz4/22 qJ5SUUsZViBBWDv/a4ub8tXWb+dejjdvVywHg3/fQeYvtM88i/uvTWnM6w9tVquCVSEF GU9YtsYHEMLotPjOHtcBkSW3+cfhoOhLU/Cd5AFxluwpV91KJfgTlPYI+1wFzQkuekMV 8b3s4E+W7opXvoUFSiB0hy64IOiSFjr7WeBTIo3Q/9/8THdiDQJ4IDB3gYwOemiOtYjJ qBKPhbZHcQaXAtvF7UW7b9+l6dsSrP+jBCbKavGKQNlVU2scOYl/HzbGR+GX4AfBb8Gj x33g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785478071; x=1786082871; h=content-transfer-encoding:content-language:content-type:in-reply-to :mime-version:user-agent:date:message-id:references:cc:to:subject :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=cBTysN2GKJ41mcelD+ifbRYjVUJ9bYWfxCx14PKUL/k=; b=fM08B1do1qd3Zj4TbdpXTtNXOCZGQuRy85/Z6LXtd2LAburx2oWLHE1kDAVdyoEdVg SZy0ndfrtr+Z1AHpDBPay12222eJiXG6avKezHKY+5HzLbLvR8dIakFsSbK3HKDbYcW1 51li3b4sLK58hI4/PGJpY6O8oD8t0dfs6fUAc/Lm1zP3a/R29+LdaR4SZvLEG/an/+D6 ka+z4Gc8qGgCTYm0/pXw11S+GB4yqesGJH4FyxT5RAJQtM7GlHVK+GwIDmK+ZwV1J7YC 0J3hBv9pbWbMvLhUdiBGUVbgi7u5A5xt+SGnZg/TfZ9hMh4FvzDUrirwpLZaAF5Dmb5n 54Vg== X-Forwarded-Encrypted: i=1; AHgh+RrK7SzPDVOZoaVBNZbLJLYF/BPVjkJQsiPl6963+e0NPKrtOE9cC++CkhJPWEOHBE+W7N4H+xWIgcedFmk=@vger.kernel.org X-Gm-Message-State: AOJu0YwTGpJeKzcUnzbv5hdVf8nJB0Zk5Xq/c15GMiMuAafkvPnxzHC+ G7SLg3moZ7yIBS0kAqEbbrNqpKru/ZdFWaHu2R63+QKmnpVJFNvnT2jbmnZikbBxWAslVRtzXv0 dK8s6ud+hls31Rj28WKoeGTaGcVDMnwE1xv6bi+8THlk/WVCyDSo4TU36EUYUYEO/wHw= X-Gm-Gg: AR+sD128RmlXRmSMhT0QwIzxhGkQK27nfplxyrfH0zqChhDYm6dbStBUQRqaWyE1wx0 oPwwwMo/e5jE7GQkg0q8mZBMrmxi59YII21gL+UM05GWI6Pwm7TAleGz3lXRRQ9GMlpNtBKcsTu ESPLG/Xz9DO9B2KOq1/Gozv0cyZZ0dcpce3xMLaq/lu7eURq5JycblYka1FQqVTx/DNHCA7PfoI QVMBtJHbAKU2PQetkg/HW7dk4Ng6b6dZTLcV9aldOpoMB85D59a5yfcneH5xWIvfjQBirvqzpPq DxVPimqvFb02VcvZaK0VwwIZoObiZzWuRY80fadXj+nJhc1qSIXPI1zBUu87DyDIVtRI33IRvyV 9PP/rPyMzpXH47Ad6IvtJFD3yDP4= X-Received: by 2002:a17:90b:1e41:b0:38f:5869:387a with SMTP id 98e67ed59e1d1-38fb11d7b39mr731140a91.8.1785478070812; Thu, 30 Jul 2026 23:07:50 -0700 (PDT) X-Received: by 2002:a17:90b:1e41:b0:38f:5869:387a with SMTP id 98e67ed59e1d1-38fb11d7b39mr731094a91.8.1785478070245; Thu, 30 Jul 2026 23:07:50 -0700 (PDT) Received: from [10.218.4.105] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-38fb2f65459sm210656a91.6.2026.07.30.23.07.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jul 2026 23:07:49 -0700 (PDT) From: Neeraj Soni Subject: Re: [PATCH v5 2/4] mmc: sdhci-msm: Reprogram crypto keys during host hardware initialization To: Eric Biggers Cc: ulf.hansson@linaro.org, adrian.hunter@intel.com, quic_dmukhopa@quicinc.com, quic_rampraka@quicinc.com, quic_nitirawa@quicinc.com, quic_sachgupt@quicinc.com, quic_bhaskarv@quicinc.com, quic_gaurkash@quicinc.com, quic_sartgarg@quicinc.com, ram.gupta@oss.qualcomm.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20260730140822.1976635-1-neeraj.soni@oss.qualcomm.com> <20260730140822.1976635-3-neeraj.soni@oss.qualcomm.com> <20260730191823.GD3139@sol> Message-ID: <6c795412-ab63-22f9-0b64-8bc746fc2773@oss.qualcomm.com> Date: Fri, 31 Jul 2026 11:37:44 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20260730191823.GD3139@sol> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNzMxMDA0MCBTYWx0ZWRfX4rFIKf50r1v+ vabFBMIy14ePE+lsqUx3x39HwgMeLN4wsKbyCliVpTZliL7W+LIuTM5rf/NWTsPD0OOvRt41W9Q wyPiC9AdxYNQrOzQq18Y38mFeYQHId0= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzMxMDA0MCBTYWx0ZWRfX068yWSd0WGki Lo11Nde53Seqjb3X354ebqHzCpzVRsmPuSkpi9sRdGgXhuOg2pxQBH71IRcSnNZh4UTnBOURA1d YFxXI6HIvq+y1WZEtU/Q0+kygIh1UuQofSRcGhqGaqGiBF0J5EJm/ofnwOdmqZWzA9SQ0tcoVZA zyvuU/lOONT/GafCdICGHbpson+MqZSCbyT/5j0G0diP6SCUZRQYsSg4Sgb3UC4kzFaPRy6IwKH 8k9OghgmoXbYoWiCexCc3tYzJOdaHJRxnccO7wqKneUt5Mbtt84kr7yopvi2K4eMg5dyqvPpP12 izdHVSDpg/a0sFeUZucPMVARk29IoOJP/lLP/6Ja0xrLzAqAVlqpUpiXI0xnL3Sj5Fpg3OpMI3R 1ORxnUwcziCHF0/q6b7tkSCSJpOJaM6+fMHwZ664Q5la1KjO5DInLXaER471GwtKUyI7YzxVQQk OYymmDJ1Bq1P/+bjmEQ== X-Proofpoint-GUID: IP4cF8-Oob4aRHLr-gfNrI498Dj_4r2m X-Proofpoint-ORIG-GUID: IP4cF8-Oob4aRHLr-gfNrI498Dj_4r2m X-Authority-Analysis: v=2.4 cv=Tv3WQjXh c=1 sm=1 tr=0 ts=6a6c3bb7 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=j5mz3ktRbTo_uisptNEA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-31_02,2026-07-30_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 malwarescore=0 clxscore=1015 spamscore=0 impostorscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607310040 On 7/31/2026 12:48 AM, Eric Biggers wrote: > On Thu, Jul 30, 2026 at 07:38:20PM +0530, Neeraj Soni wrote: >> Host looses the Inline Crypto Engine (ICE) keys during hardware reset. >> Re-program the keys while intializing ICE to ensure that ICE is available >> in the same state as before the hardware reset. >> >> Also set MMC_CAP2_CRYPTO_NO_REPROG to indicate that re-program of ICE keys >> is not needed during MMC runtime suspend/resume. >> >> Signed-off-by: Seshu Madhavi Puppala >> Co-developed-by: Ram Prakash Gupta >> Signed-off-by: Ram Prakash Gupta >> Co-developed-by: Sarthak Garg >> Signed-off-by: Sarthak Garg >> Signed-off-by: Debraj Mukhopadhyay >> Signed-off-by: Neeraj Soni >> --- >> drivers/mmc/host/sdhci-msm.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c >> index 4aff965f0e2e..7d71dc6f388d 100644 >> --- a/drivers/mmc/host/sdhci-msm.c >> +++ b/drivers/mmc/host/sdhci-msm.c >> @@ -1958,7 +1958,10 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host, >> cap.sdus_mask * 512; >> } >> >> + blk_crypto_reprogram_all_keys(&mmc->crypto_profile); >> + > > This still does nothing. The crypto profile was just initialized, so no > keyslots are in-use and blk_crypto_reprogram_all_keys() does nothing. > This is needed to address those scenarios where device is running in a stable state and only the host hardware goes for a reset, for example, to recover from an error state or stall. >> mmc->caps2 |= MMC_CAP2_CRYPTO; >> + mmc->caps2 |= MMC_CAP2_CRYPTO_NO_REPROG; > > This seems to be the actual point of the patch, so let's simplify it to > just this. However, this is also broken because this is ordered before > patch 3 that introduces the actually functional key reprogramming. > Please drop the no-op call to blk_crypto_reprogram_all_keys(), then > merge patches 2 and 3 into a single one. > The call to blk_crypto_reprogram_all_keys() is not a no-op as clarified above. Hence the changes were split in two. > - Eric > Regards, Neeraj