* arch/loongarch/kernel/stacktrace.c:47:25: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2023-07-01 10:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-01 10:58 UTC (permalink / raw)
To: Qing Zhang; +Cc: oe-kbuild-all, linux-kernel, Huacai Chen
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a507db1d8fdc39802415e4d2ef6d1aecd67927fa
commit: 4d7bf939df08218e682f7a42952eee3bad4dceb7 LoongArch: Add USER_STACKTRACE support
date: 11 months ago
config: loongarch-randconfig-r073-20230627 (https://download.01.org/0day-ci/archive/20230701/202307011821.uIMwFiL1-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230701/202307011821.uIMwFiL1-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307011821.uIMwFiL1-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kernel/stacktrace.c:47:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned long [noderef] __user *user_frame_tail @@ got unsigned long * @@
arch/loongarch/kernel/stacktrace.c:47:25: sparse: expected unsigned long [noderef] __user *user_frame_tail
arch/loongarch/kernel/stacktrace.c:47:25: sparse: got unsigned long *
vim +47 arch/loongarch/kernel/stacktrace.c
39
40 static int
41 copy_stack_frame(unsigned long fp, struct stack_frame *frame)
42 {
43 int ret = 1;
44 unsigned long err;
45 unsigned long __user *user_frame_tail;
46
> 47 user_frame_tail = (unsigned long *)(fp - sizeof(struct stack_frame));
48 if (!access_ok(user_frame_tail, sizeof(*frame)))
49 return 0;
50
51 pagefault_disable();
52 err = (__copy_from_user_inatomic(frame, user_frame_tail, sizeof(*frame)));
53 if (err || (unsigned long)user_frame_tail >= frame->fp)
54 ret = 0;
55 pagefault_enable();
56
57 return ret;
58 }
59
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-01 10:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-01 10:58 arch/loongarch/kernel/stacktrace.c:47:25: sparse: sparse: incorrect type in assignment (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