Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2677244ybb; Fri, 27 Mar 2020 10:02:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vugxJAcg+Q+8nrrEBQ0kkodf9CFHBApQwFrT4GegYlkLMjLhsD3MAipsfwQ3+ugnYiWe3b5 X-Received: by 2002:a9d:247:: with SMTP id 65mr11121524otb.364.1585328520410; Fri, 27 Mar 2020 10:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585328520; cv=none; d=google.com; s=arc-20160816; b=cWoSiSueyF702q5NJg/PeXs05jE6XNdS0ys9aFLO24YCfYDG7OHWteBFMrruo0TD70 aaZ9lvrBaLTGu4aDu9sx9tMP+avAJNBJGQy4EmrBG1WKw61AFzz6msPPfYwN4Ipv7B9Q 07iWSkZBcGh5pqY47zvbiuua0HZy6pnKDmcwMbhsxKgviWrDhxpxPi33yadk64HRUs74 UJeNko8vz3M6u0EXoWMJ4Lpk4+rvoqF6U+gL/IGjYhs53b07LTTyxXOpZze/Mzfd9Z+4 zuZnp/vScvpzl9tPzl85vauFpn7+h38qn8I3SyG5qOtLa+8dZoqI0tMunX56Ht3IaUx5 vC+Q== 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=y4jqMXMuSCLjtxZfZUroyV7Ldlb0usNsMs0ZoH+IuWE=; b=tnWhGJD+JCvobhuG2+DuwXt87QXdBEPdP8ad4EezHJIScefUbd8mYzV910UcNLT6X0 NeH/UA86ZWWlM1LQLnYTzOpR3AZ7jl205aj19VqwTm02A+3bL//cZ6WpIrf41a5b+w/O BrvXYgQwpNPZuTNmOTIsA80k5uRyuzEdEaAGMwQfpJe+4w4HLmzWiaswnl2TcsB0NIb7 dXHxqZgBxPUJTJzl9+1OtBwPkfZL2r9W+f/0R4xCvF0Av4H0ATSg4dvcv/utlVBjX7Gm J1blSYrk0BoVKLYAwCDaK8GickJirx9rkb86FZ/3ISj6+5/osri48Mh7jOWsUCMrbO8Z XObA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=etdXQcPb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si2817872otk.80.2020.03.27.10.01.37; Fri, 27 Mar 2020 10:02:00 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=etdXQcPb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727254AbgC0RAt (ORCPT + 99 others); Fri, 27 Mar 2020 13:00:49 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38298 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbgC0RAt (ORCPT ); Fri, 27 Mar 2020 13:00:49 -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; bh=y4jqMXMuSCLjtxZfZUroyV7Ldlb0usNsMs0ZoH+IuWE=; b=etdXQcPbKq+hMTQy1uJbrj3Dwy S43mHrDmjodUSCeE2wcyLdiTBbZJji4+WjPE4HUq2bPN515bISs4fQbf8iy6g0GnC/kLmQW2umQoC MMfuXv8wpvN7PtMkMYIwpWJvRGQiwaX1yPIpaph27QJWiwOSxDnwSbMAQjDDsV452yNDgMra3H2br HJZU6dXL+GOF5RIelMf0M3qQXd0XOSSLEIN61bYpPNgi7M0qZjp8iQxaFKDqzCCUi5yYZQRjdIg7S R+6EFzJShR0M2/KGokbmRcDYGxefBu/VbHisjiZ965IiOWNK1hBiGOpezrfse89/d53XlYXi4+ZO5 cdtm2WfQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jHsLf-00084s-Sa; Fri, 27 Mar 2020 17:00:47 +0000 Date: Fri, 27 Mar 2020 10:00:47 -0700 From: Christoph Hellwig To: Eric Biggers Cc: Satya Tangirala , 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 01/11] block: Keyslot Manager for Inline Encryption Message-ID: <20200327170047.GA24682@infradead.org> References: <20200326030702.223233-1-satyat@google.com> <20200326030702.223233-2-satyat@google.com> <20200326062213.GF858@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326062213.GF858@sol.localdomain> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 11:22:13PM -0700, Eric Biggers wrote: > > +#ifdef CONFIG_BLK_INLINE_ENCRYPTION > > + /* Inline crypto capabilities */ > > + struct blk_keyslot_manager *ksm; > > +#endif > > I do still wonder whether the concept of inline crypto support should be more > separated from keyslot management, to be better prepared for device-mapper > passthrough support and for hardware that accepts keys directly. (Such hardware > exists, though I'm not sure support for it will be upstreamed.) For example, > the crypto capabilities could be stored in a 'struct blk_crypto_capabilities' > rather than in 'struct blk_keyslot_manager', and the latter could be optional. > > What you have now is fine for the functionality in the current patchset though, > so I'm not really complaining. Just something to think about. I'd rather keep things simple (aka as-is) for now. If needed we can change it. I doubt we'll even have a handful drivers with inline crypto in the next years..