|WARNING| [v5, 5/5] app/crypto-perf: fix PQC test vector output buffer handling

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Nov 30 12:57:06 CET 2026


Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/173416

_AI Code Review_

warning: review has no Review-Result line, severity inferred from prose (response may be truncated)
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-30

**Patch 4/5: app/crypto-perf: add ML-DSA sign support**

**Error: ML-DSA-65 message changed without a matching signature**

```c
static const uint8_t mldsa_65_message[] = {
-	0x60, 0xD4, 0x8C, 0xF2, 0x61, 0x6D, 0xB0, 0xB6,
+	0x1C, 0x00, 0x00, 0x00, 0x61, 0x6D, 0xB0, 0xB6,
```

`mldsa_verify_perf_data[1]` still pairs `mldsa_65_message` with the unchanged `mldsa_65_sign_dtrm`. If that signature was computed over the original message, ML-DSA-65 verify now fails on every op. If this change is intentional, regenerate `mldsa_65_sign_dtrm`, or keep separate message arrays for sign and verify.

**Warning: function-static buffers are shared by all lcores and all ops**

```c
static uint8_t sign_buf[4627];    /* ML-DSA-87 sign max */
...
static uint8_t cipher_buf[1568]; /* ML-KEM-1024 cipher max */
static uint8_t sk_buf[32];       /* shared key (32 bytes) */
```

`populate_ops` runs concurrently on every worker lcore. Each call re-`memcpy()`s into these buffers while other lcores' in-flight ops are still reading them. Every op in every burst also writes its output (signature, ciphertext, shared key) to the same location. Patch 5 replaces this, but this commit is racy on its own.

**Info:** this patch changes `mldsa_65_seed`/`mldsa_87_seed` from `static const` to non-static globals. That only silences the unused-variable warning, and the arrays are still unused. Remove them, or remove them in patch 3 where they were added.

**Patch 5/5: app/crypto-perf: fix PQC test vector output buffer handling**

**Error: the ML-DSA verify signature buffer is never initialised**

```c
		t_vec->mldsa.sign.data = rte_malloc(NULL,
				(size_t)d->sign.length * options->nb_descriptors, 0);
		if (t_vec->mldsa.sign.data == NULL)
			goto err_free;
		t_vec->mldsa.sign.length = d->sign.length;
```

There is no `memcpy()` from `d->sign.data`. Verify ops then use this buffer as


More information about the test-report mailing list