public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Atish Patra <atish.patra@wdc.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	Atish Patra <Atish.Patra@wdc.com>,
	linux-kernel@vger.kernel.org
Subject: [atishp04:sbi_pmu_v3 10/17] kernel/events/core.c:9905:11: error: incompatible pointer types assigning to 'bpf_user_pt_regs_t *' (aka 'struct user_regs_struct *') from 'struct pt_regs *'
Date: Sat, 28 Aug 2021 19:13:26 +0800	[thread overview]
Message-ID: <202108281914.HnAstaar-lkp@intel.com> (raw)

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

tree:   https://github.com/atishp04/linux sbi_pmu_v3
head:   46a46e7fc0526fc679e7dee8a17153b1c26cf1f5
commit: b0cdf4b96d9aca44661e92e56904f32e48303e6c [10/17] RISC-V: Remove the current perf implementation
config: riscv-randconfig-r005-20210827 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 4e1a164d7bd53653f79decc121afe784d2fde0a7)
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 riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://github.com/atishp04/linux/commit/b0cdf4b96d9aca44661e92e56904f32e48303e6c
        git remote add atishp04 https://github.com/atishp04/linux
        git fetch --no-tags atishp04 sbi_pmu_v3
        git checkout b0cdf4b96d9aca44661e92e56904f32e48303e6c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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 >>):

   kernel/events/core.c:6670:6: warning: no previous prototype for function 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
   long perf_pmu_snapshot_aux(struct perf_buffer *rb,
        ^
   kernel/events/core.c:6670:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   long perf_pmu_snapshot_aux(struct perf_buffer *rb,
   ^
   static 
>> kernel/events/core.c:9905:11: error: incompatible pointer types assigning to 'bpf_user_pt_regs_t *' (aka 'struct user_regs_struct *') from 'struct pt_regs *' [-Werror,-Wincompatible-pointer-types]
           ctx.regs = perf_arch_bpf_user_pt_regs(regs);
                    ^                            ~~~~
   1 warning and 1 error generated.


vim +9905 kernel/events/core.c

6fb2915df7f074 kernel/perf_event.c  Li Zefan           2009-10-15  9893  
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9894  #ifdef CONFIG_BPF_SYSCALL
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9895  static void bpf_overflow_handler(struct perf_event *event,
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9896  				 struct perf_sample_data *data,
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9897  				 struct pt_regs *regs)
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9898  {
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9899  	struct bpf_perf_event_data_kern ctx = {
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9900  		.data = data,
7d9285e82db5de kernel/events/core.c Yonghong Song      2017-10-05  9901  		.event = event,
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9902  	};
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9903  	int ret = 0;
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9904  
c895f6f703ad7d kernel/events/core.c Hendrik Brueckner  2017-12-04 @9905  	ctx.regs = perf_arch_bpf_user_pt_regs(regs);
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9906  	if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1))
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9907  		goto out;
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9908  	rcu_read_lock();
88575199cc65de kernel/events/core.c Daniel Borkmann    2016-11-26  9909  	ret = BPF_PROG_RUN(event->prog, &ctx);
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9910  	rcu_read_unlock();
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9911  out:
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9912  	__this_cpu_dec(bpf_prog_active);
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9913  	if (!ret)
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9914  		return;
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9915  
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9916  	event->orig_overflow_handler(event, data, regs);
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9917  }
aa6a5f3cb2b2ed kernel/events/core.c Alexei Starovoitov 2016-09-01  9918  

:::::: The code at line 9905 was first introduced by commit
:::::: c895f6f703ad7dd2f99e751d9884b0aa5d0eea25 bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type

:::::: TO: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
:::::: CC: Daniel Borkmann <daniel@iogearbox.net>

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

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

                 reply	other threads:[~2021-08-28 11:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202108281914.HnAstaar-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=atish.patra@wdc.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    /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