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.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 49CBDC3A59E for ; Wed, 21 Aug 2019 12:10:04 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 135222339F for ; Wed, 21 Aug 2019 12:10:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="b/7XYRPh"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="anakEj7U"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="1mTbly5h" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 135222339F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1i0PRD-0003Ea-7p; Wed, 21 Aug 2019 12:10:03 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i0PRB-0003EK-Qc for linux-f2fs-devel@lists.sourceforge.net; Wed, 21 Aug 2019 12:10:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UT6yE/roxwyyBSRfLOwrFlilraLjBXjoNWJQAsldDVo=; b=b/7XYRPhY1N30x9Z4mQSMRQHuV 6qZVSdtBRWxU5py07TAPIn/GW+r3ccP71aepus8Mk8lMEGX1igH/Q7F6WkJzBOpkI8neVQP1hODtY 2JW1JJmXpRRUfto2OAYGQMDnm+11bdN8nCVQHJfj0/CrRpZSbPPdRJ/yTft6GfNHIFSA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=UT6yE/roxwyyBSRfLOwrFlilraLjBXjoNWJQAsldDVo=; b=anakEj7U6U6faAKwOqYl/tHtj7 uA2Q3oNyEujaWTNy+m8aIivoQCwvawkMoOF7m5LdC9wRWgXIxEcBvm2/eXV2bIkzgvlSyFFjYGgwd J30FF94rW81sd+yGCDHAJtXPZp+94FBBS8qOKTiyQUY67zagrowZwinM0t0Pd2YMYEdo=; Received: from mail-pl1-f194.google.com ([209.85.214.194]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) id 1i0PRA-00Azpx-0H for linux-f2fs-devel@lists.sourceforge.net; Wed, 21 Aug 2019 12:10:01 +0000 Received: by mail-pl1-f194.google.com with SMTP id f19so1242051plr.3 for ; Wed, 21 Aug 2019 05:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UT6yE/roxwyyBSRfLOwrFlilraLjBXjoNWJQAsldDVo=; b=1mTbly5hNN6suDS+BwBXn5tZNQRoJv3U+6eGIZWkxOpX8gp4MfK0srbyshCamPl8cE oynbwAZaUVd3iYuDw/fFqllqnUyyMdhGmWDFTWD0+uRBHO1RABomqwNTPTloesNaBCP/ OF0wNlT1X2HUApuEYt9hqsB3ukfCOmKOxQ9VlFGyTVla9DArrhzV46cf0e1hqSL0Em1S kMKT+OUOB39Lc9u+MllIcA6W2VixaWAmIOOCqIPym//+KF+bJLzrXd5uXWfD6RF+tn8O fEItbmLNgpz+3xyfCw5xuoCb8BCqv/jPsevOVEPakCBbt5mOdjvlnK19JQHJXISJTFII +AuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UT6yE/roxwyyBSRfLOwrFlilraLjBXjoNWJQAsldDVo=; b=JCMnnZM2xmxRVZ67aduFxLT4UcfnCGKeAOjm4atiP/EkF98mBJjzqlmz8vJ6Hr51sp z/nir+unN4c9KBKWpSX8N/m+9feEmccMRK1zJ+lQVldJDUC1EtNu2gluJ0evWlGAdfSJ N1aIjATzQ7brTRmf0CCLZfjS0EhcDXsUmDZavpPt9XpekFO4gMAxR5SHmfbBaGYn5JPk 0ezN6BdExenGBzrSzO0H1XRZn7qgjI3CrV0fDe5BALMPjQPhgWSpuMdGxaF2PvDJVed4 N7bd8s8zfnvlQ28ctuvq62sJOzzOQX73Ac3rrlsJ0st7gk2vrGtTQHoOLgskYkyDvDOZ AEfA== X-Gm-Message-State: APjAAAVlg0/TpChUuxk2ZvrTdt0bkkjo2vEJG3Moa8j8TWEEuOidpIWW EAsCPiVhxxTE/6c4RFhHBsn48w== X-Google-Smtp-Source: APXvYqxsoe31YiWALXWqRLHXasZTZR3nM8GXNUHwTUUu4EkoxYDPJeCxhjU4HkYSZ/HpLNbIJ9AOOg== X-Received: by 2002:a17:902:a410:: with SMTP id p16mr17723995plq.150.1566389394293; Wed, 21 Aug 2019 05:09:54 -0700 (PDT) Received: from [192.168.1.188] (66.29.164.166.static.utbb.net. [66.29.164.166]) by smtp.gmail.com with ESMTPSA id z4sm22521476pfg.166.2019.08.21.05.09.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Aug 2019 05:09:53 -0700 (PDT) To: "boojin.kim" , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org References: <004101d557eb$98b00060$ca100120$@samsung.com> From: Jens Axboe Message-ID: <6ea5e5db-4dd4-719f-3b3e-b89099636ea6@kernel.dk> Date: Wed, 21 Aug 2019 06:09:50 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <004101d557eb$98b00060$ca100120$@samsung.com> Content-Language: en-US X-Headers-End: 1i0PRA-00Azpx-0H Subject: Re: [f2fs-dev] [PATCH 5/9] block: support diskcipher X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 'Ulf Hansson' , 'Mike Snitzer' , dm-devel@redhat.com, 'Andreas Dilger' , 'Alasdair Kergon' , 'Eric Biggers' , linux-samsung-soc@vger.kernel.org, 'Herbert Xu' , 'Krzysztof Kozlowski' , 'Jaehoon Chung' , 'Kukjin Kim' , linux-ext4@vger.kernel.org, linux-fscrypt@vger.kernel.org, 'Jaegeuk Kim' , linux-arm-kernel@lists.infradead.org, "'Theodore Y. Ts'o'" , linux-mmc@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-crypto@vger.kernel.org, linux-fsdevel@vger.kernel.org, "'David S. Miller'" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 8/21/19 12:42 AM, boojin.kim wrote: > This patch supports crypto information to be maintained via BIO > and passed to the storage driver. > > To do this, 'bi_aux_private', 'REQ_CYPTE' and 'bi_dun' are added > to the block layer. > > 'bi_aux_private' is added for loading additional private information into > BIO. > 'REQ_CRYPT' is added to distinguish that bi_aux_private is being used > for diskcipher. > F2FS among encryption users uses DUN(device unit number) as > the IV(initial vector) for cryptographic operations. > DUN is stored in 'bi_dun' of bi_iter as a specific value for each BIO. > > Before attempting to merge the two BIOs, the operation is also added to > verify that the crypto information contained in two BIOs is consistent. This isn't going to happen. With this, and the inline encryption proposed by Google, we'll bloat the bio even more. At least the Google approach didn't include bio iter changes as well. Please work it out between yourselves so we can have a single, clean abstraction that works for both. -- Jens Axboe _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel