CC: [email protected] In-Reply-To: <[email protected]> References: <[email protected]> TO: Volodymyr Mytnyk <[email protected]>
Hi Volodymyr, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Volodymyr-Mytnyk/net-prestera-acl-add-multi-chain-support-offload/20220214-162249 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 867b1db874c93ceb86f9e10ef021e70c38cc4b4d :::::: branch date: 14 hours ago :::::: commit date: 14 hours ago config: m68k-randconfig-m031-20220213 (https://download.01.org/0day-ci/archive/20220215/[email protected]/config) compiler: m68k-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: drivers/net/ethernet/marvell/prestera/prestera_acl.c:103 prestera_acl_chain_to_client() error: buffer overflow 'client_map' 3 <= 3 vim +/client_map +103 drivers/net/ethernet/marvell/prestera/prestera_acl.c 47327e198d42c77 Volodymyr Mytnyk 2021-11-30 91 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 92 int prestera_acl_chain_to_client(u32 chain_index, u32 *client) 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 93 { 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 94 u32 client_map[] = { 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 95 PRESTERA_HW_COUNTER_CLIENT_LOOKUP_0, 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 96 PRESTERA_HW_COUNTER_CLIENT_LOOKUP_1, 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 97 PRESTERA_HW_COUNTER_CLIENT_LOOKUP_2 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 98 }; 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 99 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 100 if (chain_index > ARRAY_SIZE(client_map)) 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 101 return -EINVAL; 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 102 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 @103 *client = client_map[chain_index]; 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 104 return 0; 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 105 } 4ae36a7c976197f Volodymyr Mytnyk 2022-02-14 106 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected] _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
