linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [cifs:for-next 7/9] fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long')
@ 2021-06-05 20:33 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-05 20:33 UTC (permalink / raw)
  To: Shyam Prasad N
  Cc: kbuild-all, clang-built-linux, linux-cifs, samba-technical, Steve French

[-- Attachment #1: Type: text/plain, Size: 19071 bytes --]

tree:   git://git.samba.org/sfrench/cifs-2.6.git for-next
head:   52834f2e3fd972647736d6cfad34fa2f1aedb51c
commit: 7ec35cb4e9a7a8bd791a4202c88304154210fed0 [7/9] cifs: some minor warnings identified by kernel bots fixed
config: x86_64-randconfig-r013-20210606 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8ec9aa236e325fd4629cfeefac2919302e14d61a)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
        git fetch --no-tags cifs for-next
        git checkout 7ec35cb4e9a7a8bd791a4202c88304154210fed0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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__);             \
                          ~~~    ^~~~~~~~~~~
   6 warnings generated.
--
   In file included from fs/cifs/smb2transport.c:35:
   fs/cifs/smb2pdu.h:28:10: error: 'cifsacl.h' file not found with <angled> include; use "quotes" instead
   #include <cifsacl.h>
            ^~~~~~~~~~~
            "cifsacl.h"
>> fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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 int' but the argument has type 'size_t' (aka 'unsigned long') [-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__);             \
                          ~~~    ^~~~~~~~~~~
   6 warnings and 1 error 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);
7ec35cb4e9a7a8 Shyam Prasad N         2021-06-05  428  		cifs_dbg(FYI, "%s: Generated key for chan %u\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 <sprasad@microsoft.com>
:::::: CC: Steve French <stfrench@microsoft.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40201 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-05 20:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 20:33 [cifs:for-next 7/9] fs/cifs/smb2transport.c:429:15: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') 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;
as well as URLs for NNTP newsgroup(s).