[vfs:uaccess.mips 9/14] arch/mips/kernel/mips-r2-to-r6-emul.c:1203:8: note: in expansion of macro 'access_ok'

[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 uaccess.mips
head:   fdfb4ac6539d5fc629efc14c586f32ddec05b13b
commit: 1026239ffbda8a5af9a0d7090d2ea114a01b6816 [9/14] mips: sanitize __access_ok()
config: mips-malta_qemu_32r6_defconfig (attached as .config)
compiler: mipsel-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 1026239ffbda8a5af9a0d7090d2ea114a01b6816
        # save the attached .config to linux build tree
        make.cross ARCH=mips 

All warnings (new ones prefixed by >>):

   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/kernel/mips-r2-to-r6-emul.c: In function 'mipsr2_decoder':
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
>> arch/mips/kernel/mips-r2-to-r6-emul.c:1203:8: note: in expansion of macro 'access_ok'
      if (!access_ok(VERIFY_READ, vaddr, 4)) {
           ^~~~~~~~~
   In file included from include/linux/uaccess.h:13:0,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:32:
   arch/mips/include/asm/uaccess.h:131:19: note: expected 'const void *' but argument is of type 'long unsigned int'
    static inline int __access_ok(const void __user *p, unsigned long size)
                      ^~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   arch/mips/kernel/mips-r2-to-r6-emul.c:1276:8: note: in expansion of macro 'access_ok'
      if (!access_ok(VERIFY_READ, vaddr, 4)) {
           ^~~~~~~~~
   In file included from include/linux/uaccess.h:13:0,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:32:
   arch/mips/include/asm/uaccess.h:131:19: note: expected 'const void *' but argument is of type 'long unsigned int'
    static inline int __access_ok(const void __user *p, unsigned long size)
                      ^~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   arch/mips/kernel/mips-r2-to-r6-emul.c:1350:8: note: in expansion of macro 'access_ok'
      if (!access_ok(VERIFY_WRITE, vaddr, 4)) {
           ^~~~~~~~~
   In file included from include/linux/uaccess.h:13:0,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:32:
   arch/mips/include/asm/uaccess.h:131:19: note: expected 'const void *' but argument is of type 'long unsigned int'
    static inline int __access_ok(const void __user *p, unsigned long size)
                      ^~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   arch/mips/kernel/mips-r2-to-r6-emul.c:1420:8: note: in expansion of macro 'access_ok'
      if (!access_ok(VERIFY_WRITE, vaddr, 4)) {
           ^~~~~~~~~
   In file included from include/linux/uaccess.h:13:0,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:32:
   arch/mips/include/asm/uaccess.h:131:19: note: expected 'const void *' but argument is of type 'long unsigned int'
    static inline int __access_ok(const void __user *p, unsigned long size)
                      ^~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   arch/mips/kernel/mips-r2-to-r6-emul.c:1495:8: note: in expansion of macro 'access_ok'
      if (!access_ok(VERIFY_READ, vaddr, 8)) {
           ^~~~~~~~~
   In file included from include/linux/uaccess.h:13:0,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:32:
   arch/mips/include/asm/uaccess.h:131:19: note: expected 'const void *' but argument is of type 'long unsigned int'
    static inline int __access_ok(const void __user *p, unsigned long size)
                      ^~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)
                                           ^
   arch/mips/kernel/mips-r2-to-r6-emul.c:1614:8: note: in expansion of macro 'access_ok'
      if (!access_ok(VERIFY_READ, vaddr, 8)) {
           ^~~~~~~~~
   In file included from include/linux/uaccess.h:13:0,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:32:
   arch/mips/include/asm/uaccess.h:131:19: note: expected 'const void *' but argument is of type 'long unsigned int'
    static inline int __access_ok(const void __user *p, unsigned long size)
                      ^~~~~~~~~~~
   In file included from arch/mips/include/asm/bug.h:4:0,
                    from include/linux/bug.h:4,
                    from arch/mips/kernel/mips-r2-to-r6-emul.c:13:
   arch/mips/include/asm/uaccess.h:138:21: error: passing argument 1 of '__access_ok' makes pointer from integer without a cast [-Werror=int-conversion]
     likely(__access_ok((addr), (size)))
                        ^
   include/linux/compiler.h:178:40: note: in definition of macro 'likely'
    # define likely(x) __builtin_expect(!!(x), 1)

vim +/access_ok +1203 arch/mips/kernel/mips-r2-to-r6-emul.c

b0a668fb Leonid Yegoshin 2014-12-03  1187  		 * But the sequence of multiple FPU instructions is much much
b0a668fb Leonid Yegoshin 2014-12-03  1188  		 * more often than LL-FPU-SC and I prefer loop here until
b0a668fb Leonid Yegoshin 2014-12-03  1189  		 * next scheduler cycle cancels FPU ownership
b0a668fb Leonid Yegoshin 2014-12-03  1190  		 */
b0a668fb Leonid Yegoshin 2014-12-03  1191  		own_fpu(1);	/* Restore FPU state. */
b0a668fb Leonid Yegoshin 2014-12-03  1192  
b0a668fb Leonid Yegoshin 2014-12-03  1193  		if (err)
b0a668fb Leonid Yegoshin 2014-12-03  1194  			current->thread.cp0_baduaddr = (unsigned long)fault_addr;
b0a668fb Leonid Yegoshin 2014-12-03  1195  
b0a668fb Leonid Yegoshin 2014-12-03  1196  		MIPS_R2_STATS(fpus);
b0a668fb Leonid Yegoshin 2014-12-03  1197  
b0a668fb Leonid Yegoshin 2014-12-03  1198  		break;
b0a668fb Leonid Yegoshin 2014-12-03  1199  
b0a668fb Leonid Yegoshin 2014-12-03  1200  	case lwl_op:
b0a668fb Leonid Yegoshin 2014-12-03  1201  		rt = regs->regs[MIPSInst_RT(inst)];
b0a668fb Leonid Yegoshin 2014-12-03  1202  		vaddr = regs->regs[MIPSInst_RS(inst)] + MIPSInst_SIMM(inst);
b0a668fb Leonid Yegoshin 2014-12-03 @1203  		if (!access_ok(VERIFY_READ, vaddr, 4)) {
b0a668fb Leonid Yegoshin 2014-12-03  1204  			current->thread.cp0_baduaddr = vaddr;
b0a668fb Leonid Yegoshin 2014-12-03  1205  			err = SIGSEGV;
b0a668fb Leonid Yegoshin 2014-12-03  1206  			break;
b0a668fb Leonid Yegoshin 2014-12-03  1207  		}
b0a668fb Leonid Yegoshin 2014-12-03  1208  		__asm__ __volatile__(
b0a668fb Leonid Yegoshin 2014-12-03  1209  			"	.set	push\n"
b0a668fb Leonid Yegoshin 2014-12-03  1210  			"	.set	reorder\n"
b0a668fb Leonid Yegoshin 2014-12-03  1211  #ifdef CONFIG_CPU_LITTLE_ENDIAN

:::::: The code at line 1203 was first introduced by commit
:::::: b0a668fb2038d846a466c7a16a358d874002b697 MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6

:::::: TO: Leonid Yegoshin <Leonid.Yegoshin@xxxxxxxxxx>
:::::: CC: Markos Chandras <markos.chandras@xxxxxxxxxx>

---
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