[arnd-playground:set_fs 2/11] mm/maccess.c:37:17: sparse: sparse: cast removes address space '__user' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git set_fs
head: 0a081326831928b0d739bce68b8c0f9138b9c8ba
commit: 872ec1b8b0c531c0367aa6f365149bf70d3bcd30 [2/11] sparc64: add __{get,put}_kernel_nocheck()
config: sparc64-randconfig-s032-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131259.S6ZP2d9J-lk...)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground set_fs
git checkout 872ec1b8b0c531c0367aa6f365149bf70d3bcd30
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> mm/maccess.c:37:17: sparse: sparse: cast removes address space '__user' of expression
>> mm/maccess.c:37:17: sparse: sparse: cast removes address space '__user' of expression
>> mm/maccess.c:37:17: sparse: sparse: cast removes address space '__user' of expression
>> mm/maccess.c:37:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:39:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:39:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:39:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:39:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:41:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:41:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:41:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:41:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:42:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:42:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:42:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:42:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:68:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:68:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:68:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:68:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:70:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:70:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:70:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:70:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:72:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:72:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:72:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:72:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:73:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:73:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:73:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:73:9: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:92:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:92:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:92:17: sparse: sparse: cast removes address space '__user' of expression
mm/maccess.c:92:17: sparse: sparse: cast removes address space '__user' of expression
vim +/__user +37 mm/maccess.c
b58294ead14cde Christoph Hellwig 2020-06-08 16
fe557319aa06c2 Christoph Hellwig 2020-06-17 17 #define copy_from_kernel_nofault_loop(dst, src, len, type, err_label) \
b58294ead14cde Christoph Hellwig 2020-06-08 18 while (len >= sizeof(type)) { \
b58294ead14cde Christoph Hellwig 2020-06-08 19 __get_kernel_nofault(dst, src, type, err_label); \
b58294ead14cde Christoph Hellwig 2020-06-08 20 dst += sizeof(type); \
b58294ead14cde Christoph Hellwig 2020-06-08 21 src += sizeof(type); \
b58294ead14cde Christoph Hellwig 2020-06-08 22 len -= sizeof(type); \
b58294ead14cde Christoph Hellwig 2020-06-08 23 }
b58294ead14cde Christoph Hellwig 2020-06-08 24
fe557319aa06c2 Christoph Hellwig 2020-06-17 25 long copy_from_kernel_nofault(void *dst, const void *src, size_t size)
b58294ead14cde Christoph Hellwig 2020-06-08 26 {
2423de2e6f4d86 Arnd Bergmann 2021-08-11 27 unsigned long align = 0;
2423de2e6f4d86 Arnd Bergmann 2021-08-11 28
2423de2e6f4d86 Arnd Bergmann 2021-08-11 29 if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
2423de2e6f4d86 Arnd Bergmann 2021-08-11 30 align = (unsigned long)dst | (unsigned long)src;
2423de2e6f4d86 Arnd Bergmann 2021-08-11 31
fe557319aa06c2 Christoph Hellwig 2020-06-17 32 if (!copy_from_kernel_nofault_allowed(src, size))
2a71e81d321987 Christoph Hellwig 2020-06-08 33 return -ERANGE;
b58294ead14cde Christoph Hellwig 2020-06-08 34
b58294ead14cde Christoph Hellwig 2020-06-08 35 pagefault_disable();
2423de2e6f4d86 Arnd Bergmann 2021-08-11 36 if (!(align & 7))
fe557319aa06c2 Christoph Hellwig 2020-06-17 @37 copy_from_kernel_nofault_loop(dst, src, size, u64, Efault);
2423de2e6f4d86 Arnd Bergmann 2021-08-11 38 if (!(align & 3))
fe557319aa06c2 Christoph Hellwig 2020-06-17 39 copy_from_kernel_nofault_loop(dst, src, size, u32, Efault);
2423de2e6f4d86 Arnd Bergmann 2021-08-11 40 if (!(align & 1))
fe557319aa06c2 Christoph Hellwig 2020-06-17 41 copy_from_kernel_nofault_loop(dst, src, size, u16, Efault);
fe557319aa06c2 Christoph Hellwig 2020-06-17 42 copy_from_kernel_nofault_loop(dst, src, size, u8, Efault);
b58294ead14cde Christoph Hellwig 2020-06-08 43 pagefault_enable();
b58294ead14cde Christoph Hellwig 2020-06-08 44 return 0;
b58294ead14cde Christoph Hellwig 2020-06-08 45 Efault:
b58294ead14cde Christoph Hellwig 2020-06-08 46 pagefault_enable();
b58294ead14cde Christoph Hellwig 2020-06-08 47 return -EFAULT;
b58294ead14cde Christoph Hellwig 2020-06-08 48 }
fe557319aa06c2 Christoph Hellwig 2020-06-17 49 EXPORT_SYMBOL_GPL(copy_from_kernel_nofault);
b58294ead14cde Christoph Hellwig 2020-06-08 50
:::::: The code at line 37 was first introduced by commit
:::::: fe557319aa06c23cffc9346000f119547e0f289a maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[arnd-playground:set_fs 6/11] arch/nios2/kernel/signal.c:109:14: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git set_fs
head: 0a081326831928b0d739bce68b8c0f9138b9c8ba
commit: a954036380ae20dbfa0c203bf6cafb21d1f3cedd [6/11] uaccess: generalize access_ok()
config: nios2-randconfig-s031-20220213 (https://download.01.org/0day-ci/archive/20220213/202202131038.l60bQPlc-lk...)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground set_fs
git checkout a954036380ae20dbfa0c203bf6cafb21d1f3cedd
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/nios2/kernel/signal.c:109:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got struct rt_sigframe *frame @@
arch/nios2/kernel/signal.c:109:14: sparse: expected void const [noderef] __user *ptr
arch/nios2/kernel/signal.c:109:14: sparse: got struct rt_sigframe *frame
arch/nios2/kernel/signal.c:112:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct sigset_t * @@
arch/nios2/kernel/signal.c:112:37: sparse: expected void const [noderef] __user *from
arch/nios2/kernel/signal.c:112:37: sparse: got struct sigset_t *
arch/nios2/kernel/signal.c:189:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct siginfo [noderef] [usertype] __user *to @@ got struct siginfo * @@
arch/nios2/kernel/signal.c:189:46: sparse: expected struct siginfo [noderef] [usertype] __user *to
arch/nios2/kernel/signal.c:189:46: sparse: got struct siginfo *
arch/nios2/kernel/signal.c:192:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long [noderef] __user *__pu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:192:16: sparse: expected unsigned long [noderef] __user *__pu_ptr
arch/nios2/kernel/signal.c:192:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:193:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct ucontext *[noderef] __user *__pu_ptr @@ got struct ucontext ** @@
arch/nios2/kernel/signal.c:193:16: sparse: expected struct ucontext *[noderef] __user *__pu_ptr
arch/nios2/kernel/signal.c:193:16: sparse: got struct ucontext **
arch/nios2/kernel/signal.c:194:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sigaltstack [noderef] [usertype] __user * @@ got struct sigaltstack * @@
arch/nios2/kernel/signal.c:194:33: sparse: expected struct sigaltstack [noderef] [usertype] __user *
arch/nios2/kernel/signal.c:194:33: sparse: got struct sigaltstack *
arch/nios2/kernel/signal.c:196:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct sigset_t * @@
arch/nios2/kernel/signal.c:196:30: sparse: expected void [noderef] __user *to
arch/nios2/kernel/signal.c:196:30: sparse: got struct sigset_t *
arch/nios2/kernel/signal.c:48:15: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const [noderef] __user *__gu_ptr @@ got int * @@
arch/nios2/kernel/signal.c:48:15: sparse: expected int const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:48:15: sparse: got int *
arch/nios2/kernel/signal.c:52:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:52:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:52:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:53:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:53:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:53:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:54:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:54:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:54:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:55:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:55:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:55:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:56:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:56:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:56:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:57:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:57:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:57:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:58:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:58:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:58:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:59:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:59:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:59:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:60:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:60:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:60:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:61:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:61:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:61:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:62:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:62:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:62:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:63:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:63:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:63:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:64:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:64:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:64:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:65:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:65:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:65:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:66:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:66:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:66:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:67:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:67:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:67:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:68:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:68:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:68:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:69:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:69:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:69:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:70:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:70:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:70:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:71:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:71:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:71:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:72:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:72:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:72:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:73:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:73:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:73:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:74:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:74:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:74:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:76:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:76:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:76:16: sparse: got unsigned long *
arch/nios2/kernel/signal.c:78:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long const [noderef] __user *__gu_ptr @@ got unsigned long * @@
arch/nios2/kernel/signal.c:78:16: sparse: expected unsigned long const [noderef] __user *__gu_ptr
arch/nios2/kernel/signal.c:78:16: sparse: got unsigned long *
vim +109 arch/nios2/kernel/signal.c
b53e906d255d7b Ley Foon Tan 2014-11-06 100
b53e906d255d7b Ley Foon Tan 2014-11-06 101 asmlinkage int do_rt_sigreturn(struct switch_stack *sw)
b53e906d255d7b Ley Foon Tan 2014-11-06 102 {
b53e906d255d7b Ley Foon Tan 2014-11-06 103 struct pt_regs *regs = (struct pt_regs *)(sw + 1);
b53e906d255d7b Ley Foon Tan 2014-11-06 104 /* Verify, can we follow the stack back */
b53e906d255d7b Ley Foon Tan 2014-11-06 105 struct rt_sigframe *frame = (struct rt_sigframe *) regs->sp;
b53e906d255d7b Ley Foon Tan 2014-11-06 106 sigset_t set;
b53e906d255d7b Ley Foon Tan 2014-11-06 107 int rval;
b53e906d255d7b Ley Foon Tan 2014-11-06 108
96d4f267e40f95 Linus Torvalds 2019-01-03 @109 if (!access_ok(frame, sizeof(*frame)))
b53e906d255d7b Ley Foon Tan 2014-11-06 110 goto badframe;
b53e906d255d7b Ley Foon Tan 2014-11-06 111
b53e906d255d7b Ley Foon Tan 2014-11-06 112 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
b53e906d255d7b Ley Foon Tan 2014-11-06 113 goto badframe;
b53e906d255d7b Ley Foon Tan 2014-11-06 114
b53e906d255d7b Ley Foon Tan 2014-11-06 115 set_current_blocked(&set);
b53e906d255d7b Ley Foon Tan 2014-11-06 116
b53e906d255d7b Ley Foon Tan 2014-11-06 117 if (rt_restore_ucontext(regs, sw, &frame->uc, &rval))
b53e906d255d7b Ley Foon Tan 2014-11-06 118 goto badframe;
b53e906d255d7b Ley Foon Tan 2014-11-06 119
b53e906d255d7b Ley Foon Tan 2014-11-06 120 return rval;
b53e906d255d7b Ley Foon Tan 2014-11-06 121
b53e906d255d7b Ley Foon Tan 2014-11-06 122 badframe:
3cf5d076fb4d48 Eric W. Biederman 2019-05-23 123 force_sig(SIGSEGV);
b53e906d255d7b Ley Foon Tan 2014-11-06 124 return 0;
b53e906d255d7b Ley Foon Tan 2014-11-06 125 }
b53e906d255d7b Ley Foon Tan 2014-11-06 126
:::::: The code at line 109 was first introduced by commit
:::::: 96d4f267e40f9509e8a66e2b39e8b95655617693 Remove 'type' argument from access_ok() function
:::::: TO: Linus Torvalds <torvalds(a)linux-foundation.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[ammarfaizi2-block:crng/random/jd/fast-mix-lfsr 17/38] include/trace/trace_events.h:870:42: error: passing argument 1 of 'check_trace_callback_type_mix_pool_bytes_nolock' from incompatible pointer type
by kernel test robot
tree: https://github.com/ammarfaizi2/linux-block crng/random/jd/fast-mix-lfsr
head: 2cdf0f5c31f7568d709533d93b746ae8932dfa99
commit: fc2551cdc07cfb4ea1247ecaec28e78f6d942c1f [17/38] random: make more consistent use of integer types
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220213/202202131057.QVvn6nBp-lk...)
compiler: powerpc-linux-gcc (GCC) 11.2.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/fc2551cdc07cfb4ea1247ec...
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block crng/random/jd/fast-mix-lfsr
git checkout fc2551cdc07cfb4ea1247ecaec28e78f6d942c1f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/char/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the ammarfaizi2-block/crng/random/jd/fast-mix-lfsr HEAD 2cdf0f5c31f7568d709533d93b746ae8932dfa99 builds fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
In file included from include/trace/define_trace.h:102,
from include/trace/events/random.h:212,
from drivers/char/random.c:241:
include/trace/events/random.h: In function 'ftrace_test_probe_mix_pool_bytes_nolock':
>> include/trace/trace_events.h:870:42: error: passing argument 1 of 'check_trace_callback_type_mix_pool_bytes_nolock' from incompatible pointer type [-Werror=incompatible-pointer-types]
870 | check_trace_callback_type_##call(trace_event_raw_event_##template); \
| ^~~~~~~~~~~~~~~~~~~~~~
| |
| void (*)(void *, size_t, long unsigned int) {aka void (*)(void *, unsigned int, long unsigned int)}
include/trace/events/random.h:55:1: note: in expansion of macro 'DEFINE_EVENT'
55 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
| ^~~~~~~~~~~~
In file included from include/trace/syscall.h:5,
from include/linux/syscalls.h:88,
from drivers/char/random.c:228:
include/linux/tracepoint.h:279:49: note: expected 'void (*)(void *, int, long unsigned int)' but argument is of type 'void (*)(void *, size_t, long unsigned int)' {aka 'void (*)(void *, unsigned int, long unsigned int)'}
279 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
| ~~~~~~~^~~~~~~~~~~~~~~
include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
419 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
542 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
include/trace/events/random.h:55:1: note: in expansion of macro 'DEFINE_EVENT'
55 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
| ^~~~~~~~~~~~
In file included from include/trace/define_trace.h:103,
from include/trace/events/random.h:212,
from drivers/char/random.c:241:
include/trace/events/random.h: In function 'perf_test_probe_mix_pool_bytes_nolock':
>> include/trace/perf.h:99:42: error: passing argument 1 of 'check_trace_callback_type_mix_pool_bytes_nolock' from incompatible pointer type [-Werror=incompatible-pointer-types]
99 | check_trace_callback_type_##call(perf_trace_##template); \
| ^~~~~~~~~~~
| |
| void (*)(void *, size_t, long unsigned int) {aka void (*)(void *, unsigned int, long unsigned int)}
include/trace/events/random.h:55:1: note: in expansion of macro 'DEFINE_EVENT'
55 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
| ^~~~~~~~~~~~
In file included from include/trace/syscall.h:5,
from include/linux/syscalls.h:88,
from drivers/char/random.c:228:
include/linux/tracepoint.h:279:49: note: expected 'void (*)(void *, int, long unsigned int)' but argument is of type 'void (*)(void *, size_t, long unsigned int)' {aka 'void (*)(void *, unsigned int, long unsigned int)'}
279 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
| ~~~~~~~^~~~~~~~~~~~~~~
include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
419 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
542 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
include/trace/events/random.h:55:1: note: in expansion of macro 'DEFINE_EVENT'
55 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
| ^~~~~~~~~~~~
In file included from include/trace/define_trace.h:104,
from include/trace/events/random.h:212,
from drivers/char/random.c:241:
include/trace/events/random.h: In function 'bpf_test_probe_mix_pool_bytes_nolock':
>> include/trace/bpf_probe.h:94:42: error: passing argument 1 of 'check_trace_callback_type_mix_pool_bytes_nolock' from incompatible pointer type [-Werror=incompatible-pointer-types]
94 | check_trace_callback_type_##call(__bpf_trace_##template); \
| ^~~~~~~~~~~~
| |
| void (*)(void *, size_t, long unsigned int) {aka void (*)(void *, unsigned int, long unsigned int)}
include/trace/bpf_probe.h:130:9: note: in expansion of macro '__DEFINE_EVENT'
130 | __DEFINE_EVENT(template, call, PARAMS(proto), PARAMS(args), 0)
| ^~~~~~~~~~~~~~
include/trace/events/random.h:55:1: note: in expansion of macro 'DEFINE_EVENT'
55 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
| ^~~~~~~~~~~~
In file included from include/trace/syscall.h:5,
from include/linux/syscalls.h:88,
from drivers/char/random.c:228:
include/linux/tracepoint.h:279:49: note: expected 'void (*)(void *, int, long unsigned int)' but argument is of type 'void (*)(void *, size_t, long unsigned int)' {aka 'void (*)(void *, unsigned int, long unsigned int)'}
279 | check_trace_callback_type_##name(void (*cb)(data_proto)) \
| ~~~~~~~^~~~~~~~~~~~~~~
include/linux/tracepoint.h:419:9: note: in expansion of macro '__DECLARE_TRACE'
419 | __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \
| ^~~~~~~~~~~~~~~
include/linux/tracepoint.h:542:9: note: in expansion of macro 'DECLARE_TRACE'
542 | DECLARE_TRACE(name, PARAMS(proto), PARAMS(args))
| ^~~~~~~~~~~~~
include/trace/events/random.h:55:1: note: in expansion of macro 'DEFINE_EVENT'
55 | DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock,
| ^~~~~~~~~~~~
drivers/char/random.c: At top level:
drivers/char/random.c:1739:6: warning: no previous prototype for 'add_hwgenerator_randomness' [-Wmissing-prototypes]
1739 | void add_hwgenerator_randomness(const void *buffer, size_t count,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/check_trace_callback_type_mix_pool_bytes_nolock +870 include/trace/trace_events.h
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 830)
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 831) #undef DECLARE_EVENT_CLASS
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 832) #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 833) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 834) static notrace void \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 835) trace_event_raw_event_##call(void *__data, proto) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 836) { \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 837) struct trace_event_file *trace_file = __data; \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 838) struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 839) struct trace_event_buffer fbuffer; \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 840) struct trace_event_raw_##call *entry; \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 841) int __data_size; \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 842) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 843) if (trace_trigger_soft_disabled(trace_file)) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 844) return; \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 845) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 846) __data_size = trace_event_get_offsets_##call(&__data_offsets, args); \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 847) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 848) entry = trace_event_buffer_reserve(&fbuffer, trace_file, \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 849) sizeof(*entry) + __data_size); \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 850) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 851) if (!entry) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 852) return; \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 853) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 854) tstruct \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 855) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 856) { assign; } \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 857) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 858) trace_event_buffer_commit(&fbuffer); \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 859) }
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 860) /*
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 861) * The ftrace_test_probe is compiled out, it is only here as a build time check
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 862) * to make sure that if the tracepoint handling changes, the ftrace probe will
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 863) * fail to compile unless it too is updated.
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 864) */
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 865)
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 866) #undef DEFINE_EVENT
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 867) #define DEFINE_EVENT(template, call, proto, args) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 868) static inline void ftrace_test_probe_##call(void) \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 869) { \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 @870) check_trace_callback_type_##call(trace_event_raw_event_##template); \
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 871) }
46ac51822a6a0b Steven Rostedt (Red Hat 2015-09-23 872)
:::::: The code at line 870 was first introduced by commit
:::::: 46ac51822a6a0b83ee3e408ee9edcb292fb8ced0 tracing: Move non perf code out of perf.h
:::::: TO: Steven Rostedt (Red Hat) <rostedt(a)goodmis.org>
:::::: CC: Steven Rostedt <rostedt(a)goodmis.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week