linux/drivers/net/ethernet/intel
Gustavo A. R. Silva eefa5311c3 ixgbe: Fix out-bounds warning in ixgbe_host_interface_command()
Replace union with a couple of pointers in order to fix the following
out-of-bounds warning:

  CC [M]  drivers/net/ethernet/intel/ixgbe/ixgbe_common.o
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c: In function ‘ixgbe_host_interface_command’:
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:3729:13: warning: array subscript 1 is above array bounds of ‘u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
 3729 |   bp->u32arr[bi] = IXGBE_READ_REG_ARRAY(hw, IXGBE_FLEX_MNG, bi);
      |   ~~~~~~~~~~^~~~
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c:3682:7: note: while referencing ‘u32arr’
 3682 |   u32 u32arr[1];
      |       ^~~~~~

This helps with the ongoing efforts to globally enable -Warray-bounds.

Link: https://github.com/KSPP/linux/issues/109
Co-developed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20210527173424.362456-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-05-27 16:10:00 -07:00
..
e1000 intel: remove checker warning 2021-05-26 09:11:40 -07:00
e1000e net: e1000e: fix misspell word "retreived" 2021-05-19 12:23:25 -07:00
fm10k fm10k: move error check 2021-05-26 09:11:41 -07:00
i40e i40e: Remove LLDP frame filters 2021-05-07 09:35:49 -07:00
iavf iavf: redefine the magic number for FDIR GTP-U header fields 2021-04-23 09:34:19 -07:00
ice ice: Support RSS configure removal for AVF 2021-04-22 09:26:22 -07:00
igb igb: override two checker warnings 2021-05-26 09:11:41 -07:00
igbvf igbvf: convert to strongly typed descriptors 2021-05-26 09:11:41 -07:00
igc igb/igc: use strongly typed pointer 2021-05-26 09:11:41 -07:00
ixgb intel: handle unused assignments 2020-09-25 16:28:59 -07:00
ixgbe ixgbe: Fix out-bounds warning in ixgbe_host_interface_command() 2021-05-27 16:10:00 -07:00
ixgbevf intel: call csum functions with well formatted arguments 2021-05-26 09:11:41 -07:00
e100.c e100: handle eeprom as little endian 2021-05-26 09:11:40 -07:00
Kconfig ice: replace custom AIM algorithm with kernel's DIM library 2021-04-14 17:00:05 -07:00
Makefile