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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Jun 2021 08:10:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gabriel Krisman Bertazi <krisman@...labora.com>, amir73il@...il.com
Cc:     kbuild-all@...ts.01.org, djwong@...nel.org, tytso@....edu,
        david@...morbit.com, jack@...e.com, dhowells@...hat.com,
        khazhy@...gle.com, linux-fsdevel@...r.kernel.org,
        linux-ext4@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH v3 07/15] fsnotify: pass arguments of fsnotify() in
 struct fsnotify_event_info

Hi Gabriel,

I love your patch! Yet something to improve:

[auto build test ERROR on ext3/fsnotify]
[also build test ERROR on ext4/dev linus/master v5.13 next-20210629]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210630-031347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git fsnotify
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
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
        # https://github.com/0day-ci/linux/commit/dca640915c7b840656b052e138effd501bd5d5e1
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Gabriel-Krisman-Bertazi/File-system-wide-monitoring/20210630-031347
        git checkout dca640915c7b840656b052e138effd501bd5d5e1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 

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

All errors (new ones prefixed by >>):

   In file included from fs/kernfs/file.c:16:
   include/linux/fsnotify.h: In function 'fsnotify_name':
   include/linux/fsnotify.h:33:2: error: implicit declaration of function '__fsnotify'; did you mean 'fsnotify'? [-Werror=implicit-function-declaration]
      33 |  __fsnotify(mask, &(struct fsnotify_event_info) {
         |  ^~~~~~~~~~
         |  fsnotify
   fs/kernfs/file.c: In function 'kernfs_notify_workfn':
>> fs/kernfs/file.c:887:7: error: passing argument 2 of 'fsnotify' from incompatible pointer type [-Werror=incompatible-pointer-types]
     887 |       inode, FSNOTIFY_EVENT_INODE,
         |       ^~~~~
         |       |
         |       struct inode *
   In file included from include/linux/fsnotify.h:15,
                    from fs/kernfs/file.c:16:
   include/linux/fsnotify_backend.h:636:41: note: expected 'const struct fsnotify_event_info *' but argument is of type 'struct inode *'
     636 |       const struct fsnotify_event_info *event_info)
         |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
>> fs/kernfs/file.c:886:5: error: too many arguments to function 'fsnotify'
     886 |     fsnotify(FS_MODIFY | FS_EVENT_ON_CHILD,
         |     ^~~~~~~~
   In file included from include/linux/fsnotify.h:15,
                    from fs/kernfs/file.c:16:
   include/linux/fsnotify_backend.h:635:19: note: declared here
     635 | static inline int fsnotify(__u32 mask,
         |                   ^~~~~~~~
   cc1: some warnings being treated as errors


vim +/fsnotify +887 fs/kernfs/file.c

414985ae23c031 Tejun Heo      2013-11-28  845  
ecca47ce829484 Tejun Heo      2014-07-01  846  static void kernfs_notify_workfn(struct work_struct *work)
414985ae23c031 Tejun Heo      2013-11-28  847  {
ecca47ce829484 Tejun Heo      2014-07-01  848  	struct kernfs_node *kn;
d911d98748018f Tejun Heo      2014-04-09  849  	struct kernfs_super_info *info;
ecca47ce829484 Tejun Heo      2014-07-01  850  repeat:
ecca47ce829484 Tejun Heo      2014-07-01  851  	/* pop one off the notify_list */
ecca47ce829484 Tejun Heo      2014-07-01  852  	spin_lock_irq(&kernfs_notify_lock);
ecca47ce829484 Tejun Heo      2014-07-01  853  	kn = kernfs_notify_list;
ecca47ce829484 Tejun Heo      2014-07-01  854  	if (kn == KERNFS_NOTIFY_EOL) {
ecca47ce829484 Tejun Heo      2014-07-01  855  		spin_unlock_irq(&kernfs_notify_lock);
d911d98748018f Tejun Heo      2014-04-09  856  		return;
ecca47ce829484 Tejun Heo      2014-07-01  857  	}
ecca47ce829484 Tejun Heo      2014-07-01  858  	kernfs_notify_list = kn->attr.notify_next;
ecca47ce829484 Tejun Heo      2014-07-01  859  	kn->attr.notify_next = NULL;
ecca47ce829484 Tejun Heo      2014-07-01  860  	spin_unlock_irq(&kernfs_notify_lock);
d911d98748018f Tejun Heo      2014-04-09  861  
d911d98748018f Tejun Heo      2014-04-09  862  	/* kick fsnotify */
d911d98748018f Tejun Heo      2014-04-09  863  	mutex_lock(&kernfs_mutex);
d911d98748018f Tejun Heo      2014-04-09  864  
ecca47ce829484 Tejun Heo      2014-07-01  865  	list_for_each_entry(info, &kernfs_root(kn)->supers, node) {
df6a58c5c5aa8e Tejun Heo      2016-06-17  866  		struct kernfs_node *parent;
497b0c5a7c0688 Amir Goldstein 2020-07-16  867  		struct inode *p_inode = NULL;
d911d98748018f Tejun Heo      2014-04-09  868  		struct inode *inode;
25b229dff4ffff Al Viro        2019-04-26  869  		struct qstr name;
d911d98748018f Tejun Heo      2014-04-09  870  
df6a58c5c5aa8e Tejun Heo      2016-06-17  871  		/*
df6a58c5c5aa8e Tejun Heo      2016-06-17  872  		 * We want fsnotify_modify() on @kn but as the
df6a58c5c5aa8e Tejun Heo      2016-06-17  873  		 * modifications aren't originating from userland don't
df6a58c5c5aa8e Tejun Heo      2016-06-17  874  		 * have the matching @file available.  Look up the inodes
df6a58c5c5aa8e Tejun Heo      2016-06-17  875  		 * and generate the events manually.
df6a58c5c5aa8e Tejun Heo      2016-06-17  876  		 */
67c0496e87d193 Tejun Heo      2019-11-04  877  		inode = ilookup(info->sb, kernfs_ino(kn));
d911d98748018f Tejun Heo      2014-04-09  878  		if (!inode)
d911d98748018f Tejun Heo      2014-04-09  879  			continue;
d911d98748018f Tejun Heo      2014-04-09  880  
25b229dff4ffff Al Viro        2019-04-26  881  		name = (struct qstr)QSTR_INIT(kn->name, strlen(kn->name));
df6a58c5c5aa8e Tejun Heo      2016-06-17  882  		parent = kernfs_get_parent(kn);
df6a58c5c5aa8e Tejun Heo      2016-06-17  883  		if (parent) {
67c0496e87d193 Tejun Heo      2019-11-04  884  			p_inode = ilookup(info->sb, kernfs_ino(parent));
df6a58c5c5aa8e Tejun Heo      2016-06-17  885  			if (p_inode) {
40a100d3adc1ad Amir Goldstein 2020-07-22 @886  				fsnotify(FS_MODIFY | FS_EVENT_ON_CHILD,
40a100d3adc1ad Amir Goldstein 2020-07-22 @887  					 inode, FSNOTIFY_EVENT_INODE,
40a100d3adc1ad Amir Goldstein 2020-07-22  888  					 p_inode, &name, inode, 0);
df6a58c5c5aa8e Tejun Heo      2016-06-17  889  				iput(p_inode);
d911d98748018f Tejun Heo      2014-04-09  890  			}
d911d98748018f Tejun Heo      2014-04-09  891  
df6a58c5c5aa8e Tejun Heo      2016-06-17  892  			kernfs_put(parent);
df6a58c5c5aa8e Tejun Heo      2016-06-17  893  		}
df6a58c5c5aa8e Tejun Heo      2016-06-17  894  
82ace1efb3cb1d Amir Goldstein 2020-07-22  895  		if (!p_inode)
82ace1efb3cb1d Amir Goldstein 2020-07-22  896  			fsnotify_inode(inode, FS_MODIFY);
497b0c5a7c0688 Amir Goldstein 2020-07-16  897  
d911d98748018f Tejun Heo      2014-04-09  898  		iput(inode);
d911d98748018f Tejun Heo      2014-04-09  899  	}
d911d98748018f Tejun Heo      2014-04-09  900  
d911d98748018f Tejun Heo      2014-04-09  901  	mutex_unlock(&kernfs_mutex);
ecca47ce829484 Tejun Heo      2014-07-01  902  	kernfs_put(kn);
ecca47ce829484 Tejun Heo      2014-07-01  903  	goto repeat;
ecca47ce829484 Tejun Heo      2014-07-01  904  }
ecca47ce829484 Tejun Heo      2014-07-01  905  

---
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" (9999 bytes)

Powered by blists - more mailing lists