Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp247560imm; Thu, 31 May 2018 23:28:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJDMEnFFClB35116jNRDbrZMLWx43jCwZ7BJY2p7imLxvtky6zwOZ/l0cQLgZ4fbtMaTDAn X-Received: by 2002:a62:fe0e:: with SMTP id z14-v6mr9739923pfh.73.1527834518071; Thu, 31 May 2018 23:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527834518; cv=none; d=google.com; s=arc-20160816; b=tGRaWE/sN9pM6sK9BVINiCsRhut8zHK211ArKbL4AeMmPMKCqwdZlgYEMTUu925IZ/ AozQ4NM68l4wSr1IVuQi6RvSKwa1vfwIRs0Q9+3byd4nFgVk4m+Zh468ZkorW0NXf2G9 YF+o3HPa0Kq/1KiWYt0Tk3H+SfwAM+u8O8UpW7vAlauEcv3IvyDmYWVAEDwur2fSpEaR hP5nObPHS0IAYAYwHn+hdnPGPpbWYOLueRI2SCBvYS+6utXulm0w7pfIw/catlbYTgp7 ZChUNTt9owQ/e3/XJbcAJ877CzK9ETHsF37SRG2n2szsuJetO8uo0YiS5BMCc5B81ez0 +x0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=6RfZLCsGFIYmYIJV8PgNypb3IPMUt01vfE47RhJTdXc=; b=b3s2HUZcV/TmJzRJumqLVmQgheAJKq/L1f/hv5a5cP3V4Y4T6NzOj6tgpsOQ4Um9lV cWPT/ovXsF6xJCAThJr3ZAIGGtgc29j4htlOmhMCuF7ixPNZlPulT8G52Vi1HfFFkrLn ocw1hQnuJsenG0V8VHwP3rRzzF+usrynp10/RQhpDyBx9BTUTDmm9oH+pzVOPyijYmcm /Q4il6k0s/4dag5pQomcjrIks/3teGhR8jiFn02HaK0VukVtC8gBn/A43926YIMzFkoc UECv8WW4pIIGQF1bkrN1hS6xLU1HPRekVxPOWwyM7fpHW/cf18SuuVrRhpVpkMnStY8y ewqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=eksfHexs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s2-v6si11434177plq.372.2018.05.31.23.28.24; Thu, 31 May 2018 23:28:38 -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=pass header.i=@synopsys.com header.s=mail header.b=eksfHexs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751424AbeFAG1O (ORCPT + 99 others); Fri, 1 Jun 2018 02:27:14 -0400 Received: from smtprelay6.synopsys.com ([198.182.37.59]:40921 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbeFAG1K (ORCPT ); Fri, 1 Jun 2018 02:27:10 -0400 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 36BD41E05C2; Fri, 1 Jun 2018 08:27:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1527834429; bh=Xry7ZD1YqOQUpPmuWjpAswSKrI2H1TwOB0deqLWHv4U=; h=From:To:CC:Subject:Date:References:From; b=eksfHexsc7lB6xs+K8UcFtUaCG5nJlNKfoPUpkKICrniFpWzDB00CygwINjhpKgov yF0HNlXBWR4iWeudGeCWG5aWB+X3LM/WVkImS+T4Hv3KhgdQMpOKB+uulYwvAo+VGU L0K/wi7HVYuEMXOWuffU/kqenHtXVGUFgneG7V/wZ9ww7v+Oq3Y6eiU0OjxgLoxama jm7c4ZRf+IXDrzn7hhRvcB3q3Q/4WBx7CS1V1Ibb22W+9eSC2UXJfV4xCmz+FGFFgj wOWBsk6iwM9Fxoo3IyKErzoOxfjb7uvyr1Fwp7qbLYY5Jn5kCPgh+DwRuhPzt+RXqM 6/iwd9U42RTeg== Received: from US01WEHTC3.internal.synopsys.com (us01wehtc3.internal.synopsys.com [10.15.84.232]) by mailhost.synopsys.com (Postfix) with ESMTP id 890B13B17; Thu, 31 May 2018 23:27:08 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WEHTC3.internal.synopsys.com (10.15.84.232) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 31 May 2018 23:27:08 -0700 Received: from IN01WEMBXA.internal.synopsys.com ([fe80::ed6f:22d3:d35:4833]) by IN01WEHTCB.internal.synopsys.com ([::1]) with mapi id 14.03.0361.001; Fri, 1 Jun 2018 11:57:05 +0530 From: Ladvine D Almeida To: Jens Axboe , Ladvine D Almeida , "ming.lei@redhat.com" CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Manjunath M Bettegowda" , Prabu Thangamuthu , Tejas Joglekar , "Joao Pinto" Subject: Re: [PATCH] block: Add block level changes for inline encryption Thread-Topic: [PATCH] block: Add block level changes for inline encryption Thread-Index: AQHT9pwpRN+yoa9w10qCAP3oXXj0ew== Date: Fri, 1 Jun 2018 06:27:04 +0000 Message-ID: References: <77544032-b6ff-bc5e-9fec-666e66b2cc70@kernel.dk> <3fc7786c-af85-d047-047f-44d4eded6124@kernel.dk> Accept-Language: en-US, en-IN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.239.235] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 31 May 2018 04:46 PM, Jens Axboe wrote:=0A= > On 5/31/18 1:47 AM, Ladvine D Almeida wrote:=0A= >> On Monday 28 May 2018 04:54 PM, Jens Axboe wrote:=0A= >>> On 5/28/18 7:43 AM, Ladvine D Almeida wrote:=0A= >>>> This patch introduces new variable under bio structure to=0A= >>>> facilitate inline encryption. This variable is used to=0A= >>>> associate I/O requests to crypto information.=0A= >>> Hard no on this, for two reasons:=0A= >>>=0A= >>> 1) Any additions to struct bio are scrutinized heavily and=0A= >>> need strong justification.=0A= >> Thanks for sharing your feedback on the patch.=0A= >> I am providing reference to an earlier article related to inline encrypt= ion support below:=0A= >> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__lwn.net_Articles_= 717754_&d=3DDwICaQ&c=3DDPL6_X_6JkXFx7AXWqB0tg&r=3Dz00zRD9ARrwHpe-XSl1OtUp1u= NKGYoXI1G2DhOaDDBI&m=3Dm8U0bg9QiswO2oVJgJKq3MmJpqPPK_tN667XwsjojcM&s=3D9VPc= l80YTKwbf8T-oCxWTRahYzS2xNDHZMexpFbuepY&e=3D=0A= > Took a quick look, and this looks like a classic case of something=0A= > that should just be a cloned bio. If you clone, you own the bi_private=0A= > field, which is what you need.=0A= =0A= Cloning the bio gives ownership of the bi_private variable which i can use = to refer to the crypto context.=0A= But i have the following problem here:=0A= 1. In the dm-crypt subsystem, we clone the bio and assign the bi_private va= riable. Afterwards, generic_make_request() is done to submit I/O request to= block device.=0A= 2. The bio will be cloned further in the below layers. The reference in the= bi_private variable is now lost as the bio_clone function will not copy th= e bi_private variable.=0A= =0A= Also, the bi_private variable is already used in the dm-crypt layer for sto= ring its private data. This prevents me from using the same.=0A= =0A= >=0A= =0A= Thanks,=0A= =0A= Ladvine=0A= =0A=