lkml.org 
[lkml]   [2021]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fs/proc/vmcore.c:161:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
On Wed, Nov 24, 2021 at 05:45:45PM +0100, David Hildenbrand wrote:
> On 24.11.21 16:42, kernel test robot wrote:
> > sparse warnings: (new ones prefixed by >>)
> >>> fs/proc/vmcore.c:161:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
> > fs/proc/vmcore.c:161:34: sparse: expected void const [noderef] __user *p

> > 159 if (!userbuf)
> > 160 memset(buf, 0, nr_bytes);
> > > 161 else if (clear_user(buf, nr_bytes))
> > 162 tmp = -EFAULT;
> > 163 } else {
>
> Sparse is wrong as it doesn't see the bigger picture. "int userbuf"
> tells us what we're actually dealing with ...

Sparse is pointing to a deeper problem here. We should be using an
iov_iter throughout vmcore.c, but that's kind of a big project ...

\
 
 \ /
  Last update: 2021-12-04 17:58    [W:0.044 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site