[asm-generic:asm-generic-uaccess-5 1/8] arch/um/kernel/skas/uaccess.c:246:17: error: 'src' undeclared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git asm-generic-uaccess-5
head:   a8cdb21b715276b7638a636237489f2425c24180
commit: 3a68cb1dbf65aa5c86ae185e5c51c5c26c31a54a [1/8] asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git/commit/?id=3a68cb1dbf65aa5c86ae185e5c51c5c26c31a54a
        git remote add asm-generic https://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic.git
        git fetch --no-tags asm-generic asm-generic-uaccess-5
        git checkout 3a68cb1dbf65aa5c86ae185e5c51c5c26c31a54a
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   In file included from arch/um/include/asm/uaccess.h:39,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from include/linux/highmem.h:5,
                    from arch/um/kernel/skas/uaccess.c:7:
   arch/um/kernel/skas/uaccess.c: In function 'strnlen_user':
>> arch/um/kernel/skas/uaccess.c:246:17: error: 'src' undeclared (first use in this function)
     246 |  if (!access_ok(src, 1))
         |                 ^~~
   include/asm-generic/uaccess.h:124:59: note: in definition of macro 'access_ok'
     124 | #define access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
         |                                                           ^~~~
   arch/um/kernel/skas/uaccess.c:246:17: note: each undeclared identifier is reported only once for each function it appears in
     246 |  if (!access_ok(src, 1))
         |                 ^~~
   include/asm-generic/uaccess.h:124:59: note: in definition of macro 'access_ok'
     124 | #define access_ok(addr, size) __access_ok((unsigned long)(addr),(size))
         |                                                           ^~~~


vim +/src +246 arch/um/kernel/skas/uaccess.c

   241	
   242	long strnlen_user(const void __user *str, long len)
   243	{
   244		int count = 0, n;
   245	
 > 246		if (!access_ok(src, 1))
   247			return -EFAULT;
   248	
   249		if (uaccess_kernel())
   250			return strnlen((__force char*)str, len) + 1;
   251	
   252		n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
   253		if (n == 0)
   254			return count + 1;
   255		return 0;
   256	}
   257	EXPORT_SYMBOL(strnlen_user);
   258	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux