public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* fs/namei.c:232:6: error: unexpected token, expected comma
@ 2025-04-08 23:23 kernel test robot
  2025-04-20  6:50 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2025-04-08 23:23 UTC (permalink / raw)
  To: Al Viro; +Cc: oe-kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   bec7dcbc242c6c087cede1a6fdfaeb5d6eaf25bf
commit: e896474fe4851ffc4dd860c92daa906783090346 getname_maybe_null() - the third variant of pathname copy-in
date:   6 months ago
config: mips-randconfig-r064-20250408 (https://download.01.org/0day-ci/archive/20250409/202504090937.ZGGFamL2-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250409/202504090937.ZGGFamL2-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504090937.ZGGFamL2-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/namei.c:25:
   In file included from include/linux/pagemap.h:8:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> fs/namei.c:232:6: error: unexpected token, expected comma
     232 |         if (get_user(c, pathname))
         |             ^
   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
         |                    ^
   fs/namei.c:232:6: error: instruction requires a CPU feature not currently enabled
     232 |         if (get_user(c, pathname))
         |             ^
   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:2: note: instantiated into assembly here
       4 |         lbe $3, 0($4)
         |         ^
   1 warning and 2 errors generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for GET_FREE_REGION
   Depends on [n]: SPARSEMEM [=n]
   Selected by [m]:
   - RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]


vim +232 fs/namei.c

   225	
   226	struct filename *__getname_maybe_null(const char __user *pathname)
   227	{
   228		struct filename *name;
   229		char c;
   230	
   231		/* try to save on allocations; loss on um, though */
 > 232		if (get_user(c, pathname))
   233			return ERR_PTR(-EFAULT);
   234		if (!c)
   235			return NULL;
   236	
   237		name = getname_flags(pathname, LOOKUP_EMPTY);
   238		if (!IS_ERR(name) && !(name->name[0])) {
   239			putname(name);
   240			name = NULL;
   241		}
   242		return name;
   243	}
   244	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: fs/namei.c:232:6: error: unexpected token, expected comma
  2025-04-08 23:23 fs/namei.c:232:6: error: unexpected token, expected comma kernel test robot
@ 2025-04-20  6:50 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2025-04-20  6:50 UTC (permalink / raw)
  To: kernel test robot; +Cc: oe-kbuild-all, linux-kernel

On Wed, Apr 09, 2025 at 07:23:35AM +0800, kernel test robot wrote:

>    fs/namei.c:232:6: error: instruction requires a CPU feature not currently enabled
>      232 |         if (get_user(c, pathname))
>          |             ^
>    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:2: note: instantiated into assembly here
>        4 |         lbe $3, 0($4)
>          |         ^

Wrong cc(1) options, perhaps?  CONFIG_CPU_MIPS32_3_5_EVA (and CONFIG_EVA) are
present in your .config, so...

Looks like that's one for mips (and clang) folks...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-20  6:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 23:23 fs/namei.c:232:6: error: unexpected token, expected comma kernel test robot
2025-04-20  6:50 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox