* drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
@ 2022-01-04 12:02 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-01-04 12:02 UTC (permalink / raw)
To: Huazhong Tan; +Cc: kbuild-all, linux-kernel
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 77e9184869c9fb00a482357ea8eef3bd7ae3d45a net: hns3: refactor dump bd info of debugfs
date: 8 months ago
config: x86_64-buildonly-randconfig-r006-20220103 (https://download.01.org/0day-ci/archive/20220104/202201041959.jwL02W69-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77e9184869c9fb00a482357ea8eef3bd7ae3d45a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 77e9184869c9fb00a482357ea8eef3bd7ae3d45a
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/hisilicon/hns3/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c: In function 'hns3_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:125:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
125 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +127 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
114
115 static void hns3_dbg_fill_content(char *content, u16 len,
116 const struct hns3_dbg_item *items,
117 const char **result, u16 size)
118 {
119 char *pos = content;
120 u16 i;
121
122 memset(content, ' ', len);
123 for (i = 0; i < size; i++) {
124 if (result)
125 strncpy(pos, result[i], strlen(result[i]));
126 else
> 127 strncpy(pos, items[i].name, strlen(items[i].name));
128
129 pos += strlen(items[i].name) + items[i].interval;
130 }
131
132 *pos++ = '\n';
133 *pos++ = '\0';
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
@ 2022-01-04 12:02 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-01-04 12:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2690 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c9e6606c7fe92b50a02ce51dda82586ebdf99b48
commit: 77e9184869c9fb00a482357ea8eef3bd7ae3d45a net: hns3: refactor dump bd info of debugfs
date: 8 months ago
config: x86_64-buildonly-randconfig-r006-20220103 (https://download.01.org/0day-ci/archive/20220104/202201041959.jwL02W69-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77e9184869c9fb00a482357ea8eef3bd7ae3d45a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 77e9184869c9fb00a482357ea8eef3bd7ae3d45a
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/ethernet/hisilicon/hns3/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c: In function 'hns3_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:125:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
125 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +127 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
114
115 static void hns3_dbg_fill_content(char *content, u16 len,
116 const struct hns3_dbg_item *items,
117 const char **result, u16 size)
118 {
119 char *pos = content;
120 u16 i;
121
122 memset(content, ' ', len);
123 for (i = 0; i < size; i++) {
124 if (result)
125 strncpy(pos, result[i], strlen(result[i]));
126 else
> 127 strncpy(pos, items[i].name, strlen(items[i].name));
128
129 pos += strlen(items[i].name) + items[i].interval;
130 }
131
132 *pos++ = '\n';
133 *pos++ = '\0';
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
@ 2021-07-09 5:45 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-07-09 5:45 UTC (permalink / raw)
To: Huazhong Tan; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2718 bytes --]
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f55966571d5eb2876a11e48e798b4592fa1ffbb7
commit: 77e9184869c9fb00a482357ea8eef3bd7ae3d45a net: hns3: refactor dump bd info of debugfs
date: 8 weeks ago
config: alpha-buildonly-randconfig-r003-20210709 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77e9184869c9fb00a482357ea8eef3bd7ae3d45a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 77e9184869c9fb00a482357ea8eef3bd7ae3d45a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c: In function 'hns3_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:125:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
125 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +127 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
114
115 static void hns3_dbg_fill_content(char *content, u16 len,
116 const struct hns3_dbg_item *items,
117 const char **result, u16 size)
118 {
119 char *pos = content;
120 u16 i;
121
122 memset(content, ' ', len);
123 for (i = 0; i < size; i++) {
124 if (result)
125 strncpy(pos, result[i], strlen(result[i]));
126 else
> 127 strncpy(pos, items[i].name, strlen(items[i].name));
128
129 pos += strlen(items[i].name) + items[i].interval;
130 }
131
132 *pos++ = '\n';
133 *pos++ = '\0';
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35863 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
@ 2021-07-09 5:45 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-07-09 5:45 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2782 bytes --]
Hi Huazhong,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f55966571d5eb2876a11e48e798b4592fa1ffbb7
commit: 77e9184869c9fb00a482357ea8eef3bd7ae3d45a net: hns3: refactor dump bd info of debugfs
date: 8 weeks ago
config: alpha-buildonly-randconfig-r003-20210709 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=77e9184869c9fb00a482357ea8eef3bd7ae3d45a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 77e9184869c9fb00a482357ea8eef3bd7ae3d45a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c: In function 'hns3_dbg_fill_content.constprop':
>> drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
127 | strncpy(pos, items[i].name, strlen(items[i].name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:125:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
125 | strncpy(pos, result[i], strlen(result[i]));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +127 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
114
115 static void hns3_dbg_fill_content(char *content, u16 len,
116 const struct hns3_dbg_item *items,
117 const char **result, u16 size)
118 {
119 char *pos = content;
120 u16 i;
121
122 memset(content, ' ', len);
123 for (i = 0; i < size; i++) {
124 if (result)
125 strncpy(pos, result[i], strlen(result[i]));
126 else
> 127 strncpy(pos, items[i].name, strlen(items[i].name));
128
129 pos += strlen(items[i].name) + items[i].interval;
130 }
131
132 *pos++ = '\n';
133 *pos++ = '\0';
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35863 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-04 12:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-04 12:02 drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c:127:4: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length kernel test robot
2022-01-04 12:02 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-07-09 5:45 kernel test robot
2021-07-09 5:45 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.