Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp645561ybi; Wed, 19 Jun 2019 05:37:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTL6OKx+KLAGuJalcUnoqj353yuDtShQ3dVbxr91wBhziwqUFaEM4Ix4HVKzJPZmm84/dk X-Received: by 2002:a65:5202:: with SMTP id o2mr7007751pgp.199.1560947875277; Wed, 19 Jun 2019 05:37:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560947875; cv=none; d=google.com; s=arc-20160816; b=urz4AzZWipHwYkQQ8lmFmQy4BKyhSGYbUPCY7LxsSKjInIB+3PSppSW7F9ApcYK890 dBspscYROtr6SWTdrJyliptgIoILB3Ni5ToXL5c/qfeaH37IQWgvzp7PMP5VOvm+Td3n SqLvrQFGUDpkUVEdfKCV/SLqs1i6191EuAHOAy+oasOBFUXCPcE0ynhhYP8u/YTac8kA sVT02NyO9GTapAAfCH2tQySTa9qOHegM43xbo509dHxjTE3eY3np4LqeH8NztI++WnD+ ILYhyqtwc82CjBandmEzSv4GqVBX8DByoDd432/ZlhiQP+LvF7Kbr2cczIU4F3WUjcOs YX2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=mgVxtVWZcVB028eaS05O6WDA2Si5Lt8jvgQG053v8G0=; b=FFLhx+oapRcLTIfkBsgr6xcDiSIl4qg6WrQyLAb5pm8oV+tPlRRKDhrL96sSCdRcKk DWRVNrbwUtzo0qChh9mI+olCte5fWsba38BlYXGpKvz5HNU9CEyWQNGYvGFnVk0ynxqj Oj0uIPcJ8jfAwnb3FlEJazmhRIvpf5TbMXTdNLenOCZBYv1FCiwh6VSVWYFIrMYEZ3t1 pY1gSD+kURBsgPCBdgXWjioXlUYzQGlGX5guYAv2mozpnoVx18jbFSFcMbTTcDBXJeGF nNlTFWrKf9/kRlXSivXkf8yijBihIS8AqxnujYw0YKBAup/0JnOUUnC6KhzWgBGEqlxZ 0nTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=T2L1mRC5; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3si17183840pld.40.2019.06.19.05.37.40; Wed, 19 Jun 2019 05:37:55 -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=@linaro.org header.s=google header.b=T2L1mRC5; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731784AbfFSMhK (ORCPT + 99 others); Wed, 19 Jun 2019 08:37:10 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:37809 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731739AbfFSMhK (ORCPT ); Wed, 19 Jun 2019 08:37:10 -0400 Received: by mail-io1-f65.google.com with SMTP id e5so37821878iok.4 for ; Wed, 19 Jun 2019 05:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mgVxtVWZcVB028eaS05O6WDA2Si5Lt8jvgQG053v8G0=; b=T2L1mRC5K4CgcLXaSNPvZIX4o9VmWKKxbydy9xutoy2tJr618gUSuibD1lrMnlqLih 70gXC/IinKSNu6f2LS36r6nve2/1yghvKjMEu3I4Bhn4N8LLv3DlAMah7xHbt1JFusGd Dtx2ZW+V7qLsconPkoImg3LaW/dWdJHA123HYc7b0L7Of6Li4eDix1gph6QeBNfZJRBX 1eJBxmKSgxwaltZrC0VxK92+Uryd0dP6SxmG59cOBtCbeuX4HtR7LAwVr7pU9WmE+DSv 5aylDkjRcmPOuLBnBlDGQPIKATsG2/HiyilgZj1bR/VFD214fChwwxALm4in9qFQju05 UkFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mgVxtVWZcVB028eaS05O6WDA2Si5Lt8jvgQG053v8G0=; b=bUlZBDgq8A0fPMu+jxEq54vy6QWLSIQt1pRYT1OWyg38u0M8S4kppRFUB4y/7k4O5Z BnczPVp8fQDOkOFX1lW0eXeNHaPru2FQFXB+N5LdCfTrVOryt7ttUzPcHFlIe6RrcXKV Y2ofMURxdfhUgDufy2iS1aPiS1HwHLButkUTnGFdSU5bHXCj6H8fxcjwsqNAmdPs52CF 5fMuOGYXFehFr94MSvGOICLnLwdR1rkSziukfW5NhIvpPz3X/W/EKwGwkzLeYQmqwgSg GaJiMg6WQcg9ZjjZkbaguPVkaYgTKaM0FLGyBDYHyi0Re4U9qsm5LuZub8dv4IPB2RIk pMBQ== X-Gm-Message-State: APjAAAXyyRW9aNmjJZWq3dkWUqJvVOdf6BO+bmEZj12KNh/xVbLqKS/u zA6shVII8AgMsbSObqa1cXBuxGeA+YLWv6YFrNn7pg== X-Received: by 2002:a02:ce37:: with SMTP id v23mr10302944jar.2.1560947829635; Wed, 19 Jun 2019 05:37:09 -0700 (PDT) MIME-Version: 1.0 References: <20190618212749.8995-1-ard.biesheuvel@linaro.org> <099346ee-af6e-a560-079d-3fb68fb4eeba@gmail.com> In-Reply-To: From: Ard Biesheuvel Date: Wed, 19 Jun 2019 14:36:57 +0200 Message-ID: Subject: Re: [PATCH v2 0/4] crypto: switch to crypto API for ESSIV generation To: Milan Broz Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , Herbert Xu , Eric Biggers , device-mapper development , linux-fscrypt@vger.kernel.org, Gilad Ben-Yossef Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, 19 Jun 2019 at 13:33, Milan Broz wrote: > > On 19/06/2019 13:16, Ard Biesheuvel wrote: > >> Try > >> cryptsetup open --type plain -c null /dev/sdd test -q > >> or > >> dmsetup create test --table " 0 417792 crypt cipher_null-ecb - 0 /dev/sdd 0" > >> > >> (or just run full cryptsetup testsuite) > >> > > > > Is that your mode-test script? > > > > I saw some errors about the null cipher, but tbh, it looked completely > > unrelated to me, so i skipped those for the moment. But now, it looks > > like it is related after all. > > This was triggered by align-test, mode-test fails the same though. > > It is definitely related, I think you just changed the mode parsing in dm-crypt. > (cipher null contains only one dash I guess). > On my unpatched 4.19 kernel, mode-test gives me $ sudo ./mode-test aes PLAIN:[table OK][status OK] LUKS1:[table OK][status OK] CHECKSUM:[OK] aes-plain PLAIN:[table OK][status OK] LUKS1:[table OK][status OK] CHECKSUM:[OK] null PLAIN:[table OK][status OK] LUKS1:[table OK][status OK] CHECKSUM:[OK] cipher_null PLAIN:[table FAIL] Expecting cipher_null-ecb got cipher_null-cbc-plain. FAILED at line 64 ./mode-test which is why I commented out those tests in the first place. I can reproduce the crash after I re-enable them again, so I will need to look into that. But something seems to be broken already. Note that this is running on arm64 using a kconfig based on the Debian kernel.