Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1355317ybb; Wed, 25 Mar 2020 22:10:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsEhw3zujASDIDQ7q8pfhRCtfkbNVD8gQza+HS2CxuD8ZJXGN8lOZ4OWs4lr7RCzibWRsbK X-Received: by 2002:a4a:9b07:: with SMTP id a7mr3982564ook.78.1585199457825; Wed, 25 Mar 2020 22:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585199457; cv=none; d=google.com; s=arc-20160816; b=p6vuY0rBdPZlLUheMD4+YiXG1tEL/k7s9H+JnDL+2JMBR1w0EN9qIwvWyhtW02PvuN 0Ir0M1C8+mig83Yzntox4e4V/SQEzTBG7tqrC+jRmQnd79G+QHFp0Wr0HH2DOPmYumZK wqr2XvZnZMgak+tF6NdV/Qlhzt0DQxvV41iIxoRwekdtSMReyz6l1aVo722JE9dN+M/f qxwlL9Py//et5xZLJ4jlYylTQxwefE7xIj0K3B3KUTVGfM2TfNSZpvSz60Le0lCMV3Zn ymgq3KhSYoWhpu7dkDUbemth2uoWsfB4XPyv/iPQBwyJo/d7eng6lCdZEgWjwmaKDMTh IpTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tPCDhExoDbgZWt5uPIFgHtlP4i+DNiIYYZ2mb2vB8IY=; b=oJ1L7lvQZd8hRiej2QeUf5ucF4qIb9cJt8K+wImQNkq43oXOOsspNOZcetcOtskIYF prwrorKHm6utwwgpnVyApj7DdkwPxi0R5qYD9GzAOVUhWC2hgJW0rYpzzfOSEFJYYSis 6JrrFqG+v5m1gQ3ThxGWWO2eSvfVFpzWvUL29ZB/m9bYW1togz51uLp6wvV//0P/gfPB YM99dHUyC6Jr1P8bOHNj1AJD/DcgR89T16vuVsNRH3yvMGq4ajO9swI6ajkgFIhcv7le 1tP0ttPrh9NFgg+ls8al7UHQ36g2T37krUN6yIaLoS7AF4kSMWgaIMKu3LtAuVGXkRVF GDQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KBk6bh+2; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si544448oix.67.2020.03.25.22.10.34; Wed, 25 Mar 2020 22:10:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KBk6bh+2; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726180AbgCZFJy (ORCPT + 99 others); Thu, 26 Mar 2020 01:09:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:51890 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbgCZFJy (ORCPT ); Thu, 26 Mar 2020 01:09:54 -0400 Received: from sol.localdomain (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C95EB2070A; Thu, 26 Mar 2020 05:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585199393; bh=SAzWGnLaDMWUeuZGiBEGw8t99I39riFFfBkRkECR76k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KBk6bh+2+KgvnH/GBoaOZP5CoOGFXBDEmHLgyFu7jp7J3p2K4KtNOxOGCOaR2gJoO NoaM3PK4kAQwznME9Gi10zGQmX6diVM0og4bc4/edRNOGvjRedijlsyrXSGWLAPzG2 1sDc4qg8+owA7W1kg+pUvnaPTPQpJZ24CZrBYHL8= Date: Wed, 25 Mar 2020 22:09:51 -0700 From: Eric Biggers To: Satya Tangirala Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, Barani Muthukumaran , Kuohong Wang , Kim Boojin Subject: Re: [PATCH v9 07/11] scsi: ufs: Add inline encryption support to UFS Message-ID: <20200326050951.GC858@sol.localdomain> References: <20200326030702.223233-1-satyat@google.com> <20200326030702.223233-8-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326030702.223233-8-satyat@google.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Mar 25, 2020 at 08:06:58PM -0700, Satya Tangirala wrote: > Wire up ufshcd.c with the UFS Crypto API, the block layer inline > encryption additions and the keyslot manager. > > Signed-off-by: Satya Tangirala Thanks, like the previous patch this looks much better now! A couple minor nits I noticed while reading this latest version: > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h > index eaeb21b9cda24..3af15880e1e36 100644 > --- a/drivers/scsi/ufs/ufshcd.h > +++ b/drivers/scsi/ufs/ufshcd.h > @@ -168,6 +168,8 @@ struct ufs_pm_lvl_states { > * @intr_cmd: Interrupt command (doesn't participate in interrupt aggregation) > * @issue_time_stamp: time stamp for debug purposes > * @compl_time_stamp: time stamp for statistics > + * @crypto_key_slot: the key slot to use for inline crypto It would be helpful if the comment mentioned the -1 case: * @crypto_key_slot: the key slot to use for inline crypto (-1 if none) > + * @data_unit_num: the data unit number for the first block for inline crypto > * @req_abort_skip: skip request abort task flag > */ > struct ufshcd_lrb { > @@ -192,6 +194,10 @@ struct ufshcd_lrb { > bool intr_cmd; > ktime_t issue_time_stamp; > ktime_t compl_time_stamp; > +#if IS_ENABLED(CONFIG_SCSI_UFS_CRYPTO) > + int crypto_key_slot; > + u64 data_unit_num; > +#endif Since CONFIG_SCSI_UFS_CRYPTO is a bool this should use #ifdef, not IS_ENABLED(). - Eric