tree: git://git.samba.org/sfrench/cifs-2.6.git for-next head: 83d7ff3d0f48e6bce8a4655579df24dd33975638 commit: 9f970434e908cfa698658d54d63d356573f091d8 [4/6] cifs: get rid of binding_chan and use chans_need_reconnect instead config: powerpc-randconfig-r023-20210604 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5c0d1b2f902aa6a9cf47cc7e42c5b83bb2217cf9) 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 # install powerpc cross compiling tool for clang build # apt-get install binutils-powerpc-linux-gnu git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git git fetch --no-tags cifs for-next git checkout 9f970434e908cfa698658d54d63d356573f091d8 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): In file included from fs/cifs/smb2transport.c:25: In file included from include/linux/fs.h:6: In file included from include/linux/wait_bit.h:8: In file included from include/linux/wait.h:7: In file included from include/linux/list.h:9: In file included from include/linux/kernel.h:12: In file included from include/linux/bitops.h:32: In file included from arch/powerpc/include/asm/bitops.h:62: arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined] #define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory") ^ :309:9: note: previous definition is here #define __lwsync __builtin_ppc_lwsync ^ >> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] __func__, chan_index); ^~~~~~~~~~ fs/cifs/cifs_debug.h:77:36: note: expanded from macro 'cifs_dbg' cifs_dbg_func(once, type, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ fs/cifs/cifs_debug.h:66:23: note: expanded from macro 'cifs_dbg_func' __FILE__, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:497:38: note: expanded from macro 'pr_debug_once' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:140:17: note: expanded from macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ >> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] __func__, chan_index); ^~~~~~~~~~ fs/cifs/cifs_debug.h:77:36: note: expanded from macro 'cifs_dbg' cifs_dbg_func(once, type, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ fs/cifs/cifs_debug.h:68:38: note: expanded from macro 'cifs_dbg_func' pr_err_ ## ratefunc("VFS: " fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/printk.h:474:38: note: expanded from macro 'pr_err_once' printk_once(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:445:17: note: expanded from macro 'printk_once' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ >> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] __func__, chan_index); ^~~~~~~~~~ fs/cifs/cifs_debug.h:77:36: note: expanded from macro 'cifs_dbg' cifs_dbg_func(once, type, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ fs/cifs/cifs_debug.h:70:32: note: expanded from macro 'cifs_dbg_func' pr_debug_ ## ratefunc(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/printk.h:497:38: note: expanded from macro 'pr_debug_once' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:140:17: note: expanded from macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ >> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] __func__, chan_index); ^~~~~~~~~~ fs/cifs/cifs_debug.h:79:43: note: expanded from macro 'cifs_dbg' cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ fs/cifs/cifs_debug.h:66:23: note: expanded from macro 'cifs_dbg_func' __FILE__, ##__VA_ARGS__); \ ^~~~~~~~~~~ include/linux/printk.h:562:38: note: expanded from macro 'pr_debug_ratelimited' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:140:17: note: expanded from macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ >> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] __func__, chan_index); ^~~~~~~~~~ fs/cifs/cifs_debug.h:79:43: note: expanded from macro 'cifs_dbg' cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ fs/cifs/cifs_debug.h:68:38: note: expanded from macro 'cifs_dbg_func' pr_err_ ## ratefunc("VFS: " fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/printk.h:526:45: note: expanded from macro 'pr_err_ratelimited' printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:512:17: note: expanded from macro 'printk_ratelimited' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ >> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] __func__, chan_index); ^~~~~~~~~~ fs/cifs/cifs_debug.h:79:43: note: expanded from macro 'cifs_dbg' cifs_dbg_func(ratelimited, type, fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ fs/cifs/cifs_debug.h:70:32: note: expanded from macro 'cifs_dbg_func' pr_debug_ ## ratefunc(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ include/linux/printk.h:562:38: note: expanded from macro 'pr_debug_ratelimited' no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ include/linux/printk.h:140:17: note: expanded from macro 'no_printk' printk(fmt, ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ 7 warnings generated. vim +429 fs/cifs/smb2transport.c 373512ec5c105e Steve French 2015-12-18 403 373512ec5c105e Steve French 2015-12-18 404 static int 373512ec5c105e Steve French 2015-12-18 405 generate_smb3signingkey(struct cifs_ses *ses, 9f970434e908cf Shyam Prasad N 2021-06-02 406 struct TCP_Server_Info *server, 373512ec5c105e Steve French 2015-12-18 407 const struct derivation_triplet *ptriplet) 373512ec5c105e Steve French 2015-12-18 408 { 373512ec5c105e Steve French 2015-12-18 409 int rc; 9f970434e908cf Shyam Prasad N 2021-06-02 410 size_t chan_index; 373512ec5c105e Steve French 2015-12-18 411 d70e9fa5588476 Aurelien Aptel 2019-09-20 412 /* d70e9fa5588476 Aurelien Aptel 2019-09-20 413 * All channels use the same encryption/decryption keys but d70e9fa5588476 Aurelien Aptel 2019-09-20 414 * they have their own signing key. d70e9fa5588476 Aurelien Aptel 2019-09-20 415 * d70e9fa5588476 Aurelien Aptel 2019-09-20 416 * When we generate the keys, check if it is for a new channel d70e9fa5588476 Aurelien Aptel 2019-09-20 417 * (binding) in which case we only need to generate a signing d70e9fa5588476 Aurelien Aptel 2019-09-20 418 * key and store it in the channel as to not overwrite the d70e9fa5588476 Aurelien Aptel 2019-09-20 419 * master connection signing key stored in the session d70e9fa5588476 Aurelien Aptel 2019-09-20 420 */ d70e9fa5588476 Aurelien Aptel 2019-09-20 421 9f970434e908cf Shyam Prasad N 2021-06-02 422 if (!CIFS_ALL_CHANS_NEED_RECONNECT(ses)) { 9f970434e908cf Shyam Prasad N 2021-06-02 423 chan_index = cifs_ses_get_chan_index(ses, server); 373512ec5c105e Steve French 2015-12-18 424 rc = generate_key(ses, ptriplet->signing.label, d70e9fa5588476 Aurelien Aptel 2019-09-20 425 ptriplet->signing.context, 9f970434e908cf Shyam Prasad N 2021-06-02 426 ses->chans[chan_index].signkey, 373512ec5c105e Steve French 2015-12-18 427 SMB3_SIGN_KEY_SIZE); aed2a5f0a2bf7b Shyam Prasad N 2021-05-22 428 cifs_dbg(FYI, "%s: Generated key for chan %lu\n", aed2a5f0a2bf7b Shyam Prasad N 2021-05-22 @429 __func__, chan_index); 373512ec5c105e Steve French 2015-12-18 430 if (rc) 373512ec5c105e Steve French 2015-12-18 431 return rc; d70e9fa5588476 Aurelien Aptel 2019-09-20 432 } else { d70e9fa5588476 Aurelien Aptel 2019-09-20 433 rc = generate_key(ses, ptriplet->signing.label, d70e9fa5588476 Aurelien Aptel 2019-09-20 434 ptriplet->signing.context, d70e9fa5588476 Aurelien Aptel 2019-09-20 435 ses->smb3signingkey, 373512ec5c105e Steve French 2015-12-18 436 SMB3_SIGN_KEY_SIZE); 373512ec5c105e Steve French 2015-12-18 437 if (rc) 373512ec5c105e Steve French 2015-12-18 438 return rc; ff6b6f3f916097 Paulo Alcantara (SUSE 2019-11-22 439) ff6b6f3f916097 Paulo Alcantara (SUSE 2019-11-22 440) memcpy(ses->chans[0].signkey, ses->smb3signingkey, ff6b6f3f916097 Paulo Alcantara (SUSE 2019-11-22 441) SMB3_SIGN_KEY_SIZE); ff6b6f3f916097 Paulo Alcantara (SUSE 2019-11-22 442) d70e9fa5588476 Aurelien Aptel 2019-09-20 443 rc = generate_key(ses, ptriplet->encryption.label, d70e9fa5588476 Aurelien Aptel 2019-09-20 444 ptriplet->encryption.context, d70e9fa5588476 Aurelien Aptel 2019-09-20 445 ses->smb3encryptionkey, 45a4546c6167a2 Shyam Prasad N 2021-03-25 446 SMB3_ENC_DEC_KEY_SIZE); d38de3c6156b97 Aurélien Aptel 2017-05-24 447 rc = generate_key(ses, ptriplet->decryption.label, 373512ec5c105e Steve French 2015-12-18 448 ptriplet->decryption.context, d70e9fa5588476 Aurelien Aptel 2019-09-20 449 ses->smb3decryptionkey, 45a4546c6167a2 Shyam Prasad N 2021-03-25 450 SMB3_ENC_DEC_KEY_SIZE); d70e9fa5588476 Aurelien Aptel 2019-09-20 451 if (rc) d70e9fa5588476 Aurelien Aptel 2019-09-20 452 return rc; d70e9fa5588476 Aurelien Aptel 2019-09-20 453 } d38de3c6156b97 Aurélien Aptel 2017-05-24 454 d38de3c6156b97 Aurélien Aptel 2017-05-24 455 if (rc) d38de3c6156b97 Aurélien Aptel 2017-05-24 456 return rc; d38de3c6156b97 Aurélien Aptel 2017-05-24 457 :::::: The code at line 429 was first introduced by commit :::::: aed2a5f0a2bf7bf6190712bf35ac53e571824a02 cifs: changes to support multichannel during channel reconnect :::::: TO: Shyam Prasad N :::::: CC: Steve French --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org