Re: [PATCH 03/13] crypto: x86/sha - yield FPU context during long loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 12, 2023 at 04:05:55PM +0800, Herbert Xu wrote:
> On Mon, Dec 19, 2022 at 04:02:13PM -0600, Robert Elliott wrote:
> >
> > @@ -41,9 +41,7 @@ static int sha1_update(struct shash_desc *desc, const u8 *data,
> 
> I just realised a show-stopper with this patch-set.  We don't
> have a desc->flags field that tells us whether we can sleep or
> not.
> 
> I'm currently doing a patch-set for per-request keys and I will
> add a flags field to shash_desc so we could use that for your
> patch-set too.
> 

Right, this used to exist, but it didn't actually do anything, and it had
suffered heavily from bitrot.  For example, some callers specified MAY_SLEEP
when actually they couldn't sleep.  IIRC, some callers also didn't even bother
initializing the flags, so they were passing uninitialized memory.  So I removed
it in commit 877b5691f27a ("crypto: shash - remove shash_desc::flags").

Has there been any consideration of just adding the crypto_shash_update_large()
helper function that I had mentioned in the commit message of 877b5691f27a?

- Eric



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux