From: Herbert Xu Subject: Re: [PATCH 16/18] crypto: talitos - do hw_context DMA mapping outside the requests Date: Tue, 20 Feb 2018 18:34:36 +0800 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-Transfer-Encoding: 8bit Cc: "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "David S. Miller" , "linux-crypto@vger.kernel.org" To: Horia =?utf-8?Q?Geant=C4=83?= Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: linux-crypto.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