From: kernel test robot <lkp@intel.com>
To: Gabriele Monaco <gmonaco@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Nam Cao <namcao@linutronix.de>,
Juri Lelli <juri.lelli@redhat.com>
Subject: kernel/trace/rv/monitors/deadline/deadline.h:115:46: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Tue, 19 May 2026 11:15:24 +0800 [thread overview]
Message-ID: <202605191116.acPXYOW4-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4d3a2a466b8d68d852a1f3bbf11204b718428dc4
commit: b133207deb72609ad4da40c4d50128a5e150677b rv: Add nomiss deadline monitor
date: 7 weeks ago
config: loongarch-randconfig-r111-20260519 (https://download.01.org/0day-ci/archive/20260519/202605191116.acPXYOW4-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260519/202605191116.acPXYOW4-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: b133207deb72 ("rv: Add nomiss deadline monitor")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605191116.acPXYOW4-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
kernel/trace/rv/monitors/nomiss/nomiss.c: note: in included file:
>> kernel/trace/rv/monitors/deadline/deadline.h:115:46: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dst @@ got struct sched_attr [noderef] __user * @@
kernel/trace/rv/monitors/deadline/deadline.h:115:46: sparse: expected void *dst
kernel/trace/rv/monitors/deadline/deadline.h:115:46: sparse: got struct sched_attr [noderef] __user *
>> kernel/trace/rv/monitors/deadline/deadline.h:118:21: sparse: sparse: dereference of noderef expression
kernel/trace/rv/monitors/deadline/deadline.h:120:30: sparse: sparse: dereference of noderef expression
vim +115 kernel/trace/rv/monitors/deadline/deadline.h
94
95 static inline int extract_params(struct pt_regs *regs, long id, pid_t *pid_out)
96 {
97 size_t size = offsetofend(struct sched_attr, sched_flags);
98 struct sched_attr __user *uattr, attr;
99 int new_policy = -1, ret;
100 unsigned long args[6];
101
102 switch (id) {
103 case __NR_sched_setscheduler:
104 syscall_get_arguments(current, regs, args);
105 *pid_out = args[0];
106 new_policy = args[1];
107 break;
108 case __NR_sched_setattr:
109 syscall_get_arguments(current, regs, args);
110 *pid_out = args[0];
111 uattr = (struct sched_attr __user *)args[1];
112 /*
113 * Just copy up to sched_flags, we are not interested after that
114 */
> 115 ret = copy_struct_from_user(&attr, size, uattr, size);
116 if (ret)
117 return ret;
> 118 if (attr.sched_flags & SCHED_FLAG_KEEP_POLICY)
119 return -EINVAL;
120 new_policy = attr.sched_policy;
121 break;
122 default:
123 return -EINVAL;
124 }
125
126 return new_policy & ~SCHED_RESET_ON_FORK;
127 }
128
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-05-19 3:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 3:15 kernel test robot [this message]
2026-05-19 5:27 ` Nam Cao
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=202605191116.acPXYOW4-lkp@intel.com \
--to=lkp@intel.com \
--cc=gmonaco@redhat.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namcao@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®