All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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
Date: Wed, 08 Jul 2026 17:04:34 +0800	[thread overview]
Message-ID: <202607081745.ZXvZMKw9-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-07-08  9:05 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=202607081745.ZXvZMKw9-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@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 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.