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]
Date:   Fri, 2 Sep 2022 16:27:12 +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/powerpc/include/asm/uaccess.h:261:13: 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: powerpc-allyesconfig (https://download.01.org/0day-ci/archive/20220902/202209021643.kq1QkE0a-lkp@intel.com/config)
compiler: powerpc-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=powerpc 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/powerpc/include/asm/uaccess.h:261:13: warning: assignment to 'void *' from 'unsigned int' makes pointer from integer without a cast [-Wint-conversion]
     261 |         (x) = (__typeof__(*(ptr)))__gu_val;                     \
         |             ^
   arch/powerpc/include/asm/uaccess.h:271:19: note: in expansion of macro '__get_user'
     271 |                   __get_user(x, _gu_addr) :                             \
         |                   ^~~~~~~~~~
   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 +261 arch/powerpc/include/asm/uaccess.h

5cd29b1fd3e8f2 arch/powerpc/include/asm/uaccess.h Christophe Leroy   2021-03-10  242  
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  243  /*
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  244   * This is a type: either unsigned long, if the argument fits into
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  245   * that type, or otherwise unsigned long long.
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  246   */
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  247  #define __long_type(x) \
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  248  	__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  249  
17f8c0bc21bbb7 arch/powerpc/include/asm/uaccess.h Christophe Leroy   2021-03-10  250  #define __get_user(x, ptr)					\
2df5e8bcca53e5 include/asm-powerpc/uaccess.h      Stephen Rothwell   2005-10-29  251  ({								\
2df5e8bcca53e5 include/asm-powerpc/uaccess.h      Stephen Rothwell   2005-10-29  252  	long __gu_err;						\
f7a6947cd49b7f arch/powerpc/include/asm/uaccess.h Michael Ellerman   2018-07-10  253  	__long_type(*(ptr)) __gu_val;				\
e00d93ac9a1896 arch/powerpc/include/asm/uaccess.h Anton Blanchard    2018-09-14  254  	__typeof__(*(ptr)) __user *__gu_addr = (ptr);	\
17f8c0bc21bbb7 arch/powerpc/include/asm/uaccess.h Christophe Leroy   2021-03-10  255  	__typeof__(sizeof(*(ptr))) __gu_size = sizeof(*(ptr));	\
d02f6b7dab8228 arch/powerpc/include/asm/uaccess.h Nicholas Piggin    2020-04-07  256  								\
1af1717dbf96eb arch/powerpc/include/asm/uaccess.h Michael S. Tsirkin 2013-05-26  257  	might_fault();					\
e72fcdb26cde72 arch/powerpc/include/asm/uaccess.h Christophe Leroy   2021-03-10  258  	allow_read_from_user(__gu_addr, __gu_size);		\
e72fcdb26cde72 arch/powerpc/include/asm/uaccess.h Christophe Leroy   2021-03-10  259  	__get_user_size_allowed(__gu_val, __gu_addr, __gu_size, __gu_err);	\
e72fcdb26cde72 arch/powerpc/include/asm/uaccess.h Christophe Leroy   2021-03-10  260  	prevent_read_from_user(__gu_addr, __gu_size);		\
2df5e8bcca53e5 include/asm-powerpc/uaccess.h      Stephen Rothwell   2005-10-29 @261  	(x) = (__typeof__(*(ptr)))__gu_val;			\
d02f6b7dab8228 arch/powerpc/include/asm/uaccess.h Nicholas Piggin    2020-04-07  262  								\
2df5e8bcca53e5 include/asm-powerpc/uaccess.h      Stephen Rothwell   2005-10-29  263  	__gu_err;						\
2df5e8bcca53e5 include/asm-powerpc/uaccess.h      Stephen Rothwell   2005-10-29  264  })
2df5e8bcca53e5 include/asm-powerpc/uaccess.h      Stephen Rothwell   2005-10-29  265  

:::::: The code at line 261 was first introduced by commit
:::::: 2df5e8bcca53e528a78ee0e3b114d0d21dd6d043 powerpc: merge uaccess.h

:::::: TO: Stephen Rothwell <sfr@...b.auug.org.au>
:::::: CC: Stephen Rothwell <sfr@...b.auug.org.au>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ