Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2090937ybd; Mon, 24 Jun 2019 00:14:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlY1ZKMwbOy7X8MGkmXdxsAsX4Tx7GGXVLyQjA+QoVnZy2gMLov0kJ3hRk/l+CkrJrRHZi X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr22755085pjz.140.1561360445234; Mon, 24 Jun 2019 00:14:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561360445; cv=none; d=google.com; s=arc-20160816; b=YTM2giqvMJKKdMUs8uxsIzR7rV1PPKAV7iqd9R5jI72kinDH2WevBZHw7JNwc9Tgsp MIqXHj447xn1jexd8xd/EGTMPKlPdMokRGjgYhDjoAjMM+OXr/NUkgta+kJp68jC/5b4 JdoMiKXnwAWQM9HZl5kOnSqpUMMTTGSiTNpIFmrTw9NVgzkaVsf5diEKUPxEpSnM7iNA q6k7Td0KcSvku7TCAh8J6xOnPXBW2SwBRAZZ4LF+DYNftEgLrZT9TbvhM3rmkLAer230 O1HdrwOpxOU1olKYY+MjdzJ7BFft3uQXndtfMU7C8pFqExSTXbqvOzS0QnTZNxYLOYaZ 4j2g== 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:openpgp:from:references:cc:to:subject:dkim-signature; bh=CXj7EcHXfZQG+ULuS9k1X3crNZy9bY3cT9sIZIipFpE=; b=qBKAAI4JbWQwnCL2WyUAHp8VbdXeEP9LrscD1AxOviNTLSpcfi6lHN4fsmcxow04OL NCgakLkei928cY7CgW3m9CMgvp+WaC2SRyH5fNanwAePR9dzxgeeoxMIfyWDWetucX1M Aljj40302t6j/+CzvDTtBSHhTD+m04lKOiqsDNjPY4tLPyWCoy2Ez6FeZ+Pf7QGlMwRb VqykIrzRGXzWyevdSrdjmVOdeYnS1wB5CuJTd4ri+cQwQPuytXcAqSDc0wtcFTe6sfIg uE3BtkeB2WPGgNbJYMY7XQ17wfXXZyUdvqaBb7KbOKiiHSBkOgxLil9akZZFuGykFAGk 2uqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oGaEafgH; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j17si10252737pfa.198.2019.06.24.00.13.44; Mon, 24 Jun 2019 00:14:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=@gmail.com header.s=20161025 header.b=oGaEafgH; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726623AbfFXGwQ (ORCPT + 99 others); Mon, 24 Jun 2019 02:52:16 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38550 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfFXGwP (ORCPT ); Mon, 24 Jun 2019 02:52:15 -0400 Received: by mail-wr1-f65.google.com with SMTP id d18so12582676wrs.5; Sun, 23 Jun 2019 23:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:openpgp:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=CXj7EcHXfZQG+ULuS9k1X3crNZy9bY3cT9sIZIipFpE=; b=oGaEafgHZd7moSrSQ6D45tbG5l4DdlEkpwFd7sQA8Y0d8IgICxtZkA9d9Rgc/s6uar +Sdd/QAAgKObk1xW+UtAh+BXvRyTKDdzsCNtPtkwCFacdHhzAuHwY7wPrUQbYrGhqoHF OmeY0bIvQ2kp/7FsYUZ+h4K4wlUSimb2+pie+ZBCkvxdoeevqIDlOmg5EY0tUsm4vvP1 QgOGOtBugP+cCBPm5h25eeY97jIFwJhckAuufFE6t0QjOqV/d1x2ouqrIAxTo/gjiTpB Yo3B34ugM0IhEKINvCWXXlMweJOpSncMlkhZKBSKK4XBwCCsjCzuYPA4B8rSGRa7caId cJwg== 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:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=CXj7EcHXfZQG+ULuS9k1X3crNZy9bY3cT9sIZIipFpE=; b=d6quRybdwIF6gEwFI+QXGY9laSAHU2oSyLGN+F2fz2CMRLqAIROAVJlOt2A9uYKpA4 4+Pehx8AFKMQS6j1Lt6AaOq1x82H057PTUIP+HVvYSzFklM/UEOV71RSIcevOhlMsgvH roNXEqjDuQXNli+foXAqj4XDEFyO2FR6HXQlaMBOYZA4ffIL96h7ZXm2RSNW+WUXfU76 SYriuRQK5CryBe6A8g26WXNqAtrIJbXPMWgWNRxUkv7czh10y7slkLqLFgMmFB9A4fsB KDm+CqrZO61hXwrCHKW3TCzupRa3Q/KeygEz0CeJPynlOrwtDECNDttJ34xeu7H5x8/L 2p3g== X-Gm-Message-State: APjAAAVIO9GzScGTLf1V5fTgcVXwjcZ7nvlH0Iw1HlNXlNcUiGaNLDMv UUsM9yL6u12a3I7OZmoXV9U= X-Received: by 2002:adf:df10:: with SMTP id y16mr21102817wrl.302.1561359133444; Sun, 23 Jun 2019 23:52:13 -0700 (PDT) Received: from [172.22.36.64] (redhat-nat.vtp.fi.muni.cz. [78.128.215.6]) by smtp.gmail.com with ESMTPSA id w185sm13479825wma.39.2019.06.23.23.52.12 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jun 2019 23:52:12 -0700 (PDT) Subject: Re: [PATCH v4 0/6] crypto: switch to crypto API for ESSIV generation To: Herbert Xu , Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, Eric Biggers , device-mapper development , linux-fscrypt@vger.kernel.org, Gilad Ben-Yossef References: <20190621080918.22809-1-ard.biesheuvel@arm.com> <20190623101241.6cr4sbxyviigu3sz@gondor.apana.org.au> From: Milan Broz Openpgp: preference=signencrypt Message-ID: <5ebd992b-cb01-6dcc-f571-55afbb05c03b@gmail.com> Date: Mon, 24 Jun 2019 08:52:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190623101241.6cr4sbxyviigu3sz@gondor.apana.org.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 23/06/2019 12:12, Herbert Xu wrote: > On Sun, Jun 23, 2019 at 11:30:41AM +0200, Ard Biesheuvel wrote: >> >> So with that in mind, I think we should decouple the multi-sector >> discussion and leave it for a followup series, preferably proposed by >> someone who also has access to some hardware to prototype it on. > > Yes that makes sense. Yes. And TBH, the most important optimization for dm-crypt in this case is processing 8 512-bytes sectors in 4k encryption block (because page cache will generate page-sized bios) and with XTS mode and linear IV (plain64), not ESSIV. Dm-crypt can use 4k sectors directly, there are only two blockers - you need LUKS2 to support it, and many devices just do not advertise physical 4k sectors (many SSDs). So switching to 4k could cause some problems with partial 4k writes (after a crash or power-fail). The plan for the dm-crypt side is more to focus on using 4k native sectors than this micro-optimization in HW. Milan