All of lore.kernel.org
 help / color / mirror / Atom feed
* talitos b0030000.crypto: length exceeds h/w max limit
       [not found]     ` <10231361.cnp4CI42qt@positron.chronox.de>
@ 2022-08-06 15:45       ` Christophe Leroy
  2022-08-07  0:38         ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2022-08-06 15:45 UTC (permalink / raw)
  To: Stephan Müller, Herbert Xu, David S. Miller
  Cc: Linux Crypto Mailing List

Hi,

Le 31/07/2019 à 09:11, Stephan Müller a écrit :
>>>>> If I remember correctly, the implementation with vmsplice was slower by
>>>>> a
>>>>> factor of 10 compared to sendmsg on the ISO image on an x86 system.
>>>>
>>>> At the time being I have an issue with this fix, because the talitos
>>>> driver only accepts 32k bytes at a time. With vmsplice, data is handed
>>>> over to the driver by blocks of PAGE_SIZE (16k in my case). With
>>>> sendmsg(), data is handed over to the driver with a single block.
>>>
>>> Ok. But wouldn't your driver need to process the data in the chunk size
>>> your hardware requires?
>>
>> Sure it needs to process the data in the chunk size the HW requires, but
>> do you know if there is a way to tell the core than the driver doesn't
>> accepts chunks of more than 32kbytes, or shall the driver be able to
>> handle data of any size ?
> 
> Coming back to this: Were you able to find a fix?

As far as I know the problem still exists.

We want to upgrade libkcapi on our target, but still facing the issue 
with libkcapi newer than 1.1.3 : When a file is bigger than 32 Kb, 
hashing operation (md5 or sha256) fails and the kernel prints the 
following message:

[ 2369.772999] talitos b0030000.crypto: length exceeds h/w max limit

Is there a way to tell crypto kernel core that a given driver has a 
fixed limit and that data shall be sent in chunks ? Or is it the 
responsibility of the driver to cut off the data in acceptable chunks ? 
I guess the Talitos driver is not the only driver with such a limit, so 
something centralised must exist to handle it ?

Thanks
Christophe

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: talitos b0030000.crypto: length exceeds h/w max limit
  2022-08-06 15:45       ` talitos b0030000.crypto: length exceeds h/w max limit Christophe Leroy
@ 2022-08-07  0:38         ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2022-08-07  0:38 UTC (permalink / raw)
  To: Christophe Leroy
  Cc: Stephan Müller, David S. Miller, Linux Crypto Mailing List

On Sat, Aug 06, 2022 at 05:45:25PM +0200, Christophe Leroy wrote:
>
> Is there a way to tell crypto kernel core that a given driver has a fixed
> limit and that data shall be sent in chunks ? Or is it the responsibility of
> the driver to cut off the data in acceptable chunks ? I guess the Talitos
> driver is not the only driver with such a limit, so something centralised
> must exist to handle it ?

There is no length limit on the interface between the Crypto API
and the drivers.  If the hardware is unable to handle requests
longer than a certain size, then the driver should handle it by
splitting up the SG list or using a fallback.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-07  0:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4d9e644d-3d2d-518a-3d05-2539c69d88c1@c-s.fr>
     [not found] ` <1955828.3d07pK88Qj@tauon.chronox.de>
     [not found]   ` <326109a3-bb5c-eac4-1340-70c179a3ad2a@c-s.fr>
     [not found]     ` <10231361.cnp4CI42qt@positron.chronox.de>
2022-08-06 15:45       ` talitos b0030000.crypto: length exceeds h/w max limit Christophe Leroy
2022-08-07  0:38         ` Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.