* arch/h8300/kernel/signal.c:112:14: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-04-28 12:00 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-04-28 12:00 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: kbuild-all, linux-kernel, Christoph Hellwig
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8f4dd16603ce834d1c5c4da67803ea82dd282511
commit: 12700c17fc286149324f92d6d380bc48e43f253d uaccess: generalize access_ok()
date: 9 weeks ago
config: h8300-randconfig-s031-20220428 (https://download.01.org/0day-ci/archive/20220428/202204281940.PxJNtrGR-lkp@intel.com/config)
compiler: h8300-linux-gcc (GCC) 11.3.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/torvalds/linux.git/commit/?id=12700c17fc286149324f92d6d380bc48e43f253d
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 12700c17fc286149324f92d6d380bc48e43f253d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=h8300 SHELL=/bin/bash arch/h8300/kernel/ kernel/debug/kdb/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/h8300/kernel/signal.c:112:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got struct rt_sigframe *frame @@
arch/h8300/kernel/signal.c:112:14: sparse: expected void const [noderef] __user *ptr
arch/h8300/kernel/signal.c:112:14: sparse: got struct rt_sigframe *frame
arch/h8300/kernel/signal.c:114:37: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got struct sigset_t * @@
arch/h8300/kernel/signal.c:114:37: sparse: expected void const [noderef] __user *from
arch/h8300/kernel/signal.c:114:37: sparse: got struct sigset_t *
arch/h8300/kernel/signal.c:122:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sigaltstack const [noderef] [usertype] __user * @@ got struct sigaltstack * @@
arch/h8300/kernel/signal.c:122:31: sparse: expected struct sigaltstack const [noderef] [usertype] __user *
arch/h8300/kernel/signal.c:122:31: sparse: got struct sigaltstack *
arch/h8300/kernel/signal.c:105:16: sparse: sparse: symbol 'sys_rt_sigreturn' was not declared. Should it be static?
arch/h8300/kernel/signal.c:165:15: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct rt_sigframe *frame @@ got void [noderef] __user * @@
arch/h8300/kernel/signal.c:165:15: sparse: expected struct rt_sigframe *frame
arch/h8300/kernel/signal.c:165:15: sparse: got void [noderef] __user *
arch/h8300/kernel/signal.c:167:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got struct rt_sigframe *frame @@
arch/h8300/kernel/signal.c:167:14: sparse: expected void const [noderef] __user *ptr
arch/h8300/kernel/signal.c:167:14: sparse: got struct rt_sigframe *frame
arch/h8300/kernel/signal.c:171:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct siginfo [noderef] [usertype] __user *to @@ got struct siginfo * @@
arch/h8300/kernel/signal.c:171:46: sparse: expected struct siginfo [noderef] [usertype] __user *to
arch/h8300/kernel/signal.c:171:46: sparse: got struct siginfo *
arch/h8300/kernel/signal.c:174:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long * @@
arch/h8300/kernel/signal.c:174:16: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:174:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:174:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned long * @@
arch/h8300/kernel/signal.c:174:16: sparse: expected void [noderef] __user *to
arch/h8300/kernel/signal.c:174:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:175:16: sparse: sparse: Using plain integer as NULL pointer
arch/h8300/kernel/signal.c:175:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got struct ucontext ** @@
arch/h8300/kernel/signal.c:175:16: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:175:16: sparse: got struct ucontext **
arch/h8300/kernel/signal.c:175:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *to @@ got struct ucontext ** @@
arch/h8300/kernel/signal.c:175:16: sparse: expected void [noderef] __user *to
arch/h8300/kernel/signal.c:175:16: sparse: got struct ucontext **
arch/h8300/kernel/signal.c:176:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sigaltstack [noderef] [usertype] __user * @@ got struct sigaltstack * @@
arch/h8300/kernel/signal.c:176:33: sparse: expected struct sigaltstack [noderef] [usertype] __user *
arch/h8300/kernel/signal.c:176:33: sparse: got struct sigaltstack *
arch/h8300/kernel/signal.c:177:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sigcontext [noderef] __user *sc @@ got struct sigcontext * @@
arch/h8300/kernel/signal.c:177:34: sparse: expected struct sigcontext [noderef] __user *sc
arch/h8300/kernel/signal.c:177:34: sparse: got struct sigcontext *
arch/h8300/kernel/signal.c:178:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got struct sigset_t * @@
arch/h8300/kernel/signal.c:178:30: sparse: expected void [noderef] __user *to
arch/h8300/kernel/signal.c:178:30: sparse: got struct sigset_t *
arch/h8300/kernel/signal.c:185:24: sparse: sparse: cast removes address space '__user' of expression
arch/h8300/kernel/signal.c:188:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long * @@
arch/h8300/kernel/signal.c:188:24: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:188:24: sparse: got unsigned long *
arch/h8300/kernel/signal.c:188:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned long * @@
arch/h8300/kernel/signal.c:188:24: sparse: expected void [noderef] __user *to
arch/h8300/kernel/signal.c:188:24: sparse: got unsigned long *
arch/h8300/kernel/signal.c:190:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short * @@
arch/h8300/kernel/signal.c:190:24: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:190:24: sparse: got unsigned short *
arch/h8300/kernel/signal.c:190:24: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *to @@ got unsigned short * @@
arch/h8300/kernel/signal.c:190:24: sparse: expected void [noderef] __user *to
arch/h8300/kernel/signal.c:190:24: sparse: got unsigned short *
arch/h8300/kernel/signal.c:193:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got char ** @@
arch/h8300/kernel/signal.c:193:16: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:193:16: sparse: got char **
arch/h8300/kernel/signal.c:193:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *to @@ got char ** @@
arch/h8300/kernel/signal.c:193:16: sparse: expected void [noderef] __user *to
arch/h8300/kernel/signal.c:193:16: sparse: got char **
arch/h8300/kernel/signal.c:86:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned long * @@
arch/h8300/kernel/signal.c:86:9: sparse: expected void const [noderef] __user *__p
arch/h8300/kernel/signal.c:86:9: sparse: got unsigned long *
arch/h8300/kernel/signal.c:87:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned long * @@
arch/h8300/kernel/signal.c:87:9: sparse: expected void const [noderef] __user *__p
arch/h8300/kernel/signal.c:87:9: sparse: got unsigned long *
arch/h8300/kernel/signal.c:88:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned long * @@
arch/h8300/kernel/signal.c:88:9: sparse: expected void const [noderef] __user *__p
arch/h8300/kernel/signal.c:88:9: sparse: got unsigned long *
arch/h8300/kernel/signal.c:89:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned long * @@
arch/h8300/kernel/signal.c:89:9: sparse: expected void const [noderef] __user *__p
arch/h8300/kernel/signal.c:89:9: sparse: got unsigned long *
arch/h8300/kernel/signal.c:90:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned long * @@
arch/h8300/kernel/signal.c:90:9: sparse: expected void const [noderef] __user *__p
arch/h8300/kernel/signal.c:90:9: sparse: got unsigned long *
arch/h8300/kernel/signal.c:92:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __user *__p @@ got unsigned short * @@
arch/h8300/kernel/signal.c:92:9: sparse: expected void const [noderef] __user *__p
arch/h8300/kernel/signal.c:92:9: sparse: got unsigned short *
arch/h8300/kernel/signal.c:97:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long * @@
arch/h8300/kernel/signal.c:97:16: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:97:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:97:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long * @@
arch/h8300/kernel/signal.c:97:16: sparse: expected void const [noderef] __user *from
arch/h8300/kernel/signal.c:97:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:97:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long * @@
arch/h8300/kernel/signal.c:97:16: sparse: expected void const [noderef] __user *from
arch/h8300/kernel/signal.c:97:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:97:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long * @@
arch/h8300/kernel/signal.c:97:16: sparse: expected void const [noderef] __user *from
arch/h8300/kernel/signal.c:97:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:97:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long * @@
arch/h8300/kernel/signal.c:97:16: sparse: expected void const [noderef] __user *from
arch/h8300/kernel/signal.c:97:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:100:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long * @@
arch/h8300/kernel/signal.c:100:16: sparse: expected void const volatile [noderef] __user *ptr
arch/h8300/kernel/signal.c:100:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:100:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long * @@
arch/h8300/kernel/signal.c:100:16: sparse: expected void const [noderef] __user *from
arch/h8300/kernel/signal.c:100:16: sparse: got unsigned long *
arch/h8300/kernel/signal.c:100:16: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long * @@
vim +112 arch/h8300/kernel/signal.c
883251dd163c55 Yoshinori Sato 2015-05-11 104
883251dd163c55 Yoshinori Sato 2015-05-11 105 asmlinkage int sys_rt_sigreturn(void)
883251dd163c55 Yoshinori Sato 2015-05-11 106 {
883251dd163c55 Yoshinori Sato 2015-05-11 107 unsigned long usp = rdusp();
883251dd163c55 Yoshinori Sato 2015-05-11 108 struct rt_sigframe *frame = (struct rt_sigframe *)(usp - 4);
883251dd163c55 Yoshinori Sato 2015-05-11 109 sigset_t set;
883251dd163c55 Yoshinori Sato 2015-05-11 110 int er0;
883251dd163c55 Yoshinori Sato 2015-05-11 111
96d4f267e40f95 Linus Torvalds 2019-01-03 @112 if (!access_ok(frame, sizeof(*frame)))
883251dd163c55 Yoshinori Sato 2015-05-11 113 goto badframe;
883251dd163c55 Yoshinori Sato 2015-05-11 114 if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
883251dd163c55 Yoshinori Sato 2015-05-11 115 goto badframe;
883251dd163c55 Yoshinori Sato 2015-05-11 116
883251dd163c55 Yoshinori Sato 2015-05-11 117 set_current_blocked(&set);
883251dd163c55 Yoshinori Sato 2015-05-11 118
883251dd163c55 Yoshinori Sato 2015-05-11 119 if (restore_sigcontext(&frame->uc.uc_mcontext, &er0))
883251dd163c55 Yoshinori Sato 2015-05-11 120 goto badframe;
883251dd163c55 Yoshinori Sato 2015-05-11 121
883251dd163c55 Yoshinori Sato 2015-05-11 122 if (restore_altstack(&frame->uc.uc_stack))
883251dd163c55 Yoshinori Sato 2015-05-11 123 goto badframe;
883251dd163c55 Yoshinori Sato 2015-05-11 124
883251dd163c55 Yoshinori Sato 2015-05-11 125 return er0;
883251dd163c55 Yoshinori Sato 2015-05-11 126
883251dd163c55 Yoshinori Sato 2015-05-11 127 badframe:
3cf5d076fb4d48 Eric W. Biederman 2019-05-23 128 force_sig(SIGSEGV);
883251dd163c55 Yoshinori Sato 2015-05-11 129 return 0;
883251dd163c55 Yoshinori Sato 2015-05-11 130 }
883251dd163c55 Yoshinori Sato 2015-05-11 131
:::::: The code at line 112 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
https://01.org/lkp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-28 12:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-28 12:00 arch/h8300/kernel/signal.c:112:14: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox