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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 27 Jan 2020 02:21:19 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Andreas Dilger <adilger@...ger.ca>
Cc:     kbuild-all@...ts.01.org, tytso@....edu, linux-ext4@...r.kernel.org,
        Andreas Dilger <adilger@...ger.ca>
Subject: Re: [PATCH] ext4: don't assume that mmp_nodename/bdevname have NUL

Hi Andreas,

I love your patch! Perhaps something to improve:

[auto build test WARNING on ext4/dev]
[also build test WARNING on tytso-fscrypt/master v5.5-rc7 next-20200124]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Andreas-Dilger/ext4-don-t-assume-that-mmp_nodename-bdevname-have-NUL/20200126-053627
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: x86_64-randconfig-s0-20200126 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   fs//ext4/mmp.c: In function '__dump_mmp_msg':
   fs//ext4/mmp.c:126:10: warning: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
             sizeof(mmp->mmp_bdevname), mmp->mmp_bdevname);
             ^
   fs//ext4/mmp.c:126:10: warning: field precision specifier '.*' expects argument of type 'int', but argument 8 has type 'long unsigned int' [-Wformat=]
   In file included from fs//ext4/mmp.c:6:0:
   fs//ext4/mmp.c: In function 'ext4_multi_mount_protect':
>> include/linux/kthread.h:45:9: warning: field precision specifier '.*' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
     struct task_struct *__k         \
            ^
   fs//ext4/mmp.c:382:27: note: in expansion of macro 'kthread_run'
     EXT4_SB(sb)->s_mmp_tsk = kthread_run(kmmpd, mmpd_data, "kmmpd-%.*s",
                              ^
--
   fs/ext4/mmp.c: In function '__dump_mmp_msg':
   fs/ext4/mmp.c:126:10: warning: field precision specifier '.*' expects argument of type 'int', but argument 6 has type 'long unsigned int' [-Wformat=]
             sizeof(mmp->mmp_bdevname), mmp->mmp_bdevname);
             ^
   fs/ext4/mmp.c:126:10: warning: field precision specifier '.*' expects argument of type 'int', but argument 8 has type 'long unsigned int' [-Wformat=]
   In file included from fs/ext4/mmp.c:6:0:
   fs/ext4/mmp.c: In function 'ext4_multi_mount_protect':
>> include/linux/kthread.h:45:9: warning: field precision specifier '.*' expects argument of type 'int', but argument 5 has type 'long unsigned int' [-Wformat=]
     struct task_struct *__k         \
            ^
   fs/ext4/mmp.c:382:27: note: in expansion of macro 'kthread_run'
     EXT4_SB(sb)->s_mmp_tsk = kthread_run(kmmpd, mmpd_data, "kmmpd-%.*s",
                              ^

vim +45 include/linux/kthread.h

^1da177e4c3f41 Linus Torvalds  2005-04-16   7  
b9075fa968a0a4 Joe Perches     2011-10-31   8  __printf(4, 5)
207205a2ba2655 Eric Dumazet    2011-03-22   9  struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
^1da177e4c3f41 Linus Torvalds  2005-04-16  10  					   void *data,
207205a2ba2655 Eric Dumazet    2011-03-22  11  					   int node,
b9075fa968a0a4 Joe Perches     2011-10-31  12  					   const char namefmt[], ...);
207205a2ba2655 Eric Dumazet    2011-03-22  13  
e154ccc831b5b5 Jonathan Corbet 2016-10-11  14  /**
e154ccc831b5b5 Jonathan Corbet 2016-10-11  15   * kthread_create - create a kthread on the current node
e154ccc831b5b5 Jonathan Corbet 2016-10-11  16   * @threadfn: the function to run in the thread
e154ccc831b5b5 Jonathan Corbet 2016-10-11  17   * @data: data pointer for @threadfn()
e154ccc831b5b5 Jonathan Corbet 2016-10-11  18   * @namefmt: printf-style format string for the thread name
d16977f3a6cfbb Jonathan Corbet 2017-08-02  19   * @arg...: arguments for @namefmt.
e154ccc831b5b5 Jonathan Corbet 2016-10-11  20   *
e154ccc831b5b5 Jonathan Corbet 2016-10-11  21   * This macro will create a kthread on the current node, leaving it in
e154ccc831b5b5 Jonathan Corbet 2016-10-11  22   * the stopped state.  This is just a helper for kthread_create_on_node();
e154ccc831b5b5 Jonathan Corbet 2016-10-11  23   * see the documentation there for more details.
e154ccc831b5b5 Jonathan Corbet 2016-10-11  24   */
207205a2ba2655 Eric Dumazet    2011-03-22  25  #define kthread_create(threadfn, data, namefmt, arg...) \
e9f069868d6055 Andrew Morton   2015-09-04  26  	kthread_create_on_node(threadfn, data, NUMA_NO_NODE, namefmt, ##arg)
207205a2ba2655 Eric Dumazet    2011-03-22  27  
^1da177e4c3f41 Linus Torvalds  2005-04-16  28  
2a1d446019f9a5 Thomas Gleixner 2012-07-16  29  struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),
2a1d446019f9a5 Thomas Gleixner 2012-07-16  30  					  void *data,
2a1d446019f9a5 Thomas Gleixner 2012-07-16  31  					  unsigned int cpu,
2a1d446019f9a5 Thomas Gleixner 2012-07-16  32  					  const char *namefmt);
2a1d446019f9a5 Thomas Gleixner 2012-07-16  33  
^1da177e4c3f41 Linus Torvalds  2005-04-16  34  /**
9e37bd301ee130 Randy Dunlap    2006-06-25  35   * kthread_run - create and wake a thread.
^1da177e4c3f41 Linus Torvalds  2005-04-16  36   * @threadfn: the function to run until signal_pending(current).
^1da177e4c3f41 Linus Torvalds  2005-04-16  37   * @data: data ptr for @threadfn.
^1da177e4c3f41 Linus Torvalds  2005-04-16  38   * @namefmt: printf-style name for the thread.
^1da177e4c3f41 Linus Torvalds  2005-04-16  39   *
^1da177e4c3f41 Linus Torvalds  2005-04-16  40   * Description: Convenient wrapper for kthread_create() followed by
9e37bd301ee130 Randy Dunlap    2006-06-25  41   * wake_up_process().  Returns the kthread or ERR_PTR(-ENOMEM).
9e37bd301ee130 Randy Dunlap    2006-06-25  42   */
^1da177e4c3f41 Linus Torvalds  2005-04-16  43  #define kthread_run(threadfn, data, namefmt, ...)			   \
^1da177e4c3f41 Linus Torvalds  2005-04-16  44  ({									   \
^1da177e4c3f41 Linus Torvalds  2005-04-16 @45  	struct task_struct *__k						   \
^1da177e4c3f41 Linus Torvalds  2005-04-16  46  		= kthread_create(threadfn, data, namefmt, ## __VA_ARGS__); \
^1da177e4c3f41 Linus Torvalds  2005-04-16  47  	if (!IS_ERR(__k))						   \
^1da177e4c3f41 Linus Torvalds  2005-04-16  48  		wake_up_process(__k);					   \
^1da177e4c3f41 Linus Torvalds  2005-04-16  49  	__k;								   \
^1da177e4c3f41 Linus Torvalds  2005-04-16  50  })
^1da177e4c3f41 Linus Torvalds  2005-04-16  51  

:::::: The code at line 45 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@...970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@...970.osdl.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

Powered by blists - more mailing lists