Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2526393pxb; Thu, 11 Feb 2021 15:02:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpuULCOLQQmNuL9ZTTUA7uh+Seu2R6jMK4W0jd59HeDJiNK7SDQjRTi5cuMZUh7xmRYr3w X-Received: by 2002:a17:907:7347:: with SMTP id dq7mr10951307ejc.385.1613084566271; Thu, 11 Feb 2021 15:02:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613084566; cv=none; d=google.com; s=arc-20160816; b=KDzw1d0IRqiXozq9PB6rMsFsyOVLvEfZ77BKFM8VFIkC96WzPoZgHaLDDrRaFGwYab gGorGnbGG1Z/xgQ/N6w/yTZ+10OExMPllL1HnDqpQb32M/TwooNIxwLwdr1T6K1hPB+u wVlWTzStgv6VsbhUQcsgHuJpuWbNtTXc5OeYlzDXv114zHV22oeiS33kZFgpP8DTIp+4 5kzEaoiL4fy6l1Eqv8IgcEZL/myqQmqL1Xky1NaJUJyIFxrWIqzoPhcx67HAmj+L5DB9 rccvz34d6l/1P9+6vcgTI3T0rYfqk5N1pDux2v5x+pkWLOaUFOb4s0lns7RREKywROsG ROmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=amreorW5Wp+rgEfeKxxFdgVmmwkgOKq0HeoNDJfuGV4=; b=Hm0hA237jM7AMmN+hGf/vyar47ptswIzzO+EA2ZCcaKQZXAYAGfT9GrNtEffJHxF2I ut65kvM2Vk1XrNYViPomPQK6Z7ILU2AeCxUfEt6GfJTkMDA1Rzc1xC0ShBpT0U+EBaCw KKSG0tBDhMCk4tas0rN+/+4eZKtT6Dz3LZQd5KcZcH48qlBv7EUgvUA+0otLepnlvLK+ 7vTGfto4Z30adj1s1GyXUr+AKbdAL46Cgc8LIyRJCKLI4XOJOL1RgjNdTvgtNK10JeGk NqDtXP/Hv2GIdPKl0rg+lpxtihYABxqkZfnSWAS9RLC1aCTfykpmTGHZtMEiQgFk6aQW 5oLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fTdADRcO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si5463385edd.458.2021.02.11.15.02.23; Thu, 11 Feb 2021 15:02:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fTdADRcO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbhBKW7W (ORCPT + 99 others); Thu, 11 Feb 2021 17:59:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229794AbhBKW7W (ORCPT ); Thu, 11 Feb 2021 17:59:22 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECE12C061574 for ; Thu, 11 Feb 2021 14:58:41 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id q20so4656131pfu.8 for ; Thu, 11 Feb 2021 14:58:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=amreorW5Wp+rgEfeKxxFdgVmmwkgOKq0HeoNDJfuGV4=; b=fTdADRcOOLN4WHK2Zt6UP3ji0Zp3Utp9E9xyVb7aSxKdyCDUFDXgECBkyWNT+nwRn8 rHNZFEobZ0FVNNcZSJ2c1O7yDS3iXY9Rras9gFtz5URWhATRqQWGskClTm1KPBZy3m0b 4KTw9JUNTiBisgotkHv7R/Tqbo7lrUYGCdWGcDYhfK1TT7HrkNEtqfmSyVJk20ClVQyR IICwGksNJvFntlbkNjSM3qGZyXSaEkI+27gcm8oFnfILOKt3bGXg2f+K1rMIsGx8e9xn t0fcrD/sNFjQGeCzHqBruUxo/f3ASwpX3jEAAnvRfyDcEmwan6o1MedRlLRq4aYIjbFJ ME0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=amreorW5Wp+rgEfeKxxFdgVmmwkgOKq0HeoNDJfuGV4=; b=C+gZBYZrIarzzFhvt0f+7MB1GdCX0LHvIyfCG9k7R9shAWByWDo2ZBVytS3nQld7vp ngtiDoiav8lA1ZjWZNAZUwWq5tJ1sBHoOE77tDJ9k2PBP0nyPPTVFEgvHJmK6s5eluDE TotDolhY2WdK4CuALQITVYYd36EbRJXGPqLgdr7es8LkbPWaDV8k0vYx8K4HgVxpSXgO RUj8bW/AQcp/Nx/bwrASitRwe2dHcUxmuHfkhYXQhMVYNap8gzzwVcfl2c0qyRRK2lyT rYLtZkouLCVr4c463yz7pEbQA1wExyIDlujLMvVSkXTFRctU/G5gJqZhZxjmvKQxCcdI wT5w== X-Gm-Message-State: AOAM530LyjHXqGnI8wHG0eSq2ubTQD7ssaSGwz/QcEoI+WEhlr6sUCS/ rmApjwN1HVlcsoAZ4nHwHpILOg== X-Received: by 2002:a63:fe13:: with SMTP id p19mr370840pgh.119.1613084321254; Thu, 11 Feb 2021 14:58:41 -0800 (PST) Received: from google.com (139.60.82.34.bc.googleusercontent.com. [34.82.60.139]) by smtp.gmail.com with ESMTPSA id o14sm7499206pgr.44.2021.02.11.14.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 14:58:40 -0800 (PST) Date: Thu, 11 Feb 2021 22:58:37 +0000 From: Satya Tangirala To: Eric Biggers Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, Jens Axboe , Mike Snitzer , Alasdair Kergon Subject: Re: [PATCH v4 3/5] dm: add support for passing through inline crypto support Message-ID: References: <20210201051019.1174983-1-satyat@google.com> <20210201051019.1174983-4-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 12:17:30PM -0800, Eric Biggers wrote: > On Mon, Feb 01, 2021 at 05:10:17AM +0000, Satya Tangirala wrote: > > Update the device-mapper core to support exposing the inline crypto > > support of the underlying device(s) through the device-mapper device. > > > > This works by creating a "passthrough keyslot manager" for the dm > > device, which declares support for encryption settings which all > > underlying devices support. When a supported setting is used, the bio > > cloning code handles cloning the crypto context to the bios for all the > > underlying devices. When an unsupported setting is used, the blk-crypto > > fallback is used as usual. > > > > Crypto support on each underlying device is ignored unless the > > corresponding dm target opts into exposing it. This is needed because > > for inline crypto to semantically operate on the original bio, the data > > must not be transformed by the dm target. Thus, targets like dm-linear > > can expose crypto support of the underlying device, but targets like > > dm-crypt can't. (dm-crypt could use inline crypto itself, though.) > > > > A DM device's table can only be changed if the "new" inline encryption > > capabilities are a (*not* necessarily strict) superset of the "old" inline > > encryption capabilities. Attempts to make changes to the table that result > > in some inline encryption capability becoming no longer supported will be > > rejected. > > > > For the sake of clarity, key eviction from underlying devices will be > > handled in a future patch. > > > > Co-developed-by: Eric Biggers > > Signed-off-by: Eric Biggers > > Signed-off-by: Satya Tangirala > > I don't see any obvious issues with this latest version. I assume you've tested > it on real hardware? > > If it's needed despite my Co-developed-by, feel free to add: > > Reviewed-by: Eric Biggers > > A few nits about comments, in case you resend: > Thanks! I addressed the nits, added acked/reviewed-bys and resent v5.