All of lore.kernel.org
 help / color / mirror / Atom feed
* [hch-misc:set_fs-removal 14/14] include/linux/regset.h:323:7: error: result of comparison of constant 70368744177664 with expression of type 'unsigned int' is always true
@ 2020-09-03 10:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-09-03 10:11 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5682 bytes --]

tree:   git://git.infradead.org/users/hch/misc.git set_fs-removal
head:   916d3a255939d055cd4cbe1953f4a195f6aa3b0d
commit: 916d3a255939d055cd4cbe1953f4a195f6aa3b0d [14/14] powerpc: remove address space overrides using set_fs()
config: powerpc64-randconfig-r032-20200902 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1284dc34abd11ce4275ad21c0470ad8c679b59b7)
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
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        git checkout 916d3a255939d055cd4cbe1953f4a195f6aa3b0d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All errors (new ones prefixed by >>):

   In file included from arch/powerpc/kernel/ptrace/ptrace.c:18:
>> include/linux/regset.h:323:7: error: result of comparison of constant 70368744177664 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
           if (!access_ok(data, size))
                ^~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/uaccess.h:35:3: note: expanded from macro 'access_ok'
            __access_ok((unsigned long)(addr), (size)))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/powerpc/include/asm/uaccess.h:20:32: note: expanded from macro '__access_ok'
           (addr < TASK_SIZE_MAX && size < TASK_SIZE_MAX)
                                    ~~~~ ^ ~~~~~~~~~~~~~
   1 error generated.

git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc set_fs-removal
git checkout 916d3a255939d055cd4cbe1953f4a195f6aa3b0d
vim +323 include/linux/regset.h

bae3f7c39dee59 Roland McGrath 2008-01-30  288  
b4e9c9549f6232 Al Viro        2020-06-01  289  extern int regset_get(struct task_struct *target,
b4e9c9549f6232 Al Viro        2020-06-01  290  		      const struct user_regset *regset,
b4e9c9549f6232 Al Viro        2020-06-01  291  		      unsigned int size, void *data);
b4e9c9549f6232 Al Viro        2020-06-01  292  
b4e9c9549f6232 Al Viro        2020-06-01  293  extern int regset_get_alloc(struct task_struct *target,
b4e9c9549f6232 Al Viro        2020-06-01  294  			    const struct user_regset *regset,
b4e9c9549f6232 Al Viro        2020-06-01  295  			    unsigned int size,
b4e9c9549f6232 Al Viro        2020-06-01  296  			    void **data);
b4e9c9549f6232 Al Viro        2020-06-01  297  
dc12d7968f9c95 Al Viro        2020-02-17  298  extern int copy_regset_to_user(struct task_struct *target,
5bde4d181793be Roland McGrath 2008-01-30  299  			       const struct user_regset_view *view,
dc12d7968f9c95 Al Viro        2020-02-17  300  			       unsigned int setno, unsigned int offset,
dc12d7968f9c95 Al Viro        2020-02-17  301  			       unsigned int size, void __user *data);
5bde4d181793be Roland McGrath 2008-01-30  302  
5bde4d181793be Roland McGrath 2008-01-30  303  /**
5bde4d181793be Roland McGrath 2008-01-30  304   * copy_regset_from_user - store into thread's user_regset data from user memory
5bde4d181793be Roland McGrath 2008-01-30  305   * @target:	thread to be examined
5bde4d181793be Roland McGrath 2008-01-30  306   * @view:	&struct user_regset_view describing user thread machine state
5bde4d181793be Roland McGrath 2008-01-30  307   * @setno:	index in @view->regsets
5bde4d181793be Roland McGrath 2008-01-30  308   * @offset:	offset into the regset data, in bytes
5bde4d181793be Roland McGrath 2008-01-30  309   * @size:	amount of data to copy, in bytes
5bde4d181793be Roland McGrath 2008-01-30  310   * @data:	user-mode pointer to copy from
5bde4d181793be Roland McGrath 2008-01-30  311   */
5bde4d181793be Roland McGrath 2008-01-30  312  static inline int copy_regset_from_user(struct task_struct *target,
5bde4d181793be Roland McGrath 2008-01-30  313  					const struct user_regset_view *view,
5bde4d181793be Roland McGrath 2008-01-30  314  					unsigned int setno,
5bde4d181793be Roland McGrath 2008-01-30  315  					unsigned int offset, unsigned int size,
5bde4d181793be Roland McGrath 2008-01-30  316  					const void __user *data)
5bde4d181793be Roland McGrath 2008-01-30  317  {
5bde4d181793be Roland McGrath 2008-01-30  318  	const struct user_regset *regset = &view->regsets[setno];
5bde4d181793be Roland McGrath 2008-01-30  319  
c8e252586f8d5d H. Peter Anvin 2012-03-02  320  	if (!regset->set)
c8e252586f8d5d H. Peter Anvin 2012-03-02  321  		return -EOPNOTSUPP;
c8e252586f8d5d H. Peter Anvin 2012-03-02  322  
96d4f267e40f95 Linus Torvalds 2019-01-03 @323  	if (!access_ok(data, size))
5189fa19a4b2b4 H. Peter Anvin 2012-03-02  324  		return -EFAULT;
5bde4d181793be Roland McGrath 2008-01-30  325  
5bde4d181793be Roland McGrath 2008-01-30  326  	return regset->set(target, regset, offset, size, NULL, data);
5bde4d181793be Roland McGrath 2008-01-30  327  }
5bde4d181793be Roland McGrath 2008-01-30  328  

:::::: The code at line 323 was first introduced by commit
:::::: 96d4f267e40f9509e8a66e2b39e8b95655617693 Remove 'type' argument from access_ok() function

:::::: TO: Linus Torvalds <torvalds@linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30078 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-03 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 10:11 [hch-misc:set_fs-removal 14/14] include/linux/regset.h:323:7: error: result of comparison of constant 70368744177664 with expression of type 'unsigned int' is always true kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.