All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: kbuild-all@lists.01.org, cluster-devel@redhat.com,
	linux-kernel@vger.kernel.org
Subject: [gfs2:for-next.holder_stealing2 5/13] mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes):
Date: Wed, 4 Aug 2021 09:52:35 +0800	[thread overview]
Message-ID: <202108040927.Yr49JjO1-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3864 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.holder_stealing2
head:   6af2ffaed52783f15505255e62c43d2083a4a3a2
commit: 14d6ca0628042b7be9c06df73fef131d3a98473a [5/13] iov_iter: Introduce fault_in_iov_iter_writeable
config: arc-randconfig-s032-20210803 (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=14d6ca0628042b7be9c06df73fef131d3a98473a
        git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
        git fetch --no-tags gfs2 for-next.holder_stealing2
        git checkout 14d6ca0628042b7be9c06df73fef131d3a98473a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> mm/gup.c:1753:24: sparse:    unsigned long *
>> mm/gup.c:1753:24: sparse:    unsigned int *

vim +1753 mm/gup.c

  1696	
  1697	/**
  1698	 * fault_in_safe_writeable - fault in an address range for writing
  1699	 * @uaddr: start of address range
  1700	 * @size: length of address range
  1701	 *
  1702	 * Faults in an address range using get_user_pages, i.e., without triggering
  1703	 * hardware page faults.  This is primarily useful when we know that some or
  1704	 * all of the pages in the address range aren't in memory.
  1705	 *
  1706	 * Other than fault_in_writeable(), this function is non-destructive.
  1707	 *
  1708	 * Note that we don't pin or otherwise hold the pages referenced that we fault
  1709	 * in.  There's no guarantee that they'll stay in memory for any duration of
  1710	 * time.
  1711	 *
  1712	 * Returns the number of bytes faulted in from @uaddr.
  1713	 */
  1714	size_t fault_in_safe_writeable(const char __user *uaddr, size_t size)
  1715	{
  1716		unsigned long start = (unsigned long)uaddr;
  1717		unsigned long end, nstart, nend;
  1718		struct mm_struct *mm = current->mm;
  1719		struct vm_area_struct *vma = NULL;
  1720		int locked = 0;
  1721	
  1722		/* FIXME: Protect against overflow! */
  1723	
  1724		end = PAGE_ALIGN(start + size);
  1725		for (nstart = start & PAGE_MASK; nstart < end; nstart = nend) {
  1726			unsigned long nr_pages;
  1727			long ret;
  1728	
  1729			if (!locked) {
  1730				locked = 1;
  1731				mmap_read_lock(mm);
  1732				vma = find_vma(mm, nstart);
  1733			} else if (nstart >= vma->vm_end)
  1734				vma = vma->vm_next;
  1735			if (!vma || vma->vm_start >= end)
  1736				break;
  1737			nend = min(end, vma->vm_end);
  1738			if (vma->vm_flags & (VM_IO | VM_PFNMAP))
  1739				continue;
  1740			if (nstart < vma->vm_start)
  1741				nstart = vma->vm_start;
  1742			nr_pages = (nend - nstart) / PAGE_SIZE;
  1743			ret = __get_user_pages_locked(mm, nstart, nr_pages,
  1744						      NULL, NULL, &locked,
  1745						      FOLL_TOUCH | FOLL_WRITE);
  1746			if (ret <= 0)
  1747				break;
  1748			nend = nstart + ret * PAGE_SIZE;
  1749		}
  1750		if (locked)
  1751			mmap_read_unlock(mm);
  1752		if (nstart > start)
> 1753			return min(nstart - start, size);
  1754		return 0;
  1755	}
  1756	EXPORT_SYMBOL(fault_in_safe_writeable);
  1757	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31180 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [gfs2:for-next.holder_stealing2 5/13] mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes):
Date: Wed, 04 Aug 2021 09:52:35 +0800	[thread overview]
Message-ID: <202108040927.Yr49JjO1-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3960 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.holder_stealing2
head:   6af2ffaed52783f15505255e62c43d2083a4a3a2
commit: 14d6ca0628042b7be9c06df73fef131d3a98473a [5/13] iov_iter: Introduce fault_in_iov_iter_writeable
config: arc-randconfig-s032-20210803 (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=14d6ca0628042b7be9c06df73fef131d3a98473a
        git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
        git fetch --no-tags gfs2 for-next.holder_stealing2
        git checkout 14d6ca0628042b7be9c06df73fef131d3a98473a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> mm/gup.c:1753:24: sparse:    unsigned long *
>> mm/gup.c:1753:24: sparse:    unsigned int *

vim +1753 mm/gup.c

  1696	
  1697	/**
  1698	 * fault_in_safe_writeable - fault in an address range for writing
  1699	 * @uaddr: start of address range
  1700	 * @size: length of address range
  1701	 *
  1702	 * Faults in an address range using get_user_pages, i.e., without triggering
  1703	 * hardware page faults.  This is primarily useful when we know that some or
  1704	 * all of the pages in the address range aren't in memory.
  1705	 *
  1706	 * Other than fault_in_writeable(), this function is non-destructive.
  1707	 *
  1708	 * Note that we don't pin or otherwise hold the pages referenced that we fault
  1709	 * in.  There's no guarantee that they'll stay in memory for any duration of
  1710	 * time.
  1711	 *
  1712	 * Returns the number of bytes faulted in from @uaddr.
  1713	 */
  1714	size_t fault_in_safe_writeable(const char __user *uaddr, size_t size)
  1715	{
  1716		unsigned long start = (unsigned long)uaddr;
  1717		unsigned long end, nstart, nend;
  1718		struct mm_struct *mm = current->mm;
  1719		struct vm_area_struct *vma = NULL;
  1720		int locked = 0;
  1721	
  1722		/* FIXME: Protect against overflow! */
  1723	
  1724		end = PAGE_ALIGN(start + size);
  1725		for (nstart = start & PAGE_MASK; nstart < end; nstart = nend) {
  1726			unsigned long nr_pages;
  1727			long ret;
  1728	
  1729			if (!locked) {
  1730				locked = 1;
  1731				mmap_read_lock(mm);
  1732				vma = find_vma(mm, nstart);
  1733			} else if (nstart >= vma->vm_end)
  1734				vma = vma->vm_next;
  1735			if (!vma || vma->vm_start >= end)
  1736				break;
  1737			nend = min(end, vma->vm_end);
  1738			if (vma->vm_flags & (VM_IO | VM_PFNMAP))
  1739				continue;
  1740			if (nstart < vma->vm_start)
  1741				nstart = vma->vm_start;
  1742			nr_pages = (nend - nstart) / PAGE_SIZE;
  1743			ret = __get_user_pages_locked(mm, nstart, nr_pages,
  1744						      NULL, NULL, &locked,
  1745						      FOLL_TOUCH | FOLL_WRITE);
  1746			if (ret <= 0)
  1747				break;
  1748			nend = nstart + ret * PAGE_SIZE;
  1749		}
  1750		if (locked)
  1751			mmap_read_unlock(mm);
  1752		if (nstart > start)
> 1753			return min(nstart - start, size);
  1754		return 0;
  1755	}
  1756	EXPORT_SYMBOL(fault_in_safe_writeable);
  1757	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31180 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2:for-next.holder_stealing2 5/13] mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes):
Date: Wed, 4 Aug 2021 09:52:35 +0800	[thread overview]
Message-ID: <202108040927.Yr49JjO1-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.holder_stealing2
head:   6af2ffaed52783f15505255e62c43d2083a4a3a2
commit: 14d6ca0628042b7be9c06df73fef131d3a98473a [5/13] iov_iter: Introduce fault_in_iov_iter_writeable
config: arc-randconfig-s032-20210803 (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=14d6ca0628042b7be9c06df73fef131d3a98473a
        git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
        git fetch --no-tags gfs2 for-next.holder_stealing2
        git checkout 14d6ca0628042b7be9c06df73fef131d3a98473a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes):
>> mm/gup.c:1753:24: sparse:    unsigned long *
>> mm/gup.c:1753:24: sparse:    unsigned int *

vim +1753 mm/gup.c

  1696	
  1697	/**
  1698	 * fault_in_safe_writeable - fault in an address range for writing
  1699	 * @uaddr: start of address range
  1700	 * @size: length of address range
  1701	 *
  1702	 * Faults in an address range using get_user_pages, i.e., without triggering
  1703	 * hardware page faults.  This is primarily useful when we know that some or
  1704	 * all of the pages in the address range aren't in memory.
  1705	 *
  1706	 * Other than fault_in_writeable(), this function is non-destructive.
  1707	 *
  1708	 * Note that we don't pin or otherwise hold the pages referenced that we fault
  1709	 * in.  There's no guarantee that they'll stay in memory for any duration of
  1710	 * time.
  1711	 *
  1712	 * Returns the number of bytes faulted in from @uaddr.
  1713	 */
  1714	size_t fault_in_safe_writeable(const char __user *uaddr, size_t size)
  1715	{
  1716		unsigned long start = (unsigned long)uaddr;
  1717		unsigned long end, nstart, nend;
  1718		struct mm_struct *mm = current->mm;
  1719		struct vm_area_struct *vma = NULL;
  1720		int locked = 0;
  1721	
  1722		/* FIXME: Protect against overflow! */
  1723	
  1724		end = PAGE_ALIGN(start + size);
  1725		for (nstart = start & PAGE_MASK; nstart < end; nstart = nend) {
  1726			unsigned long nr_pages;
  1727			long ret;
  1728	
  1729			if (!locked) {
  1730				locked = 1;
  1731				mmap_read_lock(mm);
  1732				vma = find_vma(mm, nstart);
  1733			} else if (nstart >= vma->vm_end)
  1734				vma = vma->vm_next;
  1735			if (!vma || vma->vm_start >= end)
  1736				break;
  1737			nend = min(end, vma->vm_end);
  1738			if (vma->vm_flags & (VM_IO | VM_PFNMAP))
  1739				continue;
  1740			if (nstart < vma->vm_start)
  1741				nstart = vma->vm_start;
  1742			nr_pages = (nend - nstart) / PAGE_SIZE;
  1743			ret = __get_user_pages_locked(mm, nstart, nr_pages,
  1744						      NULL, NULL, &locked,
  1745						      FOLL_TOUCH | FOLL_WRITE);
  1746			if (ret <= 0)
  1747				break;
  1748			nend = nstart + ret * PAGE_SIZE;
  1749		}
  1750		if (locked)
  1751			mmap_read_unlock(mm);
  1752		if (nstart > start)
> 1753			return min(nstart - start, size);
  1754		return 0;
  1755	}
  1756	EXPORT_SYMBOL(fault_in_safe_writeable);
  1757	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all at lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 31180 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20210804/cc060065/attachment.gz>

             reply	other threads:[~2021-08-04  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  1:52 kernel test robot [this message]
2021-08-04  1:52 ` [Cluster-devel] [gfs2:for-next.holder_stealing2 5/13] mm/gup.c:1753:24: sparse: sparse: incompatible types in comparison expression (different type sizes): kernel test robot
2021-08-04  1:52 ` 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=202108040927.Yr49JjO1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agruenba@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.