From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [peterz-queue:x86/wip.ibt 22/42] kernel/bpf/trampoline.c:154:26: warning: passing argument 1 of 'ftrace_location' makes integer from pointer without a cast
Date: Thu, 24 Feb 2022 10:49:32 +0800 [thread overview]
Message-ID: <202202241056.xqhnicOb-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.ibt
head: 27b6438f414b6a37b60dcd90c8980397586d49db
commit: 28a2850ec958722056cb6679cf68567905223971 [22/42] x86/bpf: Add ENDBR instructions to prologue and trampoline
config: i386-randconfig-m021 (https://download.01.org/0day-ci/archive/20220224/202202241056.xqhnicOb-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=28a2850ec958722056cb6679cf68567905223971
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/wip.ibt
git checkout 28a2850ec958722056cb6679cf68567905223971
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash kernel/bpf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
kernel/bpf/trampoline.c: In function 'register_fentry':
>> kernel/bpf/trampoline.c:154:26: warning: passing argument 1 of 'ftrace_location' makes integer from pointer without a cast [-Wint-conversion]
154 | faddr = ftrace_location(ip);
| ^~
| |
| void *
In file included from kernel/bpf/trampoline.c:6:
include/linux/ftrace.h:792:59: note: expected 'long unsigned int' but argument is of type 'void *'
792 | static inline unsigned long ftrace_location(unsigned long ip)
| ~~~~~~~~~~~~~~^~
vim +/ftrace_location +154 kernel/bpf/trampoline.c
146
147 /* first time registering */
148 static int register_fentry(struct bpf_trampoline *tr, void *new_addr)
149 {
150 void *ip = tr->func.addr;
151 unsigned long faddr;
152 int ret;
153
> 154 faddr = ftrace_location(ip);
155 if (faddr)
156 tr->func.ftrace_managed = true;
157
158 if (bpf_trampoline_module_get(tr))
159 return -ENOENT;
160
161 if (tr->func.ftrace_managed)
162 ret = register_ftrace_direct((long)ip, (long)new_addr);
163 else
164 ret = bpf_arch_text_poke(ip, BPF_MOD_CALL, NULL, new_addr);
165
166 if (ret)
167 bpf_trampoline_module_put(tr);
168 return ret;
169 }
170
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2022-02-24 2:50 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=202202241056.xqhnicOb-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®