From: kernel test robot <lkp@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 12846/12910] arch/x86/kernel/cpu/microcode/amd.c:504:58: warning: 'h.bin' directive output may be truncated writing 5 bytes into a region of size between 1 and 7
Date: Fri, 25 Aug 2023 22:53:54 +0800 [thread overview]
Message-ID: <202308252255.2HPJ6x5Q-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 6269320850097903b30be8f07a5c61d9f7592393
commit: 0396ebf8fb52069f18d7b947e9313c32b858a2f9 [12846/12910] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20230825/202308252255.2HPJ6x5Q-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230825/202308252255.2HPJ6x5Q-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/202308252255.2HPJ6x5Q-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/x86/kernel/cpu/microcode/amd.c: In function 'find_blobs_in_containers':
>> arch/x86/kernel/cpu/microcode/amd.c:504:58: warning: 'h.bin' directive output may be truncated writing 5 bytes into a region of size between 1 and 7 [-Wformat-truncation=]
504 | "amd-ucode/microcode_amd_fam%.2xh.bin", family);
| ^~~~~
arch/x86/kernel/cpu/microcode/amd.c:503:17: note: 'snprintf' output between 35 and 41 bytes into a destination of size 36
503 | snprintf(fw_name, sizeof(fw_name),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
504 | "amd-ucode/microcode_amd_fam%.2xh.bin", family);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +504 arch/x86/kernel/cpu/microcode/amd.c
fe055896c040df Borislav Petkov 2015-10-20 493
06b8534cb72837 Borislav Petkov 2016-10-25 494 static bool get_builtin_microcode(struct cpio_data *cp, unsigned int family)
fe055896c040df Borislav Petkov 2015-10-20 495 {
fe055896c040df Borislav Petkov 2015-10-20 496 char fw_name[36] = "amd-ucode/microcode_amd.bin";
9d48960414c708 Borislav Petkov 2021-10-21 497 struct firmware fw;
9d48960414c708 Borislav Petkov 2021-10-21 498
9d48960414c708 Borislav Petkov 2021-10-21 499 if (IS_ENABLED(CONFIG_X86_32))
9d48960414c708 Borislav Petkov 2021-10-21 500 return false;
fe055896c040df Borislav Petkov 2015-10-20 501
fe055896c040df Borislav Petkov 2015-10-20 502 if (family >= 0x15)
fe055896c040df Borislav Petkov 2015-10-20 503 snprintf(fw_name, sizeof(fw_name),
fe055896c040df Borislav Petkov 2015-10-20 @504 "amd-ucode/microcode_amd_fam%.2xh.bin", family);
fe055896c040df Borislav Petkov 2015-10-20 505
9d48960414c708 Borislav Petkov 2021-10-21 506 if (firmware_request_builtin(&fw, fw_name)) {
9d48960414c708 Borislav Petkov 2021-10-21 507 cp->size = fw.size;
9d48960414c708 Borislav Petkov 2021-10-21 508 cp->data = (void *)fw.data;
9d48960414c708 Borislav Petkov 2021-10-21 509 return true;
9d48960414c708 Borislav Petkov 2021-10-21 510 }
9d48960414c708 Borislav Petkov 2021-10-21 511
fe055896c040df Borislav Petkov 2015-10-20 512 return false;
fe055896c040df Borislav Petkov 2015-10-20 513 }
fe055896c040df Borislav Petkov 2015-10-20 514
:::::: The code at line 504 was first introduced by commit
:::::: fe055896c040df571e4ff56fb196d6845130057b x86/microcode: Merge the early microcode loader
:::::: TO: Borislav Petkov <bp@suse.de>
:::::: CC: Ingo Molnar <mingo@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-08-25 14:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202308252255.2HPJ6x5Q-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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