| db631975 | 26-Feb-2018 |
John Baldwin <[email protected]> |
Don't overflow the ipad[] array when clearing the remainder.
After the auth key is copied into the ipad[] array, any remaining bytes are cleared to zero (in case the key is shorter than one block si
Don't overflow the ipad[] array when clearing the remainder.
After the auth key is copied into the ipad[] array, any remaining bytes are cleared to zero (in case the key is shorter than one block size). The full block size was used as the length of the zero rather than the size of the remaining ipad[]. In practice this overflow was harmless as it could only clear bytes in the following opad[] array which is initialized with a copy of ipad[] in the next statement.
Sponsored by: Chelsio Communications
show more ...
|
| c0154062 | 24-Jan-2018 |
John Baldwin <[email protected]> |
Store IV in output buffer in GCM software fallback when requested.
Properly honor the lack of the CRD_F_IV_PRESENT flag in the GCM software fallback case for encryption requests.
Submitted by: Hars
Store IV in output buffer in GCM software fallback when requested.
Properly honor the lack of the CRD_F_IV_PRESENT flag in the GCM software fallback case for encryption requests.
Submitted by: Harsh Jain @ Chelsio Sponsored by: Chelsio Communications
show more ...
|
| 2bc40b6c | 24-Jan-2018 |
John Baldwin <[email protected]> |
Don't read or generate an IV until all error checking is complete.
In particular, this avoids edge cases where a generated IV might be written into the output buffer even though the request is faile
Don't read or generate an IV until all error checking is complete.
In particular, this avoids edge cases where a generated IV might be written into the output buffer even though the request is failed with an error.
Sponsored by: Chelsio Communications
show more ...
|
| 04043b3d | 24-Jan-2018 |
John Baldwin <[email protected]> |
Expand the software fallback for GCM to cover more cases.
- Extend ccr_gcm_soft() to handle requests with a non-empty payload. While here, switch to allocating the GMAC context instead of placing
Expand the software fallback for GCM to cover more cases.
- Extend ccr_gcm_soft() to handle requests with a non-empty payload. While here, switch to allocating the GMAC context instead of placing it on the stack since it is over 1KB in size. - Allow ccr_gcm() to return a special error value (EMSGSIZE) which triggers a fallback to ccr_gcm_soft(). Move the existing empty payload check into ccr_gcm() and change a few other cases (e.g. large AAD) to fallback to software via EMSGSIZE as well. - Add a new 'sw_fallback' stat to count the number of requests processed via the software fallback.
Submitted by: Harsh Jain @ Chelsio (original version) Sponsored by: Chelsio Communications
show more ...
|
| bf5b6620 | 24-Jan-2018 |
John Baldwin <[email protected]> |
Clamp DSGL entries to a length of 2KB.
This works around an issue in the T6 that can result in DMA engine stalls if an error occurs while processing a DSGL entry with a length larger than 2KB.
Subm
Clamp DSGL entries to a length of 2KB.
This works around an issue in the T6 that can result in DMA engine stalls if an error occurs while processing a DSGL entry with a length larger than 2KB.
Submitted by: Harsh Jain @ Chelsio Sponsored by: Chelsio Communications
show more ...
|
| f7b61e2f | 24-Jan-2018 |
John Baldwin <[email protected]> |
Fail crypto requests when the resulting work request is too large.
Most crypto requests will not trigger this condition, but a request with a highly-fragmented data buffer (and a resulting "large" S
Fail crypto requests when the resulting work request is too large.
Most crypto requests will not trigger this condition, but a request with a highly-fragmented data buffer (and a resulting "large" S/G list) could trigger it.
Sponsored by: Chelsio Communications
show more ...
|
| 5929c9fb | 24-Jan-2018 |
John Baldwin <[email protected]> |
Don't discard AAD and IV output data for AEAD requests.
The T6 can hang when processing certain AEAD requests if the request sets a flag asking the crypto engine to discard the input IV and AAD rath
Don't discard AAD and IV output data for AEAD requests.
The T6 can hang when processing certain AEAD requests if the request sets a flag asking the crypto engine to discard the input IV and AAD rather than copying them into the output buffer. The existing driver always discards the IV and AAD as we do not need it. As a workaround, allocate a single "dummy" buffer when the ccr driver attaches and change all AEAD requests to write the IV and AAD to this scratch buffer. The contents of the scratch buffer are never used (similar to "bogus_page"), and it is ok for multiple in-flight requests to share this dummy buffer.
Submitted by: Harsh Jain @ Chelsio (original version) Sponsored by: Chelsio Communications
show more ...
|
| acaabdbb | 24-Jan-2018 |
John Baldwin <[email protected]> |
Reject requests with AAD and IV larger than 511 bytes.
The T6 crypto engine's control messages only support a total AAD length (including the prefixed IV) of 511 bytes. Reject requests with large A
Reject requests with AAD and IV larger than 511 bytes.
The T6 crypto engine's control messages only support a total AAD length (including the prefixed IV) of 511 bytes. Reject requests with large AAD rather than returning incorrect results.
Sponsored by: Chelsio Communications
show more ...
|