lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 4 Dec 2021 16:58:15 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     David Hildenbrand <david@...hat.com>
Cc:     kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: Re: 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 ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ