[jolsa-perf:bpf/get_func_ip 4/7] kernel/trace/bpf_trace.c:969:14: warning: cast from pointer to integer of different size
From: kernel test robot
Date: Wed Jul 07 2021 - 19:49:46 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/get_func_ip
head: c84a007788ef775c5e75c1359c6a4d38664b8136
commit: 77c4369d247b285e790bd8d3d346ba5e0b5bd752 [4/7] bpf: Add bpf_get_func_ip helper for kprobe programs
config: i386-allyesconfig (attached as .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/jolsa/perf.git/commit/?id=77c4369d247b285e790bd8d3d346ba5e0b5bd752
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/get_func_ip
git checkout 77c4369d247b285e790bd8d3d346ba5e0b5bd752
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
kernel/trace/bpf_trace.c: In function '____bpf_get_func_ip_kprobe':
>> kernel/trace/bpf_trace.c:969:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
969 | return kp ? (u64) kp->addr : 0;
| ^
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PHY_SPARX5_SERDES
Depends on (ARCH_SPARX5 || COMPILE_TEST && OF && HAS_IOMEM
Selected by
- SPARX5_SWITCH && NETDEVICES && ETHERNET && NET_VENDOR_MICROCHIP && NET_SWITCHDEV && HAS_IOMEM
vim +969 kernel/trace/bpf_trace.c
964
965 BPF_CALL_1(bpf_get_func_ip_kprobe, struct pt_regs *, regs)
966 {
967 struct kprobe *kp = kprobe_running();
968
> 969 return kp ? (u64) kp->addr : 0;
970 }
971
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip