tree: https://github.com/ceph/ceph-client.git tls_logger head: cd1e899feeb6a7da55cbb74b9245c8bbb77f82ba commit: cd1e899feeb6a7da55cbb74b9245c8bbb77f82ba [13/13] cephsun: using a dynamic buffer allocation config: openrisc-allyesconfig (https://download.01.org/0day-ci/archive/20250213/202502132038.TPFGWJku-lkp@xxxxxxxxx/config) compiler: or1k-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250213/202502132038.TPFGWJku-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202502132038.TPFGWJku-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): In file included from include/linux/ceph/ceph_debug.h:9, from net/ceph/mon_client.c:2: net/ceph/mon_client.c: In function '__send_subscribe': >> include/linux/ceph/ceph_debug.h:24:22: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 219 [-Wformat-truncation=] 24 | CEPH_SAN_LOG("%12.12s:%-4d : " fmt, \ | ^~~~~~~~~~~~~~~~~ include/linux/ceph/ceph_san.h:83:33: note: in definition of macro 'CEPH_SAN_LOG' 83 | snprintf(buf, LOG_BUF_SIZE, fmt, ##__VA_ARGS__); \ | ^~~ net/ceph/mon_client.c:367:17: note: in expansion of macro 'dout' 367 | dout("%s %s start %llu flags 0x%x\n", __func__, buf, | ^~~~ include/linux/ceph/ceph_debug.h:24:22: note: directive argument in the range [0, 255] 24 | CEPH_SAN_LOG("%12.12s:%-4d : " fmt, \ | ^~~~~~~~~~~~~~~~~ include/linux/ceph/ceph_san.h:83:33: note: in definition of macro 'CEPH_SAN_LOG' 83 | snprintf(buf, LOG_BUF_SIZE, fmt, ##__VA_ARGS__); \ | ^~~ net/ceph/mon_client.c:367:17: note: in expansion of macro 'dout' 367 | dout("%s %s start %llu flags 0x%x\n", __func__, buf, | ^~~~ include/linux/ceph/ceph_san.h:83:5: note: 'snprintf' output between 57 and 332 bytes into a destination of size 256 83 | snprintf(buf, LOG_BUF_SIZE, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ceph/ceph_debug.h:24:9: note: in expansion of macro 'CEPH_SAN_LOG' 24 | CEPH_SAN_LOG("%12.12s:%-4d : " fmt, \ | ^~~~~~~~~~~~ net/ceph/mon_client.c:367:17: note: in expansion of macro 'dout' 367 | dout("%s %s start %llu flags 0x%x\n", __func__, buf, | ^~~~ include/linux/ceph/ceph_san.h:83:5: warning: 'snprintf' argument 7 overlaps destination object 'buf' [-Wrestrict] 83 | snprintf(buf, LOG_BUF_SIZE, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ceph/ceph_debug.h:24:9: note: in expansion of macro 'CEPH_SAN_LOG' 24 | CEPH_SAN_LOG("%12.12s:%-4d : " fmt, \ | ^~~~~~~~~~~~ net/ceph/mon_client.c:367:17: note: in expansion of macro 'dout' 367 | dout("%s %s start %llu flags 0x%x\n", __func__, buf, | ^~~~ include/linux/ceph/ceph_san.h:82:10: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 82 | char buf[LOG_BUF_SIZE]; \ | ^~~ include/linux/ceph/ceph_debug.h:24:9: note: in expansion of macro 'CEPH_SAN_LOG' 24 | CEPH_SAN_LOG("%12.12s:%-4d : " fmt, \ | ^~~~~~~~~~~~ net/ceph/mon_client.c:367:17: note: in expansion of macro 'dout' 367 | dout("%s %s start %llu flags 0x%x\n", __func__, buf, | ^~~~ vim +24 include/linux/ceph/ceph_debug.h de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 12 de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 13 /* de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 14 * wrap pr_debug to include a filename:lineno prefix on each line. de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 15 * this incurs some overhead (kernel size and execution time) due to de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 16 * the extra function call at each call site. de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 17 */ de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 18 de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 19 # if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG) de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 20 # define dout(fmt, ...) \ 3d14c5d2b6e15c include/linux/ceph/ceph_debug.h Yehuda Sadeh 2010-04-06 21 pr_debug("%.*s %12.12s:%-4d:" fmt, \ 04fa82972277cd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-11 22 8 - (int)sizeof(KBUILD_MODNAME), " ", \ 04fa82972277cd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-11 23 kbasename(__FILE__), __LINE__, ##__VA_ARGS__); \ 866762b26eb7fd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-12 @24 CEPH_SAN_LOG("%12.12s:%-4d : " fmt, \ 6f4dbd149d2a15 include/linux/ceph/ceph_debug.h Ilya Dryomov 2017-05-19 25 kbasename(__FILE__), __LINE__, ##__VA_ARGS__) 5c5f0d2b5f92c4 include/linux/ceph/ceph_debug.h Xiubo Li 2023-06-09 26 # define doutc(client, fmt, ...) \ 5c5f0d2b5f92c4 include/linux/ceph/ceph_debug.h Xiubo Li 2023-06-09 27 pr_debug("%.*s %12.12s:%-4d : [%pU %llu] " fmt, \ 04fa82972277cd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-11 28 8 - (int)sizeof(KBUILD_MODNAME), " ", \ 04fa82972277cd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-11 29 kbasename(__FILE__), __LINE__, \ 04fa82972277cd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-11 30 &client->fsid, client->monc.auth->global_id, \ 04fa82972277cd include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-11 31 ##__VA_ARGS__); \ ab4d8f9713554f include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-12 32 CEPH_SAN_LOG("%12.12s:%-4d:" fmt, \ ab4d8f9713554f include/linux/ceph/ceph_debug.h Alex Markuze 2025-02-12 33 kbasename(__FILE__), __LINE__, ##__VA_ARGS__) de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 34 # else de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 35 /* faux printk call just to see any compiler warnings. */ b37cafacbf98ea include/linux/ceph/ceph_debug.h Geert Uytterhoeven 2024-02-28 36 # define dout(fmt, ...) \ b37cafacbf98ea include/linux/ceph/ceph_debug.h Geert Uytterhoeven 2024-02-28 37 no_printk(KERN_DEBUG fmt, ##__VA_ARGS__) b37cafacbf98ea include/linux/ceph/ceph_debug.h Geert Uytterhoeven 2024-02-28 38 # define doutc(client, fmt, ...) \ b37cafacbf98ea include/linux/ceph/ceph_debug.h Geert Uytterhoeven 2024-02-28 39 no_printk(KERN_DEBUG "[%pU %llu] " fmt, \ 5c5f0d2b5f92c4 include/linux/ceph/ceph_debug.h Xiubo Li 2023-06-09 40 &client->fsid, \ 5c5f0d2b5f92c4 include/linux/ceph/ceph_debug.h Xiubo Li 2023-06-09 41 client->monc.auth->global_id, \ b37cafacbf98ea include/linux/ceph/ceph_debug.h Geert Uytterhoeven 2024-02-28 42 ##__VA_ARGS__) de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 43 # endif de57606c23afde fs/ceph/ceph_debug.h Sage Weil 2009-10-06 44 :::::: The code at line 24 was first introduced by commit :::::: 866762b26eb7fd11c6fcbb9aaaad9a4a232968c9 minor cosmetics :::::: TO: Alex Markuze <amarkuze@xxxxxxxxxx> :::::: CC: Alex Markuze <amarkuze@xxxxxxxxxx> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki