Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2726808imm; Fri, 24 Aug 2018 04:26:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbfqUQloEPLxZwANZP0i0/+nMtRkrlyhuXivcPf7Qj6ZZCCokp8jT6QTrnrX9wOYli9cxi7 X-Received: by 2002:a62:ee06:: with SMTP id e6-v6mr1595943pfi.2.1535109980734; Fri, 24 Aug 2018 04:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535109980; cv=none; d=google.com; s=arc-20160816; b=NX2rdA8TWTumSK+6O95aoSAXRs/1lb9OpMiQ2ZIraXWRNrWYcf+4bmeK5qHu0cd4za /4+lmzMXLq6s7Cc8jSGaRECEpWoKx3pAUOVtCril5KFtMjMLE7gPJG4xl4VgmGJZEUAv tqo+IlR/ZSndiXf73nlYMH0PZaiRBzkKK98ahXkzU8TuJY3/0iPwJezvbN+OjjKFdOJg DbcUPRcFEg9gVrVb0MXuqwaOPRMaz7gRxK84/gSdZjlvG5IzKsPvXnBD9IhyWKlO6IRT u+KpfT/LwmH6ueu3SvWEYJSfVzsGMH/wdqVfMAK6VILEQUyL4TNi0jI8ScNLnTNkJFGA Kv9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=1n2mbI82l1/zl/GeBrQaMdKQQy+qBqfDx4zC7edpyh4=; b=sExzcG3sTMd+2bSKviYkFP2IROo0EXobXGTk+ySWKosoDFbG7o65GBPhqpTFUNalAb vHO4bJA6XbZLtpyeeSSsm9+625Ov4/ToRvw6E6kdouyWPQjJGoW8UVhjEcZsP76mqzdC VgkCx/2UDX94etsP/jk3gK56FrlXcO3l1xVejM7X2xclW11TgwPEbTJo0f9SALICqf6C ca1I34FQyV1ed5ArsPefgnTYBVuHO2DbK9EqwpFsL1UV7k01Vp+M8xI3ApGFIhg05VsD yisziCDtwkW2AkoZinnNQbf5rXySsdXXbIe/j/UHQ+ZQ2NxxTTqaotTkazAhNWx+dd+F rZXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 k29-v6si6803117pgf.227.2018.08.24.04.26.05; Fri, 24 Aug 2018 04:26:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727577AbeHXO6x (ORCPT + 99 others); Fri, 24 Aug 2018 10:58:53 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:45878 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726462AbeHXO6w (ORCPT ); Fri, 24 Aug 2018 10:58:52 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1ftACj-0006DO-3K; Fri, 24 Aug 2018 19:24:37 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1ftACh-0001Mm-UL; Fri, 24 Aug 2018 19:24:35 +0800 Date: Fri, 24 Aug 2018 19:24:35 +0800 From: Herbert Xu To: Mikulas Patocka Cc: "David S. Miller" , linux-crypto@vger.kernel.org, Mike Snitzer , dm-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: Deadlock when using crypto API for block devices Message-ID: <20180824112435.ggizlqrymuibm6oo@gondor.apana.org.au> References: <20180824021010.hfar7gasp34ddrib@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 24, 2018 at 07:06:32AM -0400, Mikulas Patocka wrote: > > A quick search through the crypto code shows that ahash_save_req and > seqiv_aead_encrypt return -ENOMEM. > > Will you fix them? These only trigger for unaligned buffers. It would be much better if dm-crypt can ensure that the input/output is properly unaligned and if otherwise do the allocation in dm-crypt. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt