From: kernel test robot <lkp@intel.com>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: mm/gup.c:1674:16: error: unexpected token, expected comma
Date: Thu, 20 Jan 2022 05:54:54 +0800 [thread overview]
Message-ID: <202201200528.F5X9Vnfb-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1d1df41c5a33359a00e919d54eaebfb789711fdc
commit: bb523b406c849eef8f265a07cd7f320f1f177743 gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
date: 3 months ago
config: mips-randconfig-r003-20220118 (https://download.01.org/0day-ci/archive/20220120/202201200528.F5X9Vnfb-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f782d25a742302d25ef3c8b84b54f7483c2deb9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb523b406c849eef8f265a07cd7f320f1f177743
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb523b406c849eef8f265a07cd7f320f1f177743
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> mm/gup.c:1674:16: error: unexpected token, expected comma
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
>> mm/gup.c:1674:16: error: invalid operand for instruction
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
sbe $0, 0($17)
^
mm/gup.c:1682:16: error: unexpected token, expected comma
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
mm/gup.c:1682:16: error: invalid operand for instruction
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
sbe $0, 0($2)
^
mm/gup.c:1710:16: error: unexpected token, expected comma
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
mm/gup.c:1710:16: error: invalid operand for instruction
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
lbe $3, 0($17)
^
mm/gup.c:1718:16: error: unexpected token, expected comma
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
mm/gup.c:1718:16: error: invalid operand for instruction
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
lbe $5, 0($2)
^
8 errors generated.
vim +1674 mm/gup.c
1658
1659 /**
1660 * fault_in_writeable - fault in userspace address range for writing
1661 * @uaddr: start of address range
1662 * @size: size of address range
1663 *
1664 * Returns the number of bytes not faulted in (like copy_to_user() and
1665 * copy_from_user()).
1666 */
1667 size_t fault_in_writeable(char __user *uaddr, size_t size)
1668 {
1669 char __user *start = uaddr, *end;
1670
1671 if (unlikely(size == 0))
1672 return 0;
1673 if (!PAGE_ALIGNED(uaddr)) {
> 1674 if (unlikely(__put_user(0, uaddr) != 0))
1675 return size;
1676 uaddr = (char __user *)PAGE_ALIGN((unsigned long)uaddr);
1677 }
1678 end = (char __user *)PAGE_ALIGN((unsigned long)start + size);
1679 if (unlikely(end < start))
1680 end = NULL;
1681 while (uaddr != end) {
1682 if (unlikely(__put_user(0, uaddr) != 0))
1683 goto out;
1684 uaddr += PAGE_SIZE;
1685 }
1686
1687 out:
1688 if (size > uaddr - start)
1689 return size - (uaddr - start);
1690 return 0;
1691 }
1692 EXPORT_SYMBOL(fault_in_writeable);
1693
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: mm/gup.c:1674:16: error: unexpected token, expected comma
Date: Thu, 20 Jan 2022 05:54:54 +0800 [thread overview]
Message-ID: <202201200528.F5X9Vnfb-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6544 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 1d1df41c5a33359a00e919d54eaebfb789711fdc
commit: bb523b406c849eef8f265a07cd7f320f1f177743 gup: Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable}
date: 3 months ago
config: mips-randconfig-r003-20220118 (https://download.01.org/0day-ci/archive/20220120/202201200528.F5X9Vnfb-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5f782d25a742302d25ef3c8b84b54f7483c2deb9)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb523b406c849eef8f265a07cd7f320f1f177743
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout bb523b406c849eef8f265a07cd7f320f1f177743
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> mm/gup.c:1674:16: error: unexpected token, expected comma
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
>> mm/gup.c:1674:16: error: invalid operand for instruction
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
sbe $0, 0($17)
^
mm/gup.c:1682:16: error: unexpected token, expected comma
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
mm/gup.c:1682:16: error: invalid operand for instruction
if (unlikely(__put_user(0, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:171:18: note: expanded from macro '__put_user'
__put_data_asm(user_sb, __pu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
sbe $0, 0($2)
^
mm/gup.c:1710:16: error: unexpected token, expected comma
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
mm/gup.c:1710:16: error: invalid operand for instruction
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
lbe $3, 0($17)
^
mm/gup.c:1718:16: error: unexpected token, expected comma
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:3:10: note: instantiated into assembly here
.set eva
^
mm/gup.c:1718:16: error: invalid operand for instruction
if (unlikely(__get_user(c, uaddr) != 0))
^
arch/mips/include/asm/uaccess.h:218:23: note: expanded from macro '__get_user'
__get_data_asm((x), user_lb, __gu_ptr); \
^
<inline asm>:4:10: note: instantiated into assembly here
lbe $5, 0($2)
^
8 errors generated.
vim +1674 mm/gup.c
1658
1659 /**
1660 * fault_in_writeable - fault in userspace address range for writing
1661 * @uaddr: start of address range
1662 * @size: size of address range
1663 *
1664 * Returns the number of bytes not faulted in (like copy_to_user() and
1665 * copy_from_user()).
1666 */
1667 size_t fault_in_writeable(char __user *uaddr, size_t size)
1668 {
1669 char __user *start = uaddr, *end;
1670
1671 if (unlikely(size == 0))
1672 return 0;
1673 if (!PAGE_ALIGNED(uaddr)) {
> 1674 if (unlikely(__put_user(0, uaddr) != 0))
1675 return size;
1676 uaddr = (char __user *)PAGE_ALIGN((unsigned long)uaddr);
1677 }
1678 end = (char __user *)PAGE_ALIGN((unsigned long)start + size);
1679 if (unlikely(end < start))
1680 end = NULL;
1681 while (uaddr != end) {
1682 if (unlikely(__put_user(0, uaddr) != 0))
1683 goto out;
1684 uaddr += PAGE_SIZE;
1685 }
1686
1687 out:
1688 if (size > uaddr - start)
1689 return size - (uaddr - start);
1690 return 0;
1691 }
1692 EXPORT_SYMBOL(fault_in_writeable);
1693
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2022-01-19 21:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 21:54 kernel test robot [this message]
2022-01-19 21:54 ` mm/gup.c:1674:16: error: unexpected token, expected comma 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=202201200528.F5X9Vnfb-lkp@intel.com \
--to=lkp@intel.com \
--cc=agruenba@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
/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.