Thread (2 messages) 2 messages, 2 authors, 2021-11-01

Re: [dpdk-dev] [PATCH] net/i40e: fix build for 32-bit

From: Zhang, Qi Z <hidden>
Date: 2021-11-01 01:15:29

-----Original Message-----
From: Yigit, Ferruh <redacted>
Sent: Friday, October 29, 2021 6:37 PM
To: Xing, Beilei <redacted>
Cc: Yigit, Ferruh <redacted>; dev@dpdk.org; Zhang, Qi Z
[off-list ref]
Subject: [PATCH] net/i40e: fix build for 32-bit

Got error with: gcc 11.2.1 "cc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)"

Build error:
In function ‘i40e_flow_parse_fdir_pattern’,
    inlined from ‘i40e_flow_parse_fdir_filter’
    at ../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3052:69:
    error: writing 1 byte into a region of size 0
    [-Werror=stringop-overflow=]
 3052 |                         filter->input.flow_ext.flexbytes[j] =
      |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3053 |                                 raw_spec->pattern[i];
      |                                 ~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/net/i40e/i40e_flow.c:25:
  ../drivers/net/i40e/i40e_flow.c:
  In function ‘i40e_flow_parse_fdir_filter’:
  ../drivers/net/i40e/i40e_ethdev.h:638:17:
  note: at offset 16 into destination object ‘flexbytes’ of size 16
  638 |         uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];
      |                 ^~~~~~~~~

Fixing by adding range checks.

Signed-off-by: Ferruh Yigit <redacted>
Acked-by: Qi Zhang <redacted>

Applied to dpdk-next-net-intel after added below fixline and Cc stable.
Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR")

Thanks
Qi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help