From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751661AbeBTKe5 (ORCPT ); Tue, 20 Feb 2018 05:34:57 -0500 Received: from orcrist.hmeau.com ([104.223.48.154]:53326 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172AbeBTKe4 (ORCPT ); Tue, 20 Feb 2018 05:34:56 -0500 Date: Tue, 20 Feb 2018 18:34:36 +0800 From: Herbert Xu To: Horia =?utf-8?Q?Geant=C4=83?= Cc: Christophe LEROY , "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH 16/18] crypto: talitos - do hw_context DMA mapping outside the requests Message-ID: <20180220103436.GA20571@gondor.apana.org.au> References: <2338eb8d-a26a-9722-d667-5a9785b32977@c-s.fr> <630c313c-5eca-224d-a5ac-fb3f2783573a@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 19, 2018 at 01:16:30PM +0000, Horia Geantă wrote: > > > And what about ALGIF path from user space ? > > What if the user never calls the last sendmsg() which will call > > hash_finup() ? > > > User is expected to follow the rules of the crypto API. > Of course, kernel won't (or at least shouldn't) crash in case of misuse. > However, in these cases some resources might not be freed - it's unavoidable. the crypto API does not require the presence of a finalisation. It is entirely optional. So leaving resources pinned down until final/finup occurs is unacceptable, both from user-space and the kernel. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt