Re: fs/proc/vmcore.c:161:34: sparse: sparse: incorrect type in argument 1 (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 ...




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux