lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202107231628.8XaspxLk-lkp@intel.com>
Date:   Fri, 23 Jul 2021 16:28:54 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bart Van Assche <bvanassche@....org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [bvanassche:configfs 6/6] include/linux/kern_levels.h:5:18: warning:
 format '%ld' expects argument of type 'long int', but argument 4 has type
 'ssize_t' {aka 'int'}

tree:   https://github.com/bvanassche/linux configfs
head:   7e2353f58cd57892a51ad80a600b481b22ef775a
commit: 7e2353f58cd57892a51ad80a600b481b22ef775a [6/6] wip2
config: i386-allyesconfig (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
        # https://github.com/bvanassche/linux/commit/7e2353f58cd57892a51ad80a600b481b22ef775a
        git remote add bvanassche https://github.com/bvanassche/linux
        git fetch --no-tags bvanassche configfs
        git checkout 7e2353f58cd57892a51ad80a600b481b22ef775a
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   In file included from include/linux/printk.h:7,
                    from include/linux/kernel.h:19,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from fs/configfs/file.c:11:
   fs/configfs/file.c: In function 'configfs_bin_write_iter':
   include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
       5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO KERN_SOH "6" /* informational */
         |                   ^~~~~~~~
   include/linux/printk.h:420:9: note: in expansion of macro 'KERN_INFO'
     420 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~
   fs/configfs/file.c:289:2: note: in expansion of macro 'pr_info'
     289 |  pr_info("%s: end_offset = %ld; len = %ld\n", __func__, end_offset, len);
         |  ^~~~~~~
>> include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'ssize_t' {aka 'int'} [-Wformat=]
       5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
         |                  ^~~~~~
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO KERN_SOH "6" /* informational */
         |                   ^~~~~~~~
   include/linux/printk.h:420:9: note: in expansion of macro 'KERN_INFO'
     420 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
         |         ^~~~~~~~~
   fs/configfs/file.c:289:2: note: in expansion of macro 'pr_info'
     289 |  pr_info("%s: end_offset = %ld; len = %ld\n", __func__, end_offset, len);
         |  ^~~~~~~


vim +5 include/linux/kern_levels.h

314ba3520e513a Joe Perches 2012-07-30   4  
04d2c8c83d0e3a Joe Perches 2012-07-30  @5  #define KERN_SOH	"\001"		/* ASCII Start Of Header */
04d2c8c83d0e3a Joe Perches 2012-07-30   6  #define KERN_SOH_ASCII	'\001'
04d2c8c83d0e3a Joe Perches 2012-07-30   7  
04d2c8c83d0e3a Joe Perches 2012-07-30   8  #define KERN_EMERG	KERN_SOH "0"	/* system is unusable */
04d2c8c83d0e3a Joe Perches 2012-07-30   9  #define KERN_ALERT	KERN_SOH "1"	/* action must be taken immediately */
04d2c8c83d0e3a Joe Perches 2012-07-30  10  #define KERN_CRIT	KERN_SOH "2"	/* critical conditions */
04d2c8c83d0e3a Joe Perches 2012-07-30  11  #define KERN_ERR	KERN_SOH "3"	/* error conditions */
04d2c8c83d0e3a Joe Perches 2012-07-30  12  #define KERN_WARNING	KERN_SOH "4"	/* warning conditions */
04d2c8c83d0e3a Joe Perches 2012-07-30  13  #define KERN_NOTICE	KERN_SOH "5"	/* normal but significant condition */
04d2c8c83d0e3a Joe Perches 2012-07-30 @14  #define KERN_INFO	KERN_SOH "6"	/* informational */
04d2c8c83d0e3a Joe Perches 2012-07-30  15  #define KERN_DEBUG	KERN_SOH "7"	/* debug-level messages */
04d2c8c83d0e3a Joe Perches 2012-07-30  16  

:::::: The code at line 5 was first introduced by commit
:::::: 04d2c8c83d0e3ac5f78aeede51babb3236200112 printk: convert the format for KERN_<LEVEL> to a 2 byte pattern

:::::: TO: Joe Perches <joe@...ches.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>

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

Download attachment ".config.gz" of type "application/gzip" (65160 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ