lkml.org 
[lkml]   [2022]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectmm/gup.c:1674:16: error: unexpected token, expected comma
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

\
 
 \ /
  Last update: 2022-01-19 22:57    [W:0.339 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site