|WARNING| [27.03] net/ice: enable DDP loading from FreeBSD kernel module

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Thu Nov 19 19:56:44 CET 2026


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

_AI Code Review_

=== Patch Review: series.patch (via Claude) ===
Review date: 2026-11-19

**Errors**

1. FreeBSD build will fail: the helper is defined under one name and called under another.

   The definition in `ice_ddp_kmod.c` is:

       ice_kmod_get_sect_hdr(const uint8_t *img, size_t img_len, const Elf64_Ehdr *eh, unsigned int idx)

   But all three call sites use a different name:

       *sec = ice_kmod_get_shdr(img, img_len, eh, sym->st_shndx);
       symtab = ice_kmod_get_shdr(img, img_len, eh, i);
       const Elf64_Shdr *strtab = ice_kmod_get_shdr(img, img_len, eh, symtab->sh_link);

   `ice_kmod_get_shdr` is not declared anywhere in the patch. On FreeBSD this gives an implicit-declaration error and an unused static function. The code is inside `#ifdef RTE_EXEC_ENV_FREEBSD`, so Linux CI will not catch it.

   Fix: rename the definition to `ice_kmod_get_shdr`, or rename the three call sites to `ice_kmod_get_sect_hdr`.

**Info**

1. One-byte over-read of the string table in the end-symbol search.

   The first loop rejects names that are not NUL-terminated inside the string table (`len == max_len`). The second loop does not:

       if (strnlen(name, strtab->sh_size - syms[i].st_name) == fw_name_len + end_len &&
               strncmp(name, start_name, fw_name_len) == 0 &&
               strcmp(name + fw_name_len, ICE_KMOD_FW_SYM_END) == 0) {

   Take a malformed module where an unterminated name of exactly `fw_name_len + end_len` bytes ends the string table. The `strcmp()` will then read one byte past the string table. If the string table is at the end of the file, that byte is past the mapped file length.

   Fix: compute `max_len` as in the first loop and also require `len < max_len`. Alternatively, use `memcmp()` on the known length instead of `strcmp()`.

2. Consider adding a line to the 27.03 release notes for the new FreeBSD DDP loading fallback in net/ice.

Review-Result: ERROR


More information about the test-report mailing list