From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19BFAC3A5A1 for ; Wed, 21 Aug 2019 07:21:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE10322D6D for ; Wed, 21 Aug 2019 07:21:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728246AbfHUHVr (ORCPT ); Wed, 21 Aug 2019 03:21:47 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:58114 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727848AbfHUHVq (ORCPT ); Wed, 21 Aug 2019 03:21:46 -0400 Received: from gondolin.me.apana.org.au ([192.168.0.6] helo=gondolin.hengli.com.au) by fornost.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1i0Kvm-0002hO-Tc; Wed, 21 Aug 2019 17:21:19 +1000 Received: from herbert by gondolin.hengli.com.au with local (Exim 4.80) (envelope-from ) id 1i0Kvd-0005uA-Ax; Wed, 21 Aug 2019 17:21:09 +1000 Date: Wed, 21 Aug 2019 17:21:09 +1000 From: Herbert Xu To: Milan Broz Cc: "boojin.kim" , 'Alasdair Kergon' , 'Mike Snitzer' , dm-devel@redhat.com, linux-kernel@vger.kernel.org, "'David S. Miller'" , 'Eric Biggers' , "'Theodore Y. Ts'o'" , 'Chao Yu' , 'Jaegeuk Kim' , 'Andreas Dilger' , 'Jens Axboe' , 'Krzysztof Kozlowski' , 'Kukjin Kim' , 'Jaehoon Chung' , 'Ulf Hansson' , linux-crypto@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-mmc@vger.kernel.org Subject: Re: [PATCH 6/9] dm crypt: support diskcipher Message-ID: <20190821072109.GA22686@gondor.apana.org.au> References: <004201d557eb$9b0a4410$d11ecc30$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 21, 2019 at 09:13:36AM +0200, Milan Broz wrote: > > NACK. > > The whole principle of dm-crypt target is that it NEVER EVER submits > plaintext data down the stack in bio. > > If you want to do some lower/higher layer encryption, use key management > on a different layer. > So here, just setup encryption for fs, do not stack it with dm-crypt. > > Also, dm-crypt is software-independent solution > (software-based full disk encryption), it must not depend on > any underlying hardware. > Hardware can be of course used used for acceleration, but then > just implement proper crypto API module that accelerates particular cipher. I agree. Please take a look at the recent ESSIV patches on linux-crypto and build multi-block operations on top of them which can then be implemented by the hardware. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt