lkml.org 
[lkml]   [2022]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 08/19] crypto: x86/ghash - limit FPU preemption
Date


> > + while (srclen >= GHASH_BLOCK_SIZE) {
> > + unsigned int fpulen = min(srclen, FPU_BYTES);
> > +
> > + kernel_fpu_begin();
> > + while (fpulen >= GHASH_BLOCK_SIZE) {
> > + int n = min_t(unsigned int, fpulen, GHASH_BLOCK_SIZE);
> > +
> > + clmul_ghash_update(dst, src, n, &ctx->shash);
> > +
> > + srclen -= n;
> > + fpulen -= n;
> > + src += n;
> > + }
> > + kernel_fpu_end();
> > + }
>
> Another loop that doesn't make sense. Why is this only passing 16 bytes at a
> time into the assembly code? There shouldn't be an inner loop here at all.

Thanks, copied the pattern from another function whose assembly function
had a size limit. clmul_ghash_update looks ready for all sizes, so I'll
simplify that.

\
 
 \ /
  Last update: 2022-10-14 00:52    [W:0.262 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site