[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202410081401.fYRMhL8t-lkp@intel.com>
Date: Tue, 8 Oct 2024 14:18:38 +0800
From: kernel test robot <lkp@...el.com>
To: Puranjay Mohan <puranjay@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>,
Martin KaFai Lau <martin.lau@...ux.dev>,
Eduard Zingerman <eddyz87@...il.com>, Song Liu <song@...nel.org>,
Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, bpf@...r.kernel.org,
linux-kernel@...r.kernel.org, puranjay12@...il.com
Cc: oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH bpf-next v3 1/2] bpf: implement bpf_send_signal_task()
kfunc
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: x86_64-randconfig-121-20241008 (https://download.01.org/0day-ci/archive/20241008/202410081401.fYRMhL8t-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241008/202410081401.fYRMhL8t-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410081401.fYRMhL8t-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/bpf_trace.c:839:41: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *[addressable] [assigned] [usertype] sival_ptr @@ got void * @@
kernel/trace/bpf_trace.c:839:41: sparse: expected void [noderef] __user *[addressable] [assigned] [usertype] sival_ptr
kernel/trace/bpf_trace.c:839:41: sparse: got void *
kernel/trace/bpf_trace.c: note: in included file (through include/linux/smp.h, include/linux/lockdep.h, include/linux/spinlock.h, ...):
include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
kernel/trace/bpf_trace.c: note: in included file (through include/linux/rbtree.h, include/linux/mm_types.h, include/linux/mmzone.h, ...):
include/linux/rcupdate.h:880:25: sparse: sparse: context imbalance in 'uprobe_prog_run' - unexpected unlock
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
Powered by blists - more mailing lists