From: kernel test robot <lkp@intel.com>
To: Puranjay Mohan <puranjay@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
puranjay12@gmail.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH bpf-next v3 1/2] bpf: implement bpf_send_signal_task() kfunc
Date: Tue, 8 Oct 2024 09:41:36 +0800 [thread overview]
Message-ID: <202410080907.DFxFxfor-lkp@intel.com> (raw)
In-Reply-To: <20241007103426.128923-2-puranjay@kernel.org>
Hi Puranjay,
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/Puranjay-Mohan/bpf-implement-bpf_send_signal_task-kfunc/20241007-183648
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20241007103426.128923-2-puranjay%40kernel.org
patch subject: [PATCH bpf-next v3 1/2] bpf: implement bpf_send_signal_task() kfunc
config: i386-randconfig-141-20241008 (https://download.01.org/0day-ci/archive/20241008/202410080907.DFxFxfor-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241008/202410080907.DFxFxfor-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/202410080907.DFxFxfor-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/trace/bpf_trace.c: In function 'bpf_send_signal_common':
>> kernel/trace/bpf_trace.c:839:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
839 | info.si_value.sival_ptr = (void *)value;
| ^
vim +839 kernel/trace/bpf_trace.c
822
823 static int bpf_send_signal_common(u32 sig, enum pid_type type, struct task_struct *tsk, u64 value)
824 {
825 struct send_signal_irq_work *work = NULL;
826 kernel_siginfo_t info;
827 bool has_siginfo = false;
828
829 if (!tsk) {
830 tsk = current;
831 } else {
832 has_siginfo = true;
833 clear_siginfo(&info);
834 info.si_signo = sig;
835 info.si_errno = 0;
836 info.si_code = SI_KERNEL;
837 info.si_pid = 0;
838 info.si_uid = 0;
> 839 info.si_value.sival_ptr = (void *)value;
840 }
841
842 /* Similar to bpf_probe_write_user, task needs to be
843 * in a sound condition and kernel memory access be
844 * permitted in order to send signal to the current
845 * task.
846 */
847 if (unlikely(tsk->flags & (PF_KTHREAD | PF_EXITING)))
848 return -EPERM;
849 if (unlikely(!nmi_uaccess_okay()))
850 return -EPERM;
851 /* Task should not be pid=1 to avoid kernel panic. */
852 if (unlikely(is_global_init(tsk)))
853 return -EPERM;
854
855 if (irqs_disabled()) {
856 /* Do an early check on signal validity. Otherwise,
857 * the error is lost in deferred irq_work.
858 */
859 if (unlikely(!valid_signal(sig)))
860 return -EINVAL;
861
862 work = this_cpu_ptr(&send_signal_work);
863 if (irq_work_is_busy(&work->irq_work))
864 return -EBUSY;
865
866 /* Add the current task, which is the target of sending signal,
867 * to the irq_work. The current task may change when queued
868 * irq works get executed.
869 */
870 work->task = get_task_struct(tsk);
871 work->has_siginfo = has_siginfo;
872 work->info = info;
873 work->sig = sig;
874 work->type = type;
875 irq_work_queue(&work->irq_work);
876 return 0;
877 }
878
879 if (has_siginfo)
880 return group_send_sig_info(sig, &info, tsk, type);
881
882 return group_send_sig_info(sig, SEND_SIG_PRIV, tsk, type);
883 }
884
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-10-08 1:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 10:34 [PATCH bpf-next v3 0/2] Implement mechanism to signal other threads Puranjay Mohan
2024-10-07 10:34 ` [PATCH bpf-next v3 1/2] bpf: implement bpf_send_signal_task() kfunc Puranjay Mohan
2024-10-08 1:41 ` kernel test robot [this message]
2024-10-08 4:24 ` Andrii Nakryiko
2024-10-08 10:17 ` Puranjay Mohan
2024-10-08 18:38 ` Andrii Nakryiko
2024-10-08 6:18 ` kernel test robot
2024-10-07 10:34 ` [PATCH bpf-next v3 2/2] selftests/bpf: Augment send_signal test with remote signaling Puranjay Mohan
2024-10-07 12:11 ` Puranjay Mohan
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=202410080907.DFxFxfor-lkp@intel.com \
--to=lkp@intel.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=puranjay12@gmail.com \
--cc=puranjay@kernel.org \
--cc=song@kernel.org \
--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