All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-common:android15-6.6-2025-07 1/1] kernel/trace/bpf_trace.c:3110:10: warning: default initialization of an object of type 'typeof ((attr->link_create.uprobe_multi.path))' (aka 'const unsigned long long') leaves the object uninitialized
@ 2026-07-08  9:04 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-08  9:04 UTC (permalink / raw)
  To: cros-kernel-buildreports; +Cc: oe-kbuild-all

Hi Jiri,

FYI, the error/warning still remains.

tree:   https://android.googlesource.com/kernel/common android15-6.6-2025-07
head:   37d6d309e99289fe4afaf756aa8d98a11d1642f3
commit: 89ae89f53d201143560f1e9ed4bfa62eee34f88e [1/1] bpf: Add multi uprobe link
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20260708/202607081745.ZXvZMKw9-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260708/202607081745.ZXvZMKw9-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 89ae89f53d20 ("bpf: Add multi uprobe link")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607081745.ZXvZMKw9-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> kernel/trace/bpf_trace.c:3110:10: warning: default initialization of an object of type 'typeof ((attr->link_create.uprobe_multi.path))' (aka 'const unsigned long long') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
    3110 |         upath = u64_to_user_ptr(attr->link_create.uprobe_multi.path);
         |                 ^
   include/linux/kernel.h:62:2: note: expanded from macro 'u64_to_user_ptr'
      62 |         typecheck(u64, (x));            \
         |         ^
   include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
      11 |         typeof(x) __dummy2; \
         |                   ^
>> kernel/trace/bpf_trace.c:3111:13: warning: default initialization of an object of type 'typeof ((attr->link_create.uprobe_multi.offsets))' (aka 'const unsigned long long') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
    3111 |         uoffsets = u64_to_user_ptr(attr->link_create.uprobe_multi.offsets);
         |                    ^
   include/linux/kernel.h:62:2: note: expanded from macro 'u64_to_user_ptr'
      62 |         typecheck(u64, (x));            \
         |         ^
   include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
      11 |         typeof(x) __dummy2; \
         |                   ^
>> kernel/trace/bpf_trace.c:3117:21: warning: default initialization of an object of type 'typeof ((attr->link_create.uprobe_multi.ref_ctr_offsets))' (aka 'const unsigned long long') leaves the object uninitialized [-Wdefault-const-init-var-unsafe]
    3117 |         uref_ctr_offsets = u64_to_user_ptr(attr->link_create.uprobe_multi.ref_ctr_offsets);
         |                            ^
   include/linux/kernel.h:62:2: note: expanded from macro 'u64_to_user_ptr'
      62 |         typecheck(u64, (x));            \
         |         ^
   include/linux/typecheck.h:11:12: note: expanded from macro 'typecheck'
      11 |         typeof(x) __dummy2; \
         |                   ^
   3 warnings generated.


vim +3110 kernel/trace/bpf_trace.c

  3080	
  3081	int bpf_uprobe_multi_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
  3082	{
  3083		struct bpf_uprobe_multi_link *link = NULL;
  3084		unsigned long __user *uref_ctr_offsets;
  3085		unsigned long *ref_ctr_offsets = NULL;
  3086		struct bpf_link_primer link_primer;
  3087		struct bpf_uprobe *uprobes = NULL;
  3088		unsigned long __user *uoffsets;
  3089		void __user *upath;
  3090		u32 flags, cnt, i;
  3091		struct path path;
  3092		char *name;
  3093		int err;
  3094	
  3095		/* no support for 32bit archs yet */
  3096		if (sizeof(u64) != sizeof(void *))
  3097			return -EOPNOTSUPP;
  3098	
  3099		if (prog->expected_attach_type != BPF_TRACE_UPROBE_MULTI)
  3100			return -EINVAL;
  3101	
  3102		flags = attr->link_create.uprobe_multi.flags;
  3103		if (flags & ~BPF_F_UPROBE_MULTI_RETURN)
  3104			return -EINVAL;
  3105	
  3106		/*
  3107		 * path, offsets and cnt are mandatory,
  3108		 * ref_ctr_offsets is optional
  3109		 */
> 3110		upath = u64_to_user_ptr(attr->link_create.uprobe_multi.path);
> 3111		uoffsets = u64_to_user_ptr(attr->link_create.uprobe_multi.offsets);
  3112		cnt = attr->link_create.uprobe_multi.cnt;
  3113	
  3114		if (!upath || !uoffsets || !cnt)
  3115			return -EINVAL;
  3116	
> 3117		uref_ctr_offsets = u64_to_user_ptr(attr->link_create.uprobe_multi.ref_ctr_offsets);

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-08  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08  9:04 [android-common:android15-6.6-2025-07 1/1] kernel/trace/bpf_trace.c:3110:10: warning: default initialization of an object of type 'typeof ((attr->link_create.uprobe_multi.path))' (aka 'const unsigned long long') leaves the object uninitialized 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.