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: <202209021628.FSjVTR8L-lkp@intel.com>
Date:   Fri, 2 Sep 2022 16:27:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     kbuild-all@...ts.01.org, Ammar Faizi <ammarfaizi2@...weeb.org>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:viro/vfs/next.tty 8/8]
 arch/parisc/include/asm/uaccess.h:89:15: warning: assignment to 'void *'
 from 'unsigned int' makes pointer from integer without a cast

tree:   https://github.com/ammarfaizi2/linux-block viro/vfs/next.tty
head:   6890ade9a0f2c360dbc86f39afc1ef852f4a83c6
commit: 6890ade9a0f2c360dbc86f39afc1ef852f4a83c6 [8/8] saner tty_mode_ioctl() prototype
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20220902/202209021628.FSjVTR8L-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/ammarfaizi2/linux-block/commit/6890ade9a0f2c360dbc86f39afc1ef852f4a83c6
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block viro/vfs/next.tty
        git checkout 6890ade9a0f2c360dbc86f39afc1ef852f4a83c6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

   In file included from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from drivers/tty/tty_ioctl.c:13:
   drivers/tty/tty_ioctl.c: In function 'tty_mode_ioctl':
>> arch/parisc/include/asm/uaccess.h:89:15: warning: assignment to 'void *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
      89 |         (val) = (__force __typeof__(*(ptr))) __gu_val;  \
         |               ^
   arch/parisc/include/asm/uaccess.h:64:17: note: in expansion of macro '__get_user_asm'
      64 |         case 1: __get_user_asm(sr, val, "ldb", ptr); break; \
         |                 ^~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:76:9: note: in expansion of macro '__get_user_internal'
      76 |         __get_user_internal(SR_USER, val, ptr); \
         |         ^~~~~~~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:19:18: note: in expansion of macro '__get_user'
      19 | #define get_user __get_user
         |                  ^~~~~~~~~~
   drivers/tty/tty_ioctl.c:879:21: note: in expansion of macro 'get_user'
     879 |                 if (get_user(arg, (unsigned int __user *) arg))
         |                     ^~~~~~~~
>> arch/parisc/include/asm/uaccess.h:89:15: warning: assignment to 'void *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
      89 |         (val) = (__force __typeof__(*(ptr))) __gu_val;  \
         |               ^
   arch/parisc/include/asm/uaccess.h:65:17: note: in expansion of macro '__get_user_asm'
      65 |         case 2: __get_user_asm(sr, val, "ldh", ptr); break; \
         |                 ^~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:76:9: note: in expansion of macro '__get_user_internal'
      76 |         __get_user_internal(SR_USER, val, ptr); \
         |         ^~~~~~~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:19:18: note: in expansion of macro '__get_user'
      19 | #define get_user __get_user
         |                  ^~~~~~~~~~
   drivers/tty/tty_ioctl.c:879:21: note: in expansion of macro 'get_user'
     879 |                 if (get_user(arg, (unsigned int __user *) arg))
         |                     ^~~~~~~~
>> arch/parisc/include/asm/uaccess.h:89:15: warning: assignment to 'void *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
      89 |         (val) = (__force __typeof__(*(ptr))) __gu_val;  \
         |               ^
   arch/parisc/include/asm/uaccess.h:66:17: note: in expansion of macro '__get_user_asm'
      66 |         case 4: __get_user_asm(sr, val, "ldw", ptr); break; \
         |                 ^~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:76:9: note: in expansion of macro '__get_user_internal'
      76 |         __get_user_internal(SR_USER, val, ptr); \
         |         ^~~~~~~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:19:18: note: in expansion of macro '__get_user'
      19 | #define get_user __get_user
         |                  ^~~~~~~~~~
   drivers/tty/tty_ioctl.c:879:21: note: in expansion of macro 'get_user'
     879 |                 if (get_user(arg, (unsigned int __user *) arg))
         |                     ^~~~~~~~
   arch/parisc/include/asm/uaccess.h:122:15: warning: assignment to 'void *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
     122 |         (val) = __gu_tmp.t;                             \
         |               ^
   arch/parisc/include/asm/uaccess.h:22:33: note: in expansion of macro '__get_user_asm64'
      22 | #define LDD_USER(sr, val, ptr)  __get_user_asm64(sr, val, ptr)
         |                                 ^~~~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:67:17: note: in expansion of macro 'LDD_USER'
      67 |         case 8: LDD_USER(sr, val, ptr); break;          \
         |                 ^~~~~~~~
   arch/parisc/include/asm/uaccess.h:76:9: note: in expansion of macro '__get_user_internal'
      76 |         __get_user_internal(SR_USER, val, ptr); \
         |         ^~~~~~~~~~~~~~~~~~~
   arch/parisc/include/asm/uaccess.h:19:18: note: in expansion of macro '__get_user'
      19 | #define get_user __get_user
         |                  ^~~~~~~~~~
   drivers/tty/tty_ioctl.c:879:21: note: in expansion of macro 'get_user'
     879 |                 if (get_user(arg, (unsigned int __user *) arg))
         |                     ^~~~~~~~
   drivers/tty/tty_ioctl.c:881:53: warning: passing argument 2 of 'tty_change_softcar' makes integer from pointer without a cast [-Wint-conversion]
     881 |                 return tty_change_softcar(real_tty, arg);
         |                                                     ^~~
         |                                                     |
         |                                                     void *
   drivers/tty/tty_ioctl.c:734:59: note: expected 'int' but argument is of type 'void *'
     734 | static int tty_change_softcar(struct tty_struct *tty, int arg)
         |                                                       ~~~~^~~


vim +89 arch/parisc/include/asm/uaccess.h

3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16  78  
671028728083e8 arch/parisc/include/asm/uaccess.h Helge Deller   2021-09-09  79  #define __get_user_asm(sr, val, ldx, ptr)		\
3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16  80  {							\
3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16  81  	register long __gu_val;				\
3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16  82  							\
5613a930857ecf arch/parisc/include/asm/uaccess.h Helge Deller   2022-02-16  83  	__asm__("1: " ldx " 0(%%sr%2,%3),%0\n"		\
d19f5e41b344a0 arch/parisc/include/asm/uaccess.h Helge Deller   2017-03-25  84  		"9:\n"					\
d19f5e41b344a0 arch/parisc/include/asm/uaccess.h Helge Deller   2017-03-25  85  		ASM_EXCEPTIONTABLE_ENTRY_EFAULT(1b, 9b)	\
dbd0b42350d571 arch/parisc/include/asm/uaccess.h Helge Deller   2022-02-13  86  		: "=r"(__gu_val), "+r"(__gu_err)        \
5613a930857ecf arch/parisc/include/asm/uaccess.h Helge Deller   2022-02-16  87  		: "i"(sr), "r"(ptr));			\
3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16  88  							\
3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16 @89  	(val) = (__force __typeof__(*(ptr))) __gu_val;	\
3f795cef0ecdf9 arch/parisc/include/asm/uaccess.h Helge Deller   2017-04-16  90  }
^1da177e4c3f41 include/asm-parisc/uaccess.h      Linus Torvalds 2005-04-16  91  

:::::: The code at line 89 was first introduced by commit
:::::: 3f795cef0ecdf9bc980dd058d49bdab4b19af1d3 parisc: Fix get_user() for 64-bit value on 32-bit kernel

:::::: TO: Helge Deller <deller@....de>
:::::: CC: Helge Deller <deller@....de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ