Re: [RESEND PATCH] sys_personality: Add optional arch hook arch_check_personality

From: kernel test robot
Date: Mon Jun 08 2020 - 03:50:43 EST


Hi Wang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on linus/master v5.7 next-20200605]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Wang-ShaoBo/sys_personality-Add-optional-arch-hook-arch_check_personality/20200608-105348
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-randconfig-r012-20200607 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e429cffd4f228f70c1d9df0e5d77c08590dd9766)
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 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 >>, old ones prefixed by <<):

>> arch/arm64/kernel/sys.c:31:5: warning: no previous prototype for function 'arch_check_personality' [-Wmissing-prototypes]
int arch_check_personality(unsigned int personality)
^
arch/arm64/kernel/sys.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int arch_check_personality(unsigned int personality)
^
static
arch/arm64/kernel/sys.c:42:17: warning: no previous prototype for function '__arm64_sys_ni_syscall' [-Wmissing-prototypes]
asmlinkage long __arm64_sys_ni_syscall(const struct pt_regs *__unused)
^
arch/arm64/kernel/sys.c:42:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
asmlinkage long __arm64_sys_ni_syscall(const struct pt_regs *__unused)
^
static
In file included from arch/arm64/kernel/sys.c:59:
In file included from arch/arm64/include/asm/unistd.h:47:
In file included from arch/arm64/include/uapi/asm/unistd.h:24:
include/uapi/asm-generic/unistd.h:34:1: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/asm-generic/unistd.h:29:37: note: expanded from macro '__SC_COMP'
#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:55:35: note: expanded from macro '__SYSCALL'
#define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
^~~~~~~~~~~~~
<scratch space>:19:1: note: expanded from here
__arm64_sys_io_setup
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:58:30: note: previous initialization is here
[0 ... __NR_syscalls - 1] = __arm64_sys_ni_syscall,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/sys.c:59:
In file included from arch/arm64/include/asm/unistd.h:47:
In file included from arch/arm64/include/uapi/asm/unistd.h:24:
include/uapi/asm-generic/unistd.h:36:1: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
__SYSCALL(__NR_io_destroy, sys_io_destroy)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:55:35: note: expanded from macro '__SYSCALL'
#define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
^~~~~~~~~~~~~
<scratch space>:20:1: note: expanded from here
__arm64_sys_io_destroy
^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:58:30: note: previous initialization is here
[0 ... __NR_syscalls - 1] = __arm64_sys_ni_syscall,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/sys.c:59:
In file included from arch/arm64/include/asm/unistd.h:47:
In file included from arch/arm64/include/uapi/asm/unistd.h:24:
include/uapi/asm-generic/unistd.h:38:1: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/asm-generic/unistd.h:29:37: note: expanded from macro '__SC_COMP'
#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
^~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:55:35: note: expanded from macro '__SYSCALL'
#define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
^~~~~~~~~~~~~
<scratch space>:21:1: note: expanded from here
__arm64_sys_io_submit
^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:58:30: note: previous initialization is here
[0 ... __NR_syscalls - 1] = __arm64_sys_ni_syscall,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/sys.c:59:
In file included from arch/arm64/include/asm/unistd.h:47:
In file included from arch/arm64/include/uapi/asm/unistd.h:24:
include/uapi/asm-generic/unistd.h:40:1: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
__SYSCALL(__NR_io_cancel, sys_io_cancel)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:55:35: note: expanded from macro '__SYSCALL'
#define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
^~~~~~~~~~~~~
<scratch space>:22:1: note: expanded from here
__arm64_sys_io_cancel
^~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:58:30: note: previous initialization is here
[0 ... __NR_syscalls - 1] = __arm64_sys_ni_syscall,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/sys.c:59:
In file included from arch/arm64/include/asm/unistd.h:47:
In file included from arch/arm64/include/uapi/asm/unistd.h:24:
include/uapi/asm-generic/unistd.h:43:1: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
__SC_3264(__NR_io_getevents, sys_io_getevents_time32, sys_io_getevents)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/uapi/asm-generic/unistd.h:22:34: note: expanded from macro '__SC_3264'
#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
^~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:55:35: note: expanded from macro '__SYSCALL'
#define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
^~~~~~~~~~~~~
<scratch space>:23:1: note: expanded from here
__arm64_sys_io_getevents
^~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/sys.c:58:30: note: previous initialization is here
[0 ... __NR_syscalls - 1] = __arm64_sys_ni_syscall,
^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/sys.c:59:
In file included from arch/arm64/include/asm/unistd.h:47:
In file included from arch/arm64/include/uapi/asm/unistd.h:24:

vim +/arch_check_personality +31 arch/arm64/kernel/sys.c

30
> 31 int arch_check_personality(unsigned int personality)
32 {
33 if (personality(personality) == PER_LINUX32 &&
34 !system_supports_32bit_el0())
35 return -EINVAL;
36
37 return 0;
38 }
39

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

Attachment: .config.gz
Description: application/gzip