Return-Path: Received: from mail-it1-f171.google.com ([209.85.166.171]:40201 "EHLO mail-it1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726442AbeLMUMC (ORCPT ); Thu, 13 Dec 2018 15:12:02 -0500 Received: by mail-it1-f171.google.com with SMTP id h193so5831446ita.5 for ; Thu, 13 Dec 2018 12:12:01 -0800 (PST) Subject: Re: [PATCH 2/2] scsi: ufs: add inline crypto support to UFS HCD To: Ladvine D Almeida , Parshuram Raju Thombare , Eric Biggers Cc: "vinholikatti@gmail.com" , "jejb@linux.vnet.ibm.com" , "martin.petersen@oracle.com" , "mchehab+samsung@kernel.org" , "gregkh@linuxfoundation.org" , "davem@davemloft.net" , "akpm@linux-foundation.org" , "nicolas.ferre@microchip.com" , "arnd@arndb.de" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "linux-scsi@vger.kernel.org" , Alan Douglas , Janek Kotas , Rafal Ciepiela , AnilKumar Chimata , Satya Tangirala , Paul Crowley , Manjunath M Bettegowda , Tejas Joglekar , Joao Pinto , "linux-crypto@vger.kernel.org" References: <20181211095027.GA3316@lvlogina.cadence.com> <20181211181647.GC221175@gmail.com> From: Jens Axboe Message-ID: <6309baec-bb1f-4986-6872-a70047fbc469@kernel.dk> Date: Thu, 13 Dec 2018 13:11:58 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org List-ID: On 12/13/18 1:04 PM, Ladvine D Almeida wrote: > On 13/12/18 7:42 PM, Jens Axboe wrote: >> On 12/13/18 12:39 PM, Ladvine D Almeida wrote: >>> Suggest to take a look into the article https://urldefense.proofpoint.com/v2/url?u=https-3A__lwn.net_Articles_717754&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=z00zRD9ARrwHpe-XSl1OtUp1uNKGYoXI1G2DhOaDDBI&m=-pGzV3wdSje337vKOYoYB6NgU_DGDmQvfQ9egLDRYNQ&s=c4FXsrwD0BLAjE4UC47R2ngLnx_DP5jiOr0dtZ7tGsw&e= >>> My real concern is how to achieve it without any modifications to the >>> bio.(because key slot information has to finally reach the target block >>> device) >> >> Guys, you both need to edit when you reply, wading through 650 lines of >> text to get to this... > Jens, Thanks for your reply. I will take care of it next time onwards. :-) > >> >> You obviously can't modify the bio if you don't own it, but you could >> clone it and then you have storage in ->bi_private. >> > > I agree. I can clone the bio in the crypto target and use bi_private. > But, when i finally submit the bio and it reaches the target block > device, the information stored in bi_private is lost. I don't follow, what do you mean it's lost? It's persistent from bio setup to end_io time. -- Jens Axboe