[mark:arm64/uaccess/rework 17/19] arch/arm64/kernel/traps.c:443:5: warning: no previous prototype for function 'hark_foo'

From: kernel test robot
Date: Fri Oct 08 2021 - 22:28:41 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/uaccess/rework
head: 692de878f919de31942d0d28571b5e6f32c7135e
commit: d8e501ad8a85b31fbff728b8bb17e89e58076c3d [17/19] HACK: test
config: arm64-randconfig-r035-20211008 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id=d8e501ad8a85b31fbff728b8bb17e89e58076c3d
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark arm64/uaccess/rework
git checkout d8e501ad8a85b31fbff728b8bb17e89e58076c3d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64

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

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/traps.c:443:5: warning: no previous prototype for function 'hark_foo' [-Wmissing-prototypes]
int hark_foo(int __user *thing)
^
arch/arm64/kernel/traps.c:443:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int hark_foo(int __user *thing)
^
static
arch/arm64/kernel/traps.c:558:43: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__user_cache_maint("dc civac", address, ret);
^
arch/arm64/kernel/traps.c:558:3: note: use constraint modifier "w"
__user_cache_maint("dc civac", address, ret);
^
arch/arm64/kernel/traps.c:540:4: note: expanded from macro '__user_cache_maint'
_ASM_EXTABLE_EFAULT(1b, 2b, %0) \
^
arch/arm64/include/asm/asm-extable.h:67:2: note: expanded from macro '_ASM_EXTABLE_EFAULT'
_ASM_EXTABLE_EFAULT_ZERO(insn, fixup, err, xzr)
^
arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
"(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
^
arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
"((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
^
<scratch space>:12:2: note: expanded from here
"%0"
^
arch/arm64/kernel/traps.c:561:43: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__user_cache_maint("dc civac", address, ret);
^
arch/arm64/kernel/traps.c:561:3: note: use constraint modifier "w"
__user_cache_maint("dc civac", address, ret);
^
arch/arm64/kernel/traps.c:540:4: note: expanded from macro '__user_cache_maint'
_ASM_EXTABLE_EFAULT(1b, 2b, %0) \
^
arch/arm64/include/asm/asm-extable.h:67:2: note: expanded from macro '_ASM_EXTABLE_EFAULT'
_ASM_EXTABLE_EFAULT_ZERO(insn, fixup, err, xzr)
^
arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
"(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
^
arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
"((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
^
<scratch space>:23:2: note: expanded from here
"%0"
^
arch/arm64/kernel/traps.c:564:52: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__user_cache_maint("sys 3, c7, c13, 1", address, ret);
^
arch/arm64/kernel/traps.c:564:3: note: use constraint modifier "w"
__user_cache_maint("sys 3, c7, c13, 1", address, ret);
^
arch/arm64/kernel/traps.c:540:4: note: expanded from macro '__user_cache_maint'
_ASM_EXTABLE_EFAULT(1b, 2b, %0) \
^
arch/arm64/include/asm/asm-extable.h:67:2: note: expanded from macro '_ASM_EXTABLE_EFAULT'
_ASM_EXTABLE_EFAULT_ZERO(insn, fixup, err, xzr)
^
arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
"(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
^
arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
"((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
^
<scratch space>:34:2: note: expanded from here
"%0"
^
arch/arm64/kernel/traps.c:567:52: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__user_cache_maint("sys 3, c7, c12, 1", address, ret);
^
arch/arm64/kernel/traps.c:567:3: note: use constraint modifier "w"
__user_cache_maint("sys 3, c7, c12, 1", address, ret);
^
arch/arm64/kernel/traps.c:540:4: note: expanded from macro '__user_cache_maint'
_ASM_EXTABLE_EFAULT(1b, 2b, %0) \
^
arch/arm64/include/asm/asm-extable.h:67:2: note: expanded from macro '_ASM_EXTABLE_EFAULT'
_ASM_EXTABLE_EFAULT_ZERO(insn, fixup, err, xzr)
^
arch/arm64/include/asm/asm-extable.h:64:10: note: expanded from macro '_ASM_EXTABLE_EFAULT_ZERO'
"(" EX_DATA_REG(ERR, err) " | " EX_DATA_REG(ZERO, zero) ")")
^
arch/arm64/include/asm/asm-extable.h:59:19: note: expanded from macro 'EX_DATA_REG'
"((.L__gpr_num_" #gpr ") << " __stringify(EX_DATA_REG_##reg##_SHIFT) ")"
^
<scratch space>:45:2: note: expanded from here
"%0"
^
arch/arm64/kernel/traps.c:570:43: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
__user_cache_maint("dc civac", address, ret);
^
arch/arm64/kernel/traps.c:570:3: note: use constraint modifier "w"
__user_cache_maint("dc civac", address, ret);
^
arch/arm64/kernel/traps.c:540:4: note: expanded from macro '__user_cache_maint'
_ASM_EXTABLE_EFAULT(1b, 2b, %0) \
^
arch/arm64/include/asm/asm-extable.h:67:2: note: expanded from macro '_ASM_EXTABLE_EFAULT'


vim +/hark_foo +443 arch/arm64/kernel/traps.c

442
> 443 int hark_foo(int __user *thing)
444 {
445 int val;
446
447 if (!get_user(val, thing))
448 return val;
449
450 return 0xf00fd00d;
451 }
452

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

Attachment: .config.gz
Description: application/gzip