* [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
@ 2023-08-25 14:53 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-25 14:53 UTC (permalink / raw)
To: Ingo Molnar; +Cc: oe-kbuild-all, Linux Memory Management List
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-25 14:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-25 14:53 [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 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox