Re: [PATCH 09/45] C++: x86: Fix the x86 syscall table production for C++

kbuild test robot
2018-04-02T07:58:16Z

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

Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on v4.16-rc7]
[cannot apply to linus/master tip/x86/core tip/locking/core v4.16 next-20180329]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/David-Howells/C-Convert-the-kernel-to-C/20180402-120344
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=um SUBARCH=x86_64

All errors (new ones prefixed by >>):

cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
cc1: warning: command line option '-fpermissive' is valid for C++/ObjC++ but not for C
In file included from arch/x86/um/user-offsets.c:20:0:
arch/x86/include/generated/asm/syscalls_64.h:135:1: error: implicit declaration of function '__NO_SYSCALL_'; did you mean '__SYSCALL_64'? [-Werror=implicit-function-declaration]
__NO_SYSCALL_(134)
^~~~~~~~~~~~~
__SYSCALL_64
>> arch/x86/um/user-offsets.c:18:37: error: subscripted value is neither array nor pointer nor vector
#define __SYSCALL_64(nr, sym, qual) [nr] = 1,
^
arch/x86/include/generated/asm/syscalls_64.h:136:1: note: in expansion of macro '__SYSCALL_64'
__SYSCALL_64(135, sys_personality, )
^~~~~~~~~~~~
>> arch/x86/um/user-offsets.c:18:37: error: subscripted value is neither array nor pointer nor vector
#define __SYSCALL_64(nr, sym, qual) [nr] = 1,
^
arch/x86/include/generated/asm/syscalls_64.h:176:1: note: in expansion of macro '__SYSCALL_64'
__SYSCALL_64(175, sys_init_module, )
^~~~~~~~~~~~
In file included from arch/x86/um/user-offsets.c:20:0:
arch/x86/include/generated/asm/syscalls_64.h:178:1: error: initializer element is not constant
__NO_SYSCALL_(177)
^~~~~~~~~~~~~
arch/x86/include/generated/asm/syscalls_64.h:178:1: note: (near initialization for 'syscalls[177]')
arch/x86/include/generated/asm/syscalls_64.h:179:1: error: expected '}' before '__NO_SYSCALL_'
__NO_SYSCALL_(178)
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [arch/x86/um/user-offsets.s] Error 1
make[1]: *** [arch/x86/um/user-offsets.s] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2

vim +18 arch/x86/um/user-offsets.c

8d0b9dc9 arch/um/sys-x86_64/user-offsets.c Al Viro 2005-05-05 11
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 12 #ifdef __i386__
cfcbadb4 arch/x86/um/user-offsets.c Andy Lutomirski 2016-01-28 13 #define __SYSCALL_I386(nr, sym, qual) [nr] = 1,
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 14 static char syscalls[] = {
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 15 #include <asm/syscalls_32.h>
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 16 };
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 17 #else
cfcbadb4 arch/x86/um/user-offsets.c Andy Lutomirski 2016-01-28 @18 #define __SYSCALL_64(nr, sym, qual) [nr] = 1,
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 19 static char syscalls[] = {
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 @20 #include <asm/syscalls_64.h>
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 21 };
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 22 #endif
45db1c61 arch/x86/um/user-offsets.c H. Peter Anvin 2011-12-05 23

:::::: The code at line 18 was first introduced by commit
:::::: cfcbadb49dabb05efa23e1a0f95f3391c0a815bc x86/syscalls: Add syscall entry qualifiers

:::::: TO: Andy Lutomirski <luto@kernel.org>
:::::: CC: Ingo Molnar <mingo@kernel.org>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

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