* [ammarfaizi2-block:rostedt/linux-trace/ftrace/core 13/13] kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
@ 2022-01-28 13:32 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-28 13:32 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2161 bytes --]
tree: https://github.com/ammarfaizi2/linux-block rostedt/linux-trace/ftrace/core
head: f125ef075cd648a7794aa0cc61a188b1c40c8f94
commit: f125ef075cd648a7794aa0cc61a188b1c40c8f94 [13/13] tracing: Remove size restriction on synthetic event cmd error logging
config: parisc-randconfig-r011-20220124 (https://download.01.org/0day-ci/archive/20220128/202201282123.aqslEmh4-lkp(a)intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.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://github.com/ammarfaizi2/linux-block/commit/f125ef075cd648a7794aa0cc61a188b1c40c8f94
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block rostedt/linux-trace/ftrace/core
git checkout f125ef075cd648a7794aa0cc61a188b1c40c8f94
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash kernel/trace/
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 >>):
kernel/trace/trace_events_synth.c: In function 'last_cmd_set.part.0':
>> kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
65 | strncpy(last_cmd, str, strlen(str));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +65 kernel/trace/trace_events_synth.c
54
55 static void last_cmd_set(const char *str)
56 {
57 if (!str)
58 return;
59
60 kfree(last_cmd);
61 last_cmd = kzalloc(strlen(str) + 1, GFP_KERNEL);
62 if (!last_cmd)
63 return;
64
> 65 strncpy(last_cmd, str, strlen(str));
66 }
67
---
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] 2+ messages in thread* [ammarfaizi2-block:rostedt/linux-trace/ftrace/core 13/13] kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length
@ 2022-01-28 13:32 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-01-28 13:32 UTC (permalink / raw)
To: Tom Zanussi
Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel,
Steven Rostedt (Google)
tree: https://github.com/ammarfaizi2/linux-block rostedt/linux-trace/ftrace/core
head: f125ef075cd648a7794aa0cc61a188b1c40c8f94
commit: f125ef075cd648a7794aa0cc61a188b1c40c8f94 [13/13] tracing: Remove size restriction on synthetic event cmd error logging
config: parisc-randconfig-r011-20220124 (https://download.01.org/0day-ci/archive/20220128/202201282123.aqslEmh4-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 11.2.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://github.com/ammarfaizi2/linux-block/commit/f125ef075cd648a7794aa0cc61a188b1c40c8f94
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block rostedt/linux-trace/ftrace/core
git checkout f125ef075cd648a7794aa0cc61a188b1c40c8f94
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash kernel/trace/
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 >>):
kernel/trace/trace_events_synth.c: In function 'last_cmd_set.part.0':
>> kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
65 | strncpy(last_cmd, str, strlen(str));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +65 kernel/trace/trace_events_synth.c
54
55 static void last_cmd_set(const char *str)
56 {
57 if (!str)
58 return;
59
60 kfree(last_cmd);
61 last_cmd = kzalloc(strlen(str) + 1, GFP_KERNEL);
62 if (!last_cmd)
63 return;
64
> 65 strncpy(last_cmd, str, strlen(str));
66 }
67
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-28 13:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-28 13:32 [ammarfaizi2-block:rostedt/linux-trace/ftrace/core 13/13] kernel/trace/trace_events_synth.c:65:9: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length kernel test robot
2022-01-28 13:32 ` 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.