Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp6308115ybh; Wed, 7 Aug 2019 21:37:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4WZvLZAOXEWupuif1AxHsLU2GHGd3COVZ1LCtDEF6d3/Ehr9v4xzK8m017tVkRrOHGsVL X-Received: by 2002:a05:6a00:c7:: with SMTP id e7mr13255521pfj.52.1565239041803; Wed, 07 Aug 2019 21:37:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565239041; cv=none; d=google.com; s=arc-20160816; b=ZniSm1ox15V/XXfR+jlL5uIA9hknkXMHU8u239gQ+to4r2DPsx8Zryb6QCjPuizvP+ 48h55Cp0aaZGZoL4s7vjcGyCoaR2Wp8urjZ9F5YPJZunCJi97PTZJEEtbifZLNHxvKK1 fQEZsHirO8Zm77ytFSfWfwSV0rRYghsNn2I7o25JAuhr3RvPghSJrDid819OQiNz1IqL vXHOei7pKuAKbcYn7f1f/561tupWBzmLUxK8r9fUbB2MUDaMYmu7Wq1Bt+RMA7S3Gyg7 xdqpqrw8cYUakazYmgZ/P56mvAtTs1jim97zf4Hj7gUvX2ru5gEonp+n5fMmlK2tXWo6 norw== 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=Ngm09LcMWzK5Dpc9mQ1Xk+4OLg15tMcivduX4L7QMO0=; b=JW34VI16ZbZBlrjzlXHOwtWAnkO3yT+9pHN+RWb8EEzbxtjbLdHNfDxGCciOTpSdtw Rb5QkmYKFbq/TAOTdwHaK0DtpewoKmybCXPvIOKSmnJlqTYHm2U4FMUCRfaMinUhnYPo jQnFltkfx8gED9hm+ixf9Y8PpynNpHdZCAn56UByTnI6jfmv0UPlJ9Dbjld12s6+n2MH HIh3VNBXXPKhrC4RUJniP46Z5WyvupYH52wVCmFvXQikmJImWAqrLagKD/8SGVOEviY0 VlfbV/rOzhCo2ZPaJ2/UjA5+s2zUsrWYz8uGCW8ENUQ2/wBt2L94/KcZpsDdWS8T7via 1pNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=N2OTy1Y1; 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 v1si44741157plb.381.2019.08.07.21.36.59; Wed, 07 Aug 2019 21:37:21 -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=N2OTy1Y1; 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 S1726106AbfHHEfh (ORCPT + 99 others); Thu, 8 Aug 2019 00:35:37 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:41353 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbfHHEfg (ORCPT ); Thu, 8 Aug 2019 00:35:36 -0400 Received: by mail-wr1-f65.google.com with SMTP id c2so90241961wrm.8 for ; Wed, 07 Aug 2019 21:35:35 -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=Ngm09LcMWzK5Dpc9mQ1Xk+4OLg15tMcivduX4L7QMO0=; b=N2OTy1Y1W5JEwy50H3DYwWXRE1DG6Zz4YMq0BRiabmlp83mWlQ0niuBPZKD+5rcfjQ 3nvU6mw7vLOHTupA6v0h/NMirWqtWbfOZ17E/oGoUIjvTWOCS3+lhJAINaaLPnveBVw7 neX6K329hVRE80GCDTX7fOe22JramM4Pwo7pBaVU3Yg7TEaTENlKKKprKvTku6w8ccnU zs7XAXDIq08HqPqLpZt/SW3V9Vq5p+QZ+dWo/YXNixx+YNhejwPDjMv02SUVvE5rXKGg Uu9dDXfgDkpvPDJc/8c2MjRliteNhLaZVNNs2h1lVM2ZHfpkw/JLbKa5Nm0MXUPpMKZi r9WQ== 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=Ngm09LcMWzK5Dpc9mQ1Xk+4OLg15tMcivduX4L7QMO0=; b=L2IQmOIoeTaHVafZ0cSacm8Jy7/KrZadlJyU2tKgxoh0Xjo8D2DrCeklWDvgDH37Sq zebHBHbfhH5lWl+VAwj03hWuSAHXtvERXJ6kqTG6tPpuXtftFDE8XVMFuHpoPGkUpz+f Q7nGmwq1Bpl09RARfcw1m53yGoRbxSfWIusj+G+CmPeH95laRGNQWIpsRnq6Cn/wwHQf q5urvwgmk+qj7BE5oHRh/XYhhtKcXtE6Ba5xZQTgmpjzsFz8CLZKhwAieC3hvaYrNqst plHxKmAH98On8fmW4V55QwamI9tgpuSS15n1qHKzACo9s5Q6tZJd9ZO+qWeFLJ5WNztx foZw== X-Gm-Message-State: APjAAAX79Tia9fpOtCfnd1blIBdFf9J5KNtGWS4wtcro8YktK6TC3nuP NUaeiyfprQ/8VZ/uivVWK7U= X-Received: by 2002:adf:f2c4:: with SMTP id d4mr13928897wrp.3.1565238934782; Wed, 07 Aug 2019 21:35:34 -0700 (PDT) Received: from [192.168.2.28] (39.35.broadband4.iol.cz. [85.71.35.39]) by smtp.gmail.com with ESMTPSA id z7sm1001192wmg.22.2019.08.07.21.35.33 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 07 Aug 2019 21:35:34 -0700 (PDT) Subject: Re: [PATCH] crypto: xts - Add support for Cipher Text Stealing To: Pascal Van Leeuwen , =?UTF-8?B?T25kcmVqIE1vc27DocSNZWs=?= Cc: Pascal van Leeuwen , "linux-crypto@vger.kernel.org" , "rsnel@cube.dyndns.org" , "herbert@gondor.apana.org.au" , "davem@davemloft.net" References: <1565074510-8480-1-git-send-email-pvanleeuwen@verimatrix.com> <5bf9d0be-3ba4-8903-f1b9-93aa32106274@gmail.com> <52a11506-0047-a7e7-4fa0-ba8d465b843c@gmail.com> <46f76b06-004e-c08a-3ef3-4ba9fdc61d91@gmail.com> From: Milan Broz Openpgp: preference=signencrypt Message-ID: Date: Thu, 8 Aug 2019 06:35:33 +0200 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: 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 Hi, On 07/08/2019 23:13, Pascal Van Leeuwen wrote: >> It is a bit confusing, but it is the only reasonable way to support >> variably sized context and at the same time keep the whole request in >> a single allocation. Yes, and the reason here it was detected only for aesni_intel is that it is submitted though more layers, these depends on variable context length (at least it run through crypt_simd layer). I think all other implementations on this 32bit machine were called directly, so no corruption seen there. > Ah, ok, I did not know anything about that ... so there's really no way > I could've done this correctly or to have found the problem myself really. > Good that it's resolved now, though. > > I fixed a couple of other minor things already, is it OK if I roll this > into an update to my original patch? Sure, feel free to fold in my change in v2 patch. I'll test it and provide Tested-by later. Maybe it would be good to also include /* must be the last */ comment to the req in struct, though. Also, maybe this req should have CRYPTO_MINALIGN_ATTR attribute also? I expect req can be run through exotic hw accelerators later with some memory alignment requirements. Ondra will know better here, though ;-) Thanks! Milan