From: kernel test robot <lkp@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>
Subject: arch/x86/kernel/callthunks.c:332:35: warning: '%lu' directive writing between 1 and 10 bytes into a region of size 7
Date: Mon, 2 Dec 2024 04:53:39 +0800 [thread overview]
Message-ID: <202412020442.t7EqpHvu-lkp@intel.com> (raw)
Hi Thomas,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bcc8eda6d34934d80b96adb8dc4ff5dfc632a53a
commit: f5c1bb2afe93396d41c5cbdcb909b08a75b8dde4 x86/calldepth: Add ret/call counting for debug
date: 2 years, 2 months ago
config: x86_64-randconfig-103-20241116 (https://download.01.org/0day-ci/archive/20241202/202412020442.t7EqpHvu-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412020442.t7EqpHvu-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412020442.t7EqpHvu-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kernel/callthunks.c: In function 'callthunks_debugfs_init':
>> arch/x86/kernel/callthunks.c:332:35: warning: '%lu' directive writing between 1 and 10 bytes into a region of size 7 [-Wformat-overflow=]
332 | sprintf(name, "cpu%lu", cpu);
| ^~~
arch/x86/kernel/callthunks.c:332:31: note: directive argument in the range [0, 4294967294]
332 | sprintf(name, "cpu%lu", cpu);
| ^~~~~~~~
arch/x86/kernel/callthunks.c:332:17: note: 'sprintf' output between 5 and 14 bytes into a destination of size 10
332 | sprintf(name, "cpu%lu", cpu);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +332 arch/x86/kernel/callthunks.c
321
322 static int __init callthunks_debugfs_init(void)
323 {
324 struct dentry *dir;
325 unsigned long cpu;
326
327 dir = debugfs_create_dir("callthunks", NULL);
328 for_each_possible_cpu(cpu) {
329 void *arg = (void *)cpu;
330 char name [10];
331
> 332 sprintf(name, "cpu%lu", cpu);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2024-12-01 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 20:53 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-07 1:39 arch/x86/kernel/callthunks.c:332:35: warning: '%lu' directive writing between 1 and 10 bytes into a region of size 7 kernel test robot
2023-12-23 17:44 kernel test robot
2023-11-05 8:22 kernel test robot
2023-10-29 0:55 kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412020442.t7EqpHvu-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox