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: <202408200611.zhKlMvry-lkp@intel.com>
Date: Tue, 20 Aug 2024 06:18:45 +0800
From: kernel test robot <lkp@...el.com>
To: Christian Brauner <brauner@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: include/linux/fs.h:3645:15: error: unexpected token, expected comma

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6e4436539ae182dc86d57d13849862bcafaa4709
commit: 27a2d0cb2f38c67b58285e6124b14f7fff3fd1a8 stat: use vfs_empty_path() helper
date:   8 weeks ago
config: mips-randconfig-r111-20240819 (https://download.01.org/0day-ci/archive/20240820/202408200611.zhKlMvry-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 26670e7fa4f032a019d23d56c6a02926e854e8af)
reproduce: (https://download.01.org/0day-ci/archive/20240820/202408200611.zhKlMvry-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408200611.zhKlMvry-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/stat.c:8:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:8:
   In file included from include/linux/cacheflush.h:5:
   In file included from arch/mips/include/asm/cacheflush.h:13:
   In file included from include/linux/mm.h:2253:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from fs/stat.c:8:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:5:
>> include/linux/fs.h:3645:15: error: unexpected token, expected comma
    3645 |         if (unlikely(get_user(c, path)))
         |                      ^
   arch/mips/include/asm/uaccess.h:97:33: note: expanded from macro 'get_user'
      97 |         access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) :           \
         |                                        ^
   arch/mips/include/asm/uaccess.h:177:23: note: expanded from macro '__get_user'
     177 |                 __get_data_asm((x), user_lb, __gu_ptr);                 \
         |                                     ^
   <inline asm>:3:10: note: instantiated into assembly here
       3 |         .set    eva
         |                    ^
   In file included from fs/stat.c:8:
   In file included from include/linux/blkdev.h:9:
   In file included from include/linux/blk_types.h:10:
   In file included from include/linux/bvec.h:10:
   In file included from include/linux/highmem.h:5:
>> include/linux/fs.h:3645:15: error: invalid operand for instruction
    3645 |         if (unlikely(get_user(c, path)))
         |                      ^
   arch/mips/include/asm/uaccess.h:97:33: note: expanded from macro 'get_user'
      97 |         access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) :           \
         |                                        ^
   arch/mips/include/asm/uaccess.h:177:23: note: expanded from macro '__get_user'
     177 |                 __get_data_asm((x), user_lb, __gu_ptr);                 \
         |                                     ^
   <inline asm>:4:11: note: instantiated into assembly here
       4 |         lbe $21, 0($18)
         |                  ^
   1 warning and 2 errors generated.


vim +3645 include/linux/fs.h

90f8572b0f021f Eric W. Biederman 2015-06-29  3627  
45cd0faae3715e Amir Goldstein    2018-08-27  3628  /* mm/fadvise.c */
45cd0faae3715e Amir Goldstein    2018-08-27  3629  extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
45cd0faae3715e Amir Goldstein    2018-08-27  3630  		       int advice);
cf1ea0592dbf10 Jan Kara          2019-08-29  3631  extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
cf1ea0592dbf10 Jan Kara          2019-08-29  3632  			   int advice);
45cd0faae3715e Amir Goldstein    2018-08-27  3633  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3634  static inline bool vfs_empty_path(int dfd, const char __user *path)
1bc6d4452d5c91 Christian Brauner 2024-04-30  3635  {
1bc6d4452d5c91 Christian Brauner 2024-04-30  3636  	char c;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3637  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3638  	if (dfd < 0)
1bc6d4452d5c91 Christian Brauner 2024-04-30  3639  		return false;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3640  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3641  	/* We now allow NULL to be used for empty path. */
1bc6d4452d5c91 Christian Brauner 2024-04-30  3642  	if (!path)
1bc6d4452d5c91 Christian Brauner 2024-04-30  3643  		return true;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3644  
1bc6d4452d5c91 Christian Brauner 2024-04-30 @3645  	if (unlikely(get_user(c, path)))
1bc6d4452d5c91 Christian Brauner 2024-04-30  3646  		return false;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3647  
1bc6d4452d5c91 Christian Brauner 2024-04-30  3648  	return !c;
1bc6d4452d5c91 Christian Brauner 2024-04-30  3649  }
1bc6d4452d5c91 Christian Brauner 2024-04-30  3650  

:::::: The code at line 3645 was first introduced by commit
:::::: 1bc6d4452d5c91beb09e37a98a590808e1997b79 fs: new helper vfs_empty_path()

:::::: TO: Christian Brauner <brauner@...nel.org>
:::::: CC: Christian Brauner <brauner@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ