Linux Trace Kernel
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Leon Hwang <leon.hwang@linux.dev>, bpf@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Kumar Kartikeya Dwivedi <memxor@gmail.com>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	Jiri Olsa <jolsa@kernel.org>,
	Emil Tsalapatis <emil@etsalapatis.com>,
	Ihor Solodrai <ihor.solodrai@linux.dev>,
	Quentin Monnet <qmo@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Leon Hwang <leon.hwang@linux.dev>,
	Mykyta Yatsenko <yatsenko@meta.com>,
	Avinash Duduskar <avinash.duduskar@gmail.com>,
	Anton Protopopov <a.s.protopopov@gmail.com>,
	Amery Hung <ameryhung@gmail.com>, Jordan Rife <jordan@jrife.io>,
	Rong Tao <rongtao@cestc.cn>, Eyal Birger <eyal.birger@gmail.com>,
	Pu Lehui <pulehui@huawei.com>,
	Jingguo Tan <tanjingguo@huawei.com>, Lin Ma <malin89@huawei.com>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next v2 14/21] bpf: Add tracing_multi link info support for bpf progs
Date: Thu, 15 Oct 2026 08:24:03 +0800	[thread overview]
Message-ID: <202610151004.s3b0Ih11-lkp@intel.com> (raw)
In-Reply-To: <20261012154024.29423-15-leon.hwang@linux.dev>

Hi Leon,

kernel test robot noticed the following build warnings:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Leon-Hwang/bpf-Initialize-ftrace_managed-in-bpf_trampoline_get/20261012-234003
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20261012154024.29423-15-leon.hwang%40linux.dev
patch subject: [PATCH bpf-next v2 14/21] bpf: Add tracing_multi link info support for bpf progs
config: i386-randconfig-1011-20261013 (https://download.01.org/0day-ci/archive/20261015/202610151004.s3b0Ih11-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261015/202610151004.s3b0Ih11-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
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610151004.s3b0Ih11-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/trace/bpf_trace.c: In function 'bpf_tracing_multi_link_fill_link_info':
>> kernel/trace/bpf_trace.c:3755:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    3755 |                         addr = (u64) mnode->trampoline->func.addr;
         |                                ^


vim +3755 kernel/trace/bpf_trace.c

  3708	
  3709	static int bpf_tracing_multi_link_fill_link_info(const struct bpf_link *link,
  3710							 struct bpf_link_info *info)
  3711	{
  3712		u32 __user *fids = u64_to_user_ptr(info->tracing_multi.func_btf_ids);
  3713		u64 __user *ucookies = u64_to_user_ptr(info->tracing_multi.cookies);
  3714		u64 __user *uaddrs = u64_to_user_ptr(info->tracing_multi.addrs);
  3715		u32 __user *uids = u64_to_user_ptr(info->tracing_multi.ids);
  3716		struct bpf_tracing_multi_link *tr_link;
  3717		u32 ucount = info->tracing_multi.count;
  3718		bool has_cookies, show_addrs, has_progs;
  3719		int err = 0;
  3720	
  3721		if ((uids || ucookies || uaddrs || fids) && !ucount)
  3722			return -EINVAL;
  3723	
  3724		tr_link = container_of(link, struct bpf_tracing_multi_link, link);
  3725	
  3726		info->tracing_multi.attach_type = tr_link->link.attach_type;
  3727		info->tracing_multi.count = tr_link->nodes_cnt;
  3728		info->tracing_multi.btf_obj_id = btf_obj_id(tr_link->link.prog->aux->attach_btf);
  3729		has_progs = !!tr_link->tgt_progs;
  3730		info->tracing_multi.flags = has_progs ? BPF_F_TRACING_MULTI_TGT_PROGS : 0;
  3731	
  3732		if (!uids && !ucookies && !uaddrs && !fids)
  3733			return 0;
  3734		if (has_progs != !!fids)
  3735			return -EINVAL;
  3736	
  3737		if (ucount < tr_link->nodes_cnt)
  3738			err = -ENOSPC;
  3739		else
  3740			ucount = tr_link->nodes_cnt;
  3741	
  3742		has_cookies = !!tr_link->cookies;
  3743		show_addrs = kallsyms_show_value(current_cred());
  3744	
  3745		for (int i = 0; i < ucount; i++) {
  3746			struct bpf_tracing_multi_node *mnode = &tr_link->nodes[i];
  3747			u32 prog_id, btf_id;
  3748			u64 addr, cookie;
  3749	
  3750			bpf_trampoline_unpack_key(mnode->trampoline->key, &prog_id, &btf_id);
  3751	
  3752			if (!show_addrs)
  3753				addr = 0;
  3754			else if (has_progs)
> 3755				addr = (u64) mnode->trampoline->func.addr;
  3756			else
  3757				addr = mnode->trampoline->ip;
  3758			cookie = has_cookies ? tr_link->cookies[i] : 0;
  3759	
  3760			if (uids && put_user(has_progs ? prog_id : btf_id, uids + i))
  3761				return -EFAULT;
  3762			if (uaddrs && put_user(addr, uaddrs + i))
  3763				return -EFAULT;
  3764			if (ucookies && put_user(cookie, ucookies + i))
  3765				return -EFAULT;
  3766			if (has_progs && put_user((u32) mnode->trampoline->key, fids + i))
  3767				return -EFAULT;
  3768	
  3769			cond_resched();
  3770		}
  3771	
  3772		return err;
  3773	}
  3774	

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

  parent reply	other threads:[~2026-10-15  0:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 15:40 [PATCH bpf-next v2 00/21] bpf: Add tracing_multi link support for bpf progs Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 01/21] bpf: Initialize ftrace_managed in bpf_trampoline_get() Leon Hwang
2026-10-14 21:43   ` Jiri Olsa
2026-10-12 15:40 ` [PATCH bpf-next v2 02/21] bpf: Drop unnecessary ftrace_location() in register/unregister/modify_fentry_multi() Leon Hwang
2026-10-14 21:43   ` Jiri Olsa
2026-10-12 15:40 ` [PATCH bpf-next v2 03/21] bpf, x86: Factor out bpf_arch_text_poke_prepare_insns() helper on x86_64 Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 04/21] bpf, x86: Factor out bpf_arch_text_poke_check_ip() " Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 05/21] bpf, x86: Introduce bpf_arch_text_poke_batch() " Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 06/21] bpf: Add bpf_text_poke_batch() helper in trampoline Leon Hwang
2026-10-12 16:11   ` bot+bpf-ci
2026-10-12 15:40 ` [PATCH bpf-next v2 07/21] bpf: Check tgt_prog before is_tracing_multi_id() in verifier Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 08/21] bpf: Move helpers out of CONFIG_HAVE_SINGLE_FTRACE_DIRECT_OPS guard in trampoline Leon Hwang
2026-10-12 16:11   ` bot+bpf-ci
2026-10-12 15:40 ` [PATCH bpf-next v2 09/21] bpf: Add bpf_trampoline_multi_prog_attach/detach() Leon Hwang
2026-10-12 16:16   ` sashiko-bot
2026-10-12 16:33   ` bot+bpf-ci
2026-10-14 21:43   ` Jiri Olsa
2026-10-12 15:40 ` [PATCH bpf-next v2 10/21] bpf: Shrink CONFIG_HAVE_SINGLE_FTRACE_DIRECT_OPS guard scope for bpf_tracing_multi_attach() Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 11/21] bpf: Add tracing_multi link support for bpf progs Leon Hwang
2026-10-12 16:33   ` bot+bpf-ci
2026-10-14 21:45   ` Jiri Olsa
2026-10-12 15:40 ` [PATCH bpf-next v2 12/21] libbpf: " Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 13/21] bpf: Add tracing_multi link fdinfo " Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 14/21] bpf: Add tracing_multi link info " Leon Hwang
2026-10-12 16:33   ` bot+bpf-ci
2026-10-12 16:36   ` sashiko-bot
2026-10-14 21:43   ` Jiri Olsa
2026-10-15  0:24   ` kernel test robot [this message]
2026-10-12 15:40 ` [PATCH bpf-next v2 15/21] selftests/bpf: Add tracing_multi bpf prog attach test Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 16/21] selftests/bpf: Add tracing_multi bpf prog attach failure tests Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 17/21] selftests/bpf: Add tracing_multi bpf prog cookie test Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 18/21] selftests/bpf: Add tracing_multi bpf prog rollback test Leon Hwang
2026-10-12 16:46   ` sashiko-bot
2026-10-14 21:44   ` Jiri Olsa
2026-10-12 15:40 ` [PATCH bpf-next v2 19/21] selftests/bpf: Add tracing_multi bpf prog link info test Leon Hwang
2026-10-12 16:11   ` bot+bpf-ci
2026-10-12 16:43   ` sashiko-bot
2026-10-12 15:40 ` [PATCH bpf-next v2 20/21] selftests/bpf: Test tailcall with fentry.multi Leon Hwang
2026-10-12 15:40 ` [PATCH bpf-next v2 21/21] selftests/bpf: Benchmark tracing_multi bpf progs attachment Leon Hwang
2026-10-12 16:33   ` bot+bpf-ci
2026-10-12 16:52   ` sashiko-bot
2026-10-14 21:59 ` [PATCH bpf-next v2 00/21] bpf: Add tracing_multi link support for bpf progs Jiri Olsa
2026-10-15  1:48   ` Leon Hwang

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=202610151004.s3b0Ih11-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.s.protopopov@gmail.com \
    --cc=ameryhung@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=avinash.duduskar@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=eyal.birger@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jordan@jrife.io \
    --cc=leon.hwang@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=malin89@huawei.com \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pulehui@huawei.com \
    --cc=qmo@kernel.org \
    --cc=rongtao@cestc.cn \
    --cc=skhan@linuxfoundation.org \
    --cc=song@kernel.org \
    --cc=tanjingguo@huawei.com \
    --cc=yatsenko@meta.com \
    --cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox