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=-10.0 required=3.0 tests=BAYES_00,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 0E731C4363A for ; Tue, 27 Oct 2020 21:10:48 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 604E620738 for ; Tue, 27 Oct 2020 21:10:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 604E620738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-AK_p-BdFNICt4-FKSs1Z9A-1; Tue, 27 Oct 2020 17:10:41 -0400 X-MC-Unique: AK_p-BdFNICt4-FKSs1Z9A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2AD5802B7C; Tue, 27 Oct 2020 21:10:36 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC4CC19C4F; Tue, 27 Oct 2020 21:10:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 12575181A870; Tue, 27 Oct 2020 21:10:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 09RLAWTw026636 for ; Tue, 27 Oct 2020 17:10:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id AECB4A9FDE; Tue, 27 Oct 2020 21:10:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 918209F032 for ; Tue, 27 Oct 2020 21:10:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6C1AA8D6324 for ; Tue, 27 Oct 2020 21:10:30 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-243-UBRzFpq8O8ybulwHlalx5g-1; Tue, 27 Oct 2020 17:10:26 -0400 X-MC-Unique: UBRzFpq8O8ybulwHlalx5g-1 Received: from gmail.com (unknown [104.132.1.76]) (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 CC3C020738; Tue, 27 Oct 2020 21:10:23 +0000 (UTC) Date: Tue, 27 Oct 2020 14:10:22 -0700 From: Eric Biggers To: Satya Tangirala Message-ID: <20201027211022.GB2416412@gmail.com> References: <20201015214632.41951-1-satyat@google.com> <20201015214632.41951-5-satyat@google.com> MIME-Version: 1.0 In-Reply-To: <20201015214632.41951-5-satyat@google.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: dm-devel@redhat.com Cc: Jens Axboe , Mike Snitzer , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, dm-devel@redhat.com, Alasdair Kergon Subject: Re: [dm-devel] [PATCH v2 4/4] dm: enable may_passthrough_inline_crypto on some targets X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, Oct 15, 2020 at 09:46:32PM +0000, Satya Tangirala wrote: > dm-linear and dm-flakey obviously can pass through inline crypto support. > > Co-developed-by: Eric Biggers > Signed-off-by: Eric Biggers > Signed-off-by: Satya Tangirala > --- > drivers/md/dm-flakey.c | 1 + > drivers/md/dm-linear.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c > index a2cc9e45cbba..655286dacc35 100644 > --- a/drivers/md/dm-flakey.c > +++ b/drivers/md/dm-flakey.c > @@ -253,6 +253,7 @@ static int flakey_ctr(struct dm_target *ti, unsigned int argc, char **argv) > ti->num_discard_bios = 1; > ti->per_io_data_size = sizeof(struct per_bio_data); > ti->private = fc; > + ti->may_passthrough_inline_crypto = true; > return 0; > > bad: > diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c > index 00774b5d7668..345e22b9be5d 100644 > --- a/drivers/md/dm-linear.c > +++ b/drivers/md/dm-linear.c > @@ -62,6 +62,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) > ti->num_secure_erase_bios = 1; > ti->num_write_same_bios = 1; > ti->num_write_zeroes_bios = 1; > + ti->may_passthrough_inline_crypto = true; > ti->private = lc; > return 0; How about instead using a flag DM_TARGET_PASSES_CRYPTO in target_type::features, analogous to DM_TARGET_PASSES_INTEGRITY? - Eric -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel 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=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 DC96EC4363A for ; Tue, 27 Oct 2020 21:10:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8680B2075E for ; Tue, 27 Oct 2020 21:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603833025; bh=NjdeQ+vCUNaMff+Zj42NKK898b5WXU5E7ZwpLNsxI24=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=l5/Yu0Gbry6O6pC/ZpODE7hYI3BCdtXG1WlOXkdB6GPK7oAZZKYItgXa0i9jLv1b1 jY1/boYEBg8qQZxlcCuXt+76gTFvIQaU/rfADCtu2d5eyZJb6nizZt62bZsx+DY2m7 f3TU0Q4W14gxOfJwpVckL4L9DYa8DKd4xMYLfAs0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505290AbgJ0VKZ (ORCPT ); Tue, 27 Oct 2020 17:10:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442629AbgJ0VKY (ORCPT ); Tue, 27 Oct 2020 17:10:24 -0400 Received: from gmail.com (unknown [104.132.1.76]) (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 CC3C020738; Tue, 27 Oct 2020 21:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603833024; bh=NjdeQ+vCUNaMff+Zj42NKK898b5WXU5E7ZwpLNsxI24=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vZUHLyoqYeo0kxq3pzrosakhNdPQ3Fssqmxudvr8kQ3krHs179HqCqjRiwBbrtpxa yuuAz0t3lZxaUb2bVblS7bzjX7lmbstyjrKyhHH17IvwRiA1ma6ciIhTBRPsQcfEO8 Z9swqO32NXuPft1Cpj70BOYVrMSId1wpSGqRfVCc= Date: Tue, 27 Oct 2020 14:10:22 -0700 From: Eric Biggers To: Satya Tangirala Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, Jens Axboe , Alasdair Kergon , Mike Snitzer Subject: Re: [PATCH v2 4/4] dm: enable may_passthrough_inline_crypto on some targets Message-ID: <20201027211022.GB2416412@gmail.com> References: <20201015214632.41951-1-satyat@google.com> <20201015214632.41951-5-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201015214632.41951-5-satyat@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Thu, Oct 15, 2020 at 09:46:32PM +0000, Satya Tangirala wrote: > dm-linear and dm-flakey obviously can pass through inline crypto support. > > Co-developed-by: Eric Biggers > Signed-off-by: Eric Biggers > Signed-off-by: Satya Tangirala > --- > drivers/md/dm-flakey.c | 1 + > drivers/md/dm-linear.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c > index a2cc9e45cbba..655286dacc35 100644 > --- a/drivers/md/dm-flakey.c > +++ b/drivers/md/dm-flakey.c > @@ -253,6 +253,7 @@ static int flakey_ctr(struct dm_target *ti, unsigned int argc, char **argv) > ti->num_discard_bios = 1; > ti->per_io_data_size = sizeof(struct per_bio_data); > ti->private = fc; > + ti->may_passthrough_inline_crypto = true; > return 0; > > bad: > diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c > index 00774b5d7668..345e22b9be5d 100644 > --- a/drivers/md/dm-linear.c > +++ b/drivers/md/dm-linear.c > @@ -62,6 +62,7 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) > ti->num_secure_erase_bios = 1; > ti->num_write_same_bios = 1; > ti->num_write_zeroes_bios = 1; > + ti->may_passthrough_inline_crypto = true; > ti->private = lc; > return 0; How about instead using a flag DM_TARGET_PASSES_CRYPTO in target_type::features, analogous to DM_TARGET_PASSES_INTEGRITY? - Eric