Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp755518ybl; Wed, 21 Aug 2019 05:10:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/XuKlyXKu8UxonWDRUrkIJXod0hJqrAFgxgQLknX7ErppfEZorbAsJDeKQYQCh3DifZWb X-Received: by 2002:a17:902:e389:: with SMTP id ch9mr33426251plb.23.1566389457002; Wed, 21 Aug 2019 05:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566389456; cv=none; d=google.com; s=arc-20160816; b=fNCBJrARzoZzZGmM1kc7z+pphZyI22iuvOV5AXJGBu5R6Ud1VIblTsNW+Fq89jYFAX yucl/x82VuL7lUm+cLD/XmLcpb0lp5KFg5/k0lzhRFPkt4JGbcb7p3TzIvhvEiOAwJGX LRLM0hmjVaCYQacuzVPvlFHnawxuWgqujU00sRw99s/VWRhe8J9VTbQezCduMVmkv5Hp CqslCtvohhEa/7P2UVLoY5thNs7sAb/c/O0lKPoZDbCBbLh97kzAUYb1FXS2fLu5RPsm qH+a9wdaZG+AhRX2kIKf0HpK/x+JjPwSht3fpIoDerbj5taDPMDj8edbfTAoF3YEb34q xJOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=UT6yE/roxwyyBSRfLOwrFlilraLjBXjoNWJQAsldDVo=; b=sloh9+TFouQtTcZJGQQDJ+N7T8UkPGsrZvQHYNR4EctGscU128nOq9X53PPotARYCe VYFvWING80ABNRd7/rWtWA3aGccQcxQ2yj8kg3d28JZMlQAbTTwz3F4SHY7yBsjo78rv KtaR2AGPG7nEeySuRcvscjoaFWnI0iMHSMHXwsiaEnknu3JglU3iOfFg1dJMDJ61eTtr 3RlSomJpvJicMtXcQY1OMDgMn45u+a360K02xDaTeTNxGIwdXhNrX38M0FqMs8R7hCq5 hRlOhi1KJbG98V56C4FeVLq52k65xfIQYloPtI9L6MgXyaaiWeKzfSiJVS6yKSxWf2oK f7hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=1mTbly5h; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o61si14998037pld.392.2019.08.21.05.10.37; Wed, 21 Aug 2019 05:10:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=1mTbly5h; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727926AbfHUMJz (ORCPT + 99 others); Wed, 21 Aug 2019 08:09:55 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43864 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727144AbfHUMJy (ORCPT ); Wed, 21 Aug 2019 08:09:54 -0400 Received: by mail-pl1-f194.google.com with SMTP id 4so1225869pld.10 for ; Wed, 21 Aug 2019 05:09:54 -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=pvLSVBWp8zqTZD7YhS4kEuy2diY0fp2StzFITwFwkpUkX7Ks5fePfc47t9TCdXF4S0 /702gNNEhNS4vgWkGq2rRMk9y24Oz6AO9mYGstZ3k4h7/jKn3vuktreRj11k0rOreMt5 HtSZU9vtrkjUb3VLqzEhjkdxvy3B8R18AX3hQtOUk3W4P2G+5jHl0IASXH9/hDSWel74 5Q38ZfvEdnazk8DkfedIy3nq9VYakfnyx+Xg5o8DMCezgBF+/E6IvbFsbUhyqTX2b7fw 9YxDNSrOu8WLOkp8KQynw6lKxwdN1UQBsm5bX3PCnDG+rasvuNXzhoPZJtjYOGXUF4pL Kp4w== X-Gm-Message-State: APjAAAXf8dH/rIBOLU0b3dqyGqy274CJB4QUVlUf4onzUKQCnCaoJDs+ 7vmJaqhOqb8HDDNF+PtApOLR0A== 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) Subject: Re: [PATCH 5/9] block: support diskcipher To: "boojin.kim" , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: 'Herbert Xu' , "'David S. Miller'" , 'Eric Biggers' , "'Theodore Y. Ts'o'" , 'Chao Yu' , 'Jaegeuk Kim' , 'Andreas Dilger' , dm-devel@redhat.com, 'Mike Snitzer' , 'Alasdair Kergon' , 'Krzysztof Kozlowski' , 'Kukjin Kim' , 'Jaehoon Chung' , 'Ulf Hansson' , linux-crypto@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-fsdevel@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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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