|WARNING| crypto/armv8: validate xform auth key length
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Tue Oct 13 16:14:02 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/171175
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-13
# DPDK Patch Review
## ERRORS
None.
## WARNINGS
### 1. Error return value not using standard DPDK error code
**File:** drivers/crypto/armv8/rte_armv8_pmd.c
**Line:** `return -1;`
The function returns `-1` on error, but DPDK convention is to return negative errno values (e.g., `-EINVAL` for invalid input). Using `-1` directly is less descriptive and doesn't follow the standard error reporting pattern used throughout DPDK.
**Suggested fix:**
```c
if (xform->auth.key.data == NULL ||
xform->auth.key.length > SHA_BLOCK_MAX) {
ARMV8_CRYPTO_LOG_ERR("Invalid authentication key provided.");
return -EINVAL;
}
```
### 2. Missing release notes update
The patch adds new input validation that changes behavior (rejects previously accepted invalid inputs). This is a behavioral change that should be documented in the release notes under the cryptodev section.
**Suggested fix:**
Add an entry to `doc/guides/rel_notes/release_XX_XX.rst` (where XX_XX is the current release) describing the validation improvement.
## INFO
### Documentation improvement suggestion
The error message "Invalid authentication key provided" could be more specific about which condition failed (NULL pointer vs. excessive length). This would help users debug configuration issues more quickly.
**Example:**
```c
if (xform->auth.key.data == NULL) {
ARMV8_CRYPTO_LOG_ERR("Authentication key data pointer is NULL.");
return -EINVAL;
}
if (xform->auth.key.length > SHA_BLOCK_MAX) {
ARMV8_CRYPTO_LOG_ERR("Authentication key length %u exceeds maximum %u.",
xform->auth.key.length, SHA_BLOCK_MAX);
return -EINVAL;
}
```
---
Review-Result: WARNING
More information about the test-report
mailing list