[vfs:untested-uaccess 68/79] include/linux/uaccess.h:26:1: error: redefinition of '__copy_from_user'

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git untested-uaccess
head:   e4c5cc79ec8eab6bc3e74d9994b33f368f137223
commit: 8ea7f40d2191c4bdc706c689856ac43157f1e32e [68/79] sparc: switch to RAW_COPY_USER
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 8ea7f40d2191c4bdc706c689856ac43157f1e32e
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/highmem.h:8:0,
                    from include/linux/pagemap.h:10,
                    from block//partitions/check.h:1,
                    from block//partitions/check.c:21:
>> include/linux/uaccess.h:26:1: error: redefinition of '__copy_from_user'
    __copy_from_user(void *to, const void __user *from, unsigned long n)
    ^~~~~~~~~~~~~~~~
   In file included from arch/sparc/include/asm/uaccess.h:4:0,
                    from include/linux/uaccess.h:13,
                    from include/linux/highmem.h:8,
                    from include/linux/pagemap.h:10,
                    from block//partitions/check.h:1,
                    from block//partitions/check.c:21:
   arch/sparc/include/asm/uaccess_64.h:207:35: note: previous definition of '__copy_from_user' was here
    #define __copy_from_user_inatomic __copy_from_user
                                      ^
>> include/linux/uaccess.h:18:1: note: in expansion of macro '__copy_from_user_inatomic'
    __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
    ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/highmem.h:8:0,
                    from include/linux/pagemap.h:10,
                    from block//partitions/check.h:1,
                    from block//partitions/check.c:21:
>> include/linux/uaccess.h:43:1: error: redefinition of '__copy_to_user'
    __copy_to_user(void __user *to, const void *from, unsigned long n)
    ^~~~~~~~~~~~~~
   In file included from arch/sparc/include/asm/uaccess.h:4:0,
                    from include/linux/uaccess.h:13,
                    from include/linux/highmem.h:8,
                    from include/linux/pagemap.h:10,
                    from block//partitions/check.h:1,
                    from block//partitions/check.c:21:
   arch/sparc/include/asm/uaccess_64.h:206:33: note: previous definition of '__copy_to_user' was here
    #define __copy_to_user_inatomic __copy_to_user
                                    ^
>> include/linux/uaccess.h:35:1: note: in expansion of macro '__copy_to_user_inatomic'
    __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
    ^~~~~~~~~~~~~~~~~~~~~~~

vim +/__copy_from_user +26 include/linux/uaccess.h

5e6039d8 Al Viro       2016-12-27   7  
5e6039d8 Al Viro       2016-12-27   8  #define VERIFY_READ 0
5e6039d8 Al Viro       2016-12-27   9  #define VERIFY_WRITE 1
5e6039d8 Al Viro       2016-12-27  10  
19eddb0e Al Viro       2017-03-20  11  #define uaccess_kernel() segment_eq(get_fs(), KERNEL_DS)
19eddb0e Al Viro       2017-03-20  12  
c22ce143 Hiro Yoshioka 2006-06-23 @13  #include <asm/uaccess.h>
c22ce143 Hiro Yoshioka 2006-06-23  14  
3fa08992 Al Viro       2017-03-20  15  #ifdef CONFIG_ARCH_HAS_RAW_COPY_USER
3fa08992 Al Viro       2017-03-20  16  
3fa08992 Al Viro       2017-03-20  17  static __always_inline unsigned long
3fa08992 Al Viro       2017-03-20 @18  __copy_from_user_inatomic(void *to, const void __user *from, unsigned long n)
3fa08992 Al Viro       2017-03-20  19  {
3fa08992 Al Viro       2017-03-20  20  	kasan_check_write(to, n);
3fa08992 Al Viro       2017-03-20  21  	check_object_size(to, n, false);
3fa08992 Al Viro       2017-03-20  22  	return raw_copy_from_user(to, from, n);
3fa08992 Al Viro       2017-03-20  23  }
3fa08992 Al Viro       2017-03-20  24  
3fa08992 Al Viro       2017-03-20  25  static __always_inline unsigned long
3fa08992 Al Viro       2017-03-20 @26  __copy_from_user(void *to, const void __user *from, unsigned long n)
3fa08992 Al Viro       2017-03-20  27  {
3fa08992 Al Viro       2017-03-20  28  	might_fault();
3fa08992 Al Viro       2017-03-20  29  	kasan_check_write(to, n);
3fa08992 Al Viro       2017-03-20  30  	check_object_size(to, n, false);
3fa08992 Al Viro       2017-03-20  31  	return raw_copy_from_user(to, from, n);
3fa08992 Al Viro       2017-03-20  32  }
3fa08992 Al Viro       2017-03-20  33  
3fa08992 Al Viro       2017-03-20  34  static __always_inline unsigned long
3fa08992 Al Viro       2017-03-20 @35  __copy_to_user_inatomic(void __user *to, const void *from, unsigned long n)
3fa08992 Al Viro       2017-03-20  36  {
3fa08992 Al Viro       2017-03-20  37  	kasan_check_read(to, n);
3fa08992 Al Viro       2017-03-20  38  	check_object_size(to, n, true);
3fa08992 Al Viro       2017-03-20  39  	return raw_copy_to_user(to, from, n);
3fa08992 Al Viro       2017-03-20  40  }
3fa08992 Al Viro       2017-03-20  41  
3fa08992 Al Viro       2017-03-20  42  static __always_inline unsigned long
3fa08992 Al Viro       2017-03-20 @43  __copy_to_user(void __user *to, const void *from, unsigned long n)
3fa08992 Al Viro       2017-03-20  44  {
3fa08992 Al Viro       2017-03-20  45  	might_fault();
3fa08992 Al Viro       2017-03-20  46  	kasan_check_read(to, n);

:::::: The code at line 26 was first introduced by commit
:::::: 3fa08992e9cc011aebe6aa4ab69430ab7af14e48 default from-user helpers

:::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
:::::: CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux