Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp322901imm; Fri, 1 Jun 2018 01:18:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkq005Ll+hlS0+bcLdyAFve+74No8e7ge5236ROqNJWN1Md+D/fpEY97DIsua7rcBdX1BI X-Received: by 2002:a17:902:9a06:: with SMTP id v6-v6mr10164755plp.21.1527841089803; Fri, 01 Jun 2018 01:18:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527841089; cv=none; d=google.com; s=arc-20160816; b=SFU7usyqdXrw1L9OQq7arA4JL/eENJ8DeHIwrl+W8bzANC+g4h0DtgXIx+1x79EY1f 0DZFRMZylFAS2rbxQKoR9/rgokH20AM7IMNHqgsl7Wv5/aPirNlFaIhq084B4SA8pM3+ XUR7bNU20a7me92FhhYHoXzcyDcXuprDGcZ0Jj7xHEzMRURBPwLSiuUeLSE1zrHDwLFH pwaX1RJ/hvC9L7RsqGhsGdwX1tIp2hRhEwO0INPyMgziuWfkjcX/BF+FienFiWDyPvNp SBkeNxeRbPpRQ3Yu5c6huO82tjRNh6yHNWPRXgt2qG0bjz3VJLCWMND30GiE74lY2qkL XOaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=WWFgZeHc62EhLKGsubdEBLKI0N3N0IuJ9l41alKm82E=; b=RbLUW5XgQnHoNXEHBqkLnW/n3ahMd2Xt7FAXvG/MAxAEFO7283exFlpLXZ2Pqbcu5n jrRe+xOy6L2ftHLkkn9XIIPznFsSVuhDMYL7q/zpxfkeih0yleSn0vCrFoo5/0rMBEQV incFJKWvmdQxHKEgIVnf6ipZZzBujfuyEmHX6yIYtldTD6zqFaiJd7Wf7c6bexmvhe0u EoP3RKxkRxJLv4K0UDd9GpnQAOXvrQ5pE9pjq1qHA3SpQGeIQa4dqBwSbujvjaUo+mMv jywSJrkqDSKfdQZOBeNH6mbioW4LNk2/3GAFsYiG3dLnsZJ7fBFCKg0ZWq/RjgG2sJ9p hGPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qtwubGXc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5-v6si12747170pgb.430.2018.06.01.01.17.53; Fri, 01 Jun 2018 01:18:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=qtwubGXc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751341AbeFAIQs (ORCPT + 99 others); Fri, 1 Jun 2018 04:16:48 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34124 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbeFAIQo (ORCPT ); Fri, 1 Jun 2018 04:16:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WWFgZeHc62EhLKGsubdEBLKI0N3N0IuJ9l41alKm82E=; b=qtwubGXczJQAAQnY2Mh/5EXz3 tyPcsrJtK0Nv1yHuLKd0DXjABcdgAhE1oKWAPvwwFOGNvObKmU/1XJGFg925hNR7U50/k29O9Ugyo hyI9P2tJlxpAvbzjzy/b+ToiGrpWu6fjEzCeKmqK5RPxa/pe0VWVfwzIDyreumaHErCffDrmaxcyP kPrcsa+GjrV6aFkdfYgPyP0S3eGJToifuq1cK4s7y1EIspIEQa7vf2JQ3nyZiHk/hB8sqeUDo9sDW NdirmGbd1X6sgMlZgjt3lJPibQ2xENsvIuIUM5MvZc3mbnXaTk9To04HFkSj+H3i1JxeBN17PGAR+ 63liwcdTg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOfEo-0008Up-BJ; Fri, 01 Jun 2018 08:16:42 +0000 Date: Fri, 1 Jun 2018 01:16:42 -0700 From: Christoph Hellwig To: Ladvine D Almeida Cc: Milan Broz , Alasdair Kergon , Mike Snitzer , "linux-kernel@vger.kernel.org" , Manjunath M Bettegowda , Prabu Thangamuthu , Tejas Joglekar , device-mapper development , Joao Pinto Subject: Re: [PATCH] md: dm-crypt: Add Inline Encryption support for dmcrypt Message-ID: <20180601081642.GA25973@infradead.org> References: <7a510610-9133-39aa-6841-3925c532f3c0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 02:52:07PM +0000, Ladvine D Almeida wrote: > when the optional argument "perform_inline_encrypt" is set, we are not unconditionally sending the bio > to the block devices. The steps are explained below: > 1. user invokes the dm-setup command with the registered cipher "xts" and with the optional argument > "perform_inline_encrypt". > 2. dm-setup invokes the setkey function of the newly introduced algorithm, which finds the available key slots > to be programmed(UFS Host controller Inline Encryption engine has multiple keyslots), program the key slot, > and return the key slot index as return value of the set key function. > 3. When read/write operation happens, crypt_map() function in dm-crypt validates whether there is associated > key configuration index for the request. The Bio will be submitted directly in this case only with the associated > crypto context. > 4. Block device driver, eg. UFS host controller driver will create the Transfer requests as per this crypto context and > encryption happens inside the controller. Why isn't this all controlled by the ufs drivers, using helpers as required? Also why do we even need this API over just implementing TCG Opal/Opalite on the device?