From: kernel test robot <lkp@intel.com>
To: Huacai Chen <chenhuacai@loongson.cn>,
Arnd Bergmann <arnd@arndb.de>,
Huacai Chen <chenhuacai@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>
Cc: kbuild-all@lists.01.org, loongarch@lists.linux.dev,
linux-arch@vger.kernel.org, Xuefeng Li <lixuefeng@loongson.cn>,
Guo Ren <guoren@kernel.org>, Xuerui Wang <kernel@xen0n.name>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] LoongArch: Add perf events support
Date: Tue, 16 Aug 2022 16:59:37 +0800 [thread overview]
Message-ID: <202208161648.zq48ilEV-lkp@intel.com> (raw)
In-Reply-To: <20220815124702.3330803-1-chenhuacai@loongson.cn>
Hi Huacai,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.0-rc1 next-20220816]
[cannot apply to soc/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Huacai-Chen/LoongArch-Add-perf-events-support/20220815-204852
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
config: loongarch-randconfig-s051-20220815 (https://download.01.org/0day-ci/archive/20220816/202208161648.zq48ilEV-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/0e6d9490ff3f6129799675b9288135022a0908e2
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Huacai-Chen/LoongArch-Add-perf-events-support/20220815-204852
git checkout 0e6d9490ff3f6129799675b9288135022a0908e2
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=loongarch
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kernel/perf_event.c:30:50: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long [noderef] __user *user_frame_tail @@ got unsigned long * @@
arch/loongarch/kernel/perf_event.c:30:50: sparse: expected unsigned long [noderef] __user *user_frame_tail
arch/loongarch/kernel/perf_event.c:30:50: sparse: got unsigned long *
arch/loongarch/kernel/perf_event.c: note: in included file (through arch/loongarch/include/asm/cpu-info.h, arch/loongarch/include/asm/processor.h, ...):
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: undefined identifier '__builtin_loongarch_csrrd_d'
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: undefined identifier '__builtin_loongarch_csrwr_d'
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:237:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
vim +30 arch/loongarch/kernel/perf_event.c
20
21 /*
22 * Get the return address for a single stackframe and return a pointer to the
23 * next frame tail.
24 */
25 static unsigned long
26 user_backtrace(struct perf_callchain_entry_ctx *entry, unsigned long fp)
27 {
28 struct stack_frame buftail;
29 unsigned long err;
> 30 unsigned long __user *user_frame_tail = (unsigned long *)(fp - sizeof(struct stack_frame));
31
32 /* Also check accessibility of one struct frame_tail beyond */
33 if (!access_ok(user_frame_tail, sizeof(buftail)))
34 return 0;
35
36 pagefault_disable();
37 err = __copy_from_user_inatomic(&buftail, user_frame_tail, sizeof(buftail));
38 pagefault_enable();
39
40 if (err || (unsigned long)user_frame_tail >= buftail.fp)
41 return 0;
42
43 perf_callchain_store(entry, buftail.ra);
44
45 return buftail.fp;
46 }
47
--
0-DAY CI Kernel Test Service
https://01.org/lkp
prev parent reply other threads:[~2022-08-16 10:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 12:47 [PATCH] LoongArch: Add perf events support Huacai Chen
2022-08-16 5:46 ` WANG Xuerui
2022-08-16 8:18 ` Huacai Chen
2022-08-16 10:07 ` Qi Hu
2022-08-16 10:24 ` Huacai Chen
2022-08-16 8:59 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202208161648.zq48ilEV-lkp@intel.com \
--to=lkp@intel.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=guoren@kernel.org \
--cc=jiaxun.yang@flygoat.com \
--cc=jolsa@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=kernel@xen0n.name \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=loongarch@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).