* [jolsa-perf:uprobe_multi_6 1/12] kernel/trace/bpf_trace.c:3055:12: warning: variable 'old_inode' is uninitialized when used here
@ 2023-03-14 4:16 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-14 4:16 UTC (permalink / raw)
To: Jiri Olsa; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git uprobe_multi_6
head: 3f2899fc03dd194fc538daca944ed9560d265fb3
commit: 8dd01ea9b045f53b6b8625fde50a896de89e075d [1/12] bpf: Add multi uprobe link
config: x86_64-randconfig-a014-20230313 (https://download.01.org/0day-ci/archive/20230314/202303141241.Nw4DnamW-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=8dd01ea9b045f53b6b8625fde50a896de89e075d
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf uprobe_multi_6
git checkout 8dd01ea9b045f53b6b8625fde50a896de89e075d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303141241.Nw4DnamW-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/trace/bpf_trace.c:3055:12: warning: variable 'old_inode' is uninitialized when used here [-Wuninitialized]
inode = old_inode;
^~~~~~~~~
kernel/trace/bpf_trace.c:3011:33: note: initialize the variable 'old_inode' to silence this warning
struct inode *inode, *old_inode;
^
= NULL
1 warning generated.
vim +/old_inode +3055 kernel/trace/bpf_trace.c
3003
3004 int bpf_uprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
3005 {
3006 void __user **upaths, __user *upath, __user *old_upath = NULL;
3007 unsigned long __user *uoffsets, offset;
3008 struct bpf_uprobe_multi_link *link = NULL;
3009 struct bpf_link_primer link_primer;
3010 struct bpf_uprobe *uprobes = NULL;
3011 struct inode *inode, *old_inode;
3012 u32 flags, cnt, i;
3013 int err;
3014
3015 /* no support for 32bit archs yet */
3016 if (sizeof(u64) != sizeof(void *))
3017 return -EOPNOTSUPP;
3018
3019 if (prog->expected_attach_type != BPF_TRACE_UPROBE_MULTI)
3020 return -EINVAL;
3021
3022 flags = attr->link_create.uprobe_multi.flags;
3023 if (flags & ~BPF_F_UPROBE_MULTI_RETURN)
3024 return -EINVAL;
3025
3026 upaths = u64_to_user_ptr(attr->link_create.uprobe_multi.paths);
3027 uoffsets = u64_to_user_ptr(attr->link_create.uprobe_multi.offsets);
3028 if (!!upaths != !!uoffsets)
3029 return -EINVAL;
3030
3031 cnt = attr->link_create.uprobe_multi.cnt;
3032 if (!cnt)
3033 return -EINVAL;
3034
3035 uprobes = kvcalloc(cnt, sizeof(*uprobes), GFP_KERNEL);
3036 if (!uprobes)
3037 return -ENOMEM;
3038
3039 link = kzalloc(sizeof(*link), GFP_KERNEL);
3040 if (!link) {
3041 err = -ENOMEM;
3042 goto error;
3043 }
3044
3045 for (i = 0; i < cnt; i++) {
3046 if (__get_user(offset, uoffsets + i)) {
3047 err = -EFAULT;
3048 goto error;
3049 }
3050 if (__get_user(upath, upaths + i)) {
3051 err = -EFAULT;
3052 goto error;
3053 }
3054 if (i && old_upath == upath) {
> 3055 inode = old_inode;
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-14 4:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 4:16 [jolsa-perf:uprobe_multi_6 1/12] kernel/trace/bpf_trace.c:3055:12: warning: variable 'old_inode' is uninitialized when used here kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.