linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: David Hildenbrand <david@redhat.com>
Cc: kernel test robot <lkp@intel.com>,
	kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: fs/proc/vmcore.c:161:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sat, 4 Dec 2021 16:58:15 +0000	[thread overview]
Message-ID: <YaueJxgSJ9R4oOWf@casper.infradead.org> (raw)
In-Reply-To: <5166da50-e2af-139b-9f7f-a1bcabe10775@redhat.com>

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


  reply	other threads:[~2021-12-04 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 15:42 fs/proc/vmcore.c:161:34: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2021-11-24 16:45 ` David Hildenbrand
2021-12-04 16:58   ` Matthew Wilcox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-04 13:45 kernel test robot

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=YaueJxgSJ9R4oOWf@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).