[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210250513.6x0M6cQ8-lkp@intel.com>
Date: Tue, 25 Oct 2022 05:14:19 +0800
From: kernel test robot <lkp@...el.com>
To: Kees Cook <keescook@...omium.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marco Elver <elver@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: [linux-stable-rc:linux-5.15.y 4376/9999]
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:967:12: warning:
stack frame size (1040) exceeds limit (1024) in 'hclge_dbg_dump_tm_pri'
Hi Kees,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.15.y
head: 98108584d3851344414a5397dcff2c6f0a6cf9dd
commit: 33db9912ff7c491f839c89a08e98f755aa09598f [4376/9999] ubsan: remove CONFIG_UBSAN_OBJECT_SIZE
config: powerpc-allmodconfig
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=33db9912ff7c491f839c89a08e98f755aa09598f
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.15.y
git checkout 33db9912ff7c491f839c89a08e98f755aa09598f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:967:12: warning: stack frame size (1040) exceeds limit (1024) in 'hclge_dbg_dump_tm_pri' [-Wframe-larger-than]
static int hclge_dbg_dump_tm_pri(struct hclge_dev *hdev, char *buf, int len)
^
1 warning generated.
vim +/hclge_dbg_dump_tm_pri +967 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
04d96139ddb32d Guangbin Huang 2021-08-30 966
04987ca1b9b684 Guangbin Huang 2021-01-28 @967 static int hclge_dbg_dump_tm_pri(struct hclge_dev *hdev, char *buf, int len)
04987ca1b9b684 Guangbin Huang 2021-01-28 968 {
04d96139ddb32d Guangbin Huang 2021-08-30 969 char data_str[ARRAY_SIZE(tm_pri_items)][HCLGE_DBG_DATA_STR_LEN];
04d96139ddb32d Guangbin Huang 2021-08-30 970 struct hclge_tm_shaper_para c_shaper_para, p_shaper_para;
04d96139ddb32d Guangbin Huang 2021-08-30 971 char *result[ARRAY_SIZE(tm_pri_items)], *sch_mode_str;
04d96139ddb32d Guangbin Huang 2021-08-30 972 char content[HCLGE_DBG_TM_INFO_LEN];
04d96139ddb32d Guangbin Huang 2021-08-30 973 u8 pri_num, sch_mode, weight, i, j;
04d96139ddb32d Guangbin Huang 2021-08-30 974 int pos, ret;
04987ca1b9b684 Guangbin Huang 2021-01-28 975
04987ca1b9b684 Guangbin Huang 2021-01-28 976 ret = hclge_tm_get_pri_num(hdev, &pri_num);
04987ca1b9b684 Guangbin Huang 2021-01-28 977 if (ret)
04987ca1b9b684 Guangbin Huang 2021-01-28 978 return ret;
04987ca1b9b684 Guangbin Huang 2021-01-28 979
04d96139ddb32d Guangbin Huang 2021-08-30 980 for (i = 0; i < ARRAY_SIZE(tm_pri_items); i++)
04d96139ddb32d Guangbin Huang 2021-08-30 981 result[i] = &data_str[i][0];
04d96139ddb32d Guangbin Huang 2021-08-30 982
04d96139ddb32d Guangbin Huang 2021-08-30 983 hclge_dbg_fill_content(content, sizeof(content), tm_pri_items,
04d96139ddb32d Guangbin Huang 2021-08-30 984 NULL, ARRAY_SIZE(tm_pri_items));
04d96139ddb32d Guangbin Huang 2021-08-30 985 pos = scnprintf(buf, len, "%s", content);
04987ca1b9b684 Guangbin Huang 2021-01-28 986
04987ca1b9b684 Guangbin Huang 2021-01-28 987 for (i = 0; i < pri_num; i++) {
04987ca1b9b684 Guangbin Huang 2021-01-28 988 ret = hclge_tm_get_pri_sch_mode(hdev, i, &sch_mode);
04987ca1b9b684 Guangbin Huang 2021-01-28 989 if (ret)
04987ca1b9b684 Guangbin Huang 2021-01-28 990 return ret;
04987ca1b9b684 Guangbin Huang 2021-01-28 991
04987ca1b9b684 Guangbin Huang 2021-01-28 992 ret = hclge_tm_get_pri_weight(hdev, i, &weight);
04987ca1b9b684 Guangbin Huang 2021-01-28 993 if (ret)
04987ca1b9b684 Guangbin Huang 2021-01-28 994 return ret;
04987ca1b9b684 Guangbin Huang 2021-01-28 995
04987ca1b9b684 Guangbin Huang 2021-01-28 996 ret = hclge_tm_get_pri_shaper(hdev, i,
04987ca1b9b684 Guangbin Huang 2021-01-28 997 HCLGE_OPC_TM_PRI_C_SHAPPING,
04987ca1b9b684 Guangbin Huang 2021-01-28 998 &c_shaper_para);
04987ca1b9b684 Guangbin Huang 2021-01-28 999 if (ret)
04987ca1b9b684 Guangbin Huang 2021-01-28 1000 return ret;
04987ca1b9b684 Guangbin Huang 2021-01-28 1001
04987ca1b9b684 Guangbin Huang 2021-01-28 1002 ret = hclge_tm_get_pri_shaper(hdev, i,
04987ca1b9b684 Guangbin Huang 2021-01-28 1003 HCLGE_OPC_TM_PRI_P_SHAPPING,
04987ca1b9b684 Guangbin Huang 2021-01-28 1004 &p_shaper_para);
04987ca1b9b684 Guangbin Huang 2021-01-28 1005 if (ret)
04987ca1b9b684 Guangbin Huang 2021-01-28 1006 return ret;
04987ca1b9b684 Guangbin Huang 2021-01-28 1007
04987ca1b9b684 Guangbin Huang 2021-01-28 1008 sch_mode_str = sch_mode & HCLGE_TM_TX_SCHD_DWRR_MSK ? "dwrr" :
04987ca1b9b684 Guangbin Huang 2021-01-28 1009 "sp";
04987ca1b9b684 Guangbin Huang 2021-01-28 1010
04d96139ddb32d Guangbin Huang 2021-08-30 1011 j = 0;
04d96139ddb32d Guangbin Huang 2021-08-30 1012 sprintf(result[j++], "%04u", i);
04d96139ddb32d Guangbin Huang 2021-08-30 1013 sprintf(result[j++], "%4s", sch_mode_str);
04d96139ddb32d Guangbin Huang 2021-08-30 1014 sprintf(result[j++], "%3u", weight);
04d96139ddb32d Guangbin Huang 2021-08-30 1015 hclge_dbg_fill_shaper_content(&c_shaper_para, result, &j);
04d96139ddb32d Guangbin Huang 2021-08-30 1016 hclge_dbg_fill_shaper_content(&p_shaper_para, result, &j);
04d96139ddb32d Guangbin Huang 2021-08-30 1017 hclge_dbg_fill_content(content, sizeof(content), tm_pri_items,
04d96139ddb32d Guangbin Huang 2021-08-30 1018 (const char **)result,
04d96139ddb32d Guangbin Huang 2021-08-30 1019 ARRAY_SIZE(tm_pri_items));
04d96139ddb32d Guangbin Huang 2021-08-30 1020 pos += scnprintf(buf + pos, len - pos, "%s", content);
04987ca1b9b684 Guangbin Huang 2021-01-28 1021 }
04987ca1b9b684 Guangbin Huang 2021-01-28 1022
04987ca1b9b684 Guangbin Huang 2021-01-28 1023 return 0;
04987ca1b9b684 Guangbin Huang 2021-01-28 1024 }
04987ca1b9b684 Guangbin Huang 2021-01-28 1025
:::::: The code at line 967 was first introduced by commit
:::::: 04987ca1b9b6841cfa5f9b459c5a270b75c89345 net: hns3: add debugfs support for tm nodes, priority and qset info
:::::: TO: Guangbin Huang <huangguangbin2@...wei.com>
:::::: CC: Jakub Kicinski <kuba@...nel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (300904 bytes)
Powered by blists - more mailing lists