On Thu, Oct 14, 2021 at 7:55 PM Vladimir Medvedkin <vladimir.medved...@intel.com> wrote: > > This patch fixes buffer overflow reported by ASAN, > please reference https://bugs.dpdk.org/show_bug.cgi?id=818 > > Some tests for the rte_hash table use the rte_jhash_32b() as > the hash function. This hash function interprets the length > argument in units of 4 bytes. > > This patch adds a wrapper function around rte_jhash_32b() > to reflect API differences regarding the length argument, > effectively dividing it by 4. > > For some tests rte_jhash() is used with keys of length not > a multiple of 4 bytes. From the rte_jhash() documentation: > If input key is not aligned to four byte boundaries or a > multiple of four bytes in length, the memory region just > after may be read (but not used in the computation). > > This patch increases the size of the proto field of the > flow_key struct up to uint32_t. > > Bugzilla ID: 818 > Fixes: af75078fece3 ("first public release") > Cc: sta...@dpdk.org > > Signed-off-by: Vladimir Medvedkin <vladimir.medved...@intel.com> Acked-by: Yipeng Wang <yipeng1.w...@intel.com>
Removed a few comments in code (about previous size of flow_key struct), and applied. Thanks. -- David Marchand