Hmm, that’s my old patch again :( The new one should build properly, but I don’t know how to tell the bot to use it… Saagar Jha > On Jan 16, 2020, at 07:21, kbuild test robot <lkp@xxxxxxxxx> wrote: > > Hi Saagar, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on vfs/for-next] > [also build test ERROR on linus/master v5.5-rc6 next-20200115] > [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/Saagar-Jha/vfs-prevent-signed-overflow-by-using-u64-over-loff_t/20200113-144149 > base: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git for-next > config: x86_64-randconfig-h001-20200114 (attached as .config) > compiler: gcc-7 (Debian 7.5.0-3) 7.5.0 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot <lkp@xxxxxxxxx> > > All error/warnings (new ones prefixed by >>): > > fs/read_write.c: In function '__do_compat_sys_preadv': > fs/read_write.c:1253:47: error: expected ')' before ';' token > loff_t pos = (((u64)pos_high << 32) | pos_low; > ^ > fs/read_write.c:1256:1: error: expected ',' or ';' before '}' token > } > ^ > In file included from include/linux/syscalls.h:96:0, > from fs/read_write.c:17: > arch/x86/include/asm/syscall_wrapper.h:135:14: error: invalid storage class for function '__se_compat_sys_preadv64v2' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ > ^ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:136:21: error: invalid storage class for function '__do_compat_sys_preadv64v2' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ > ^ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ >>> arch/x86/include/asm/syscall_wrapper.h:106:18: error: static declaration of '__x32_compat_sys_preadv64v2' follows non-static declaration > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:104:18: note: previous declaration of '__x32_compat_sys_preadv64v2' was here > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__x32_compat_sys_preadv64v2': > arch/x86/include/asm/syscall_wrapper.h:108:10: error: implicit declaration of function '__se_compat_sys_preadv64v2'; did you mean '__se_compat_sys_preadv64'? [-Werror=implicit-function-declaration] > return __se_compat_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__do_compat_sys_preadv': > arch/x86/include/asm/syscall_wrapper.h:106:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:139:14: error: invalid storage class for function '__se_compat_sys_preadv64v2' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ > ^ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__se_compat_sys_preadv64v2': > arch/x86/include/asm/syscall_wrapper.h:141:10: error: implicit declaration of function '__do_compat_sys_preadv64v2'; did you mean '__se_compat_sys_preadv64v2'? [-Werror=implicit-function-declaration] > return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ > ^ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__do_compat_sys_preadv': > arch/x86/include/asm/syscall_wrapper.h:143:21: error: invalid storage class for function '__do_compat_sys_preadv64v2' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) > ^ > include/linux/compat.h:64:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1259:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5' > COMPAT_SYSCALL_DEFINE5(preadv64v2, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:135:14: error: invalid storage class for function '__se_compat_sys_preadv2' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ > ^ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:136:21: error: invalid storage class for function '__do_compat_sys_preadv2' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ > ^ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ >>> arch/x86/include/asm/syscall_wrapper.h:106:18: error: static declaration of '__x32_compat_sys_preadv2' follows non-static declaration > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:104:18: note: previous declaration of '__x32_compat_sys_preadv2' was here > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__x32_compat_sys_preadv2': > arch/x86/include/asm/syscall_wrapper.h:108:10: error: implicit declaration of function '__se_compat_sys_preadv2'; did you mean '__se_compat_sys_preadv'? [-Werror=implicit-function-declaration] > return __se_compat_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__do_compat_sys_preadv': > arch/x86/include/asm/syscall_wrapper.h:106:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:139:14: error: invalid storage class for function '__se_compat_sys_preadv2' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ > ^ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__se_compat_sys_preadv2': > arch/x86/include/asm/syscall_wrapper.h:141:10: error: implicit declaration of function '__do_compat_sys_preadv2'; did you mean '__do_compat_sys_preadv'? [-Werror=implicit-function-declaration] > return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ > ^ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__do_compat_sys_preadv': > arch/x86/include/asm/syscall_wrapper.h:143:21: error: invalid storage class for function '__do_compat_sys_preadv2' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) > ^ > include/linux/compat.h:66:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1270:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6' > COMPAT_SYSCALL_DEFINE6(preadv2, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1283:15: error: invalid storage class for function 'compat_writev' > static size_t compat_writev(struct file *file, > ^~~~~~~~~~~~~ > fs/read_write.c:1305:15: error: invalid storage class for function 'do_compat_writev' > static size_t do_compat_writev(compat_ulong_t fd, > ^~~~~~~~~~~~~~~~ > In file included from include/linux/syscalls.h:96:0, > from fs/read_write.c:17: > arch/x86/include/asm/syscall_wrapper.h:135:14: error: invalid storage class for function '__se_compat_sys_writev' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ > ^ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:136:21: error: invalid storage class for function '__do_compat_sys_writev' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ > ^ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ >>> arch/x86/include/asm/syscall_wrapper.h:106:18: error: static declaration of '__x32_compat_sys_writev' follows non-static declaration > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:104:18: note: previous declaration of '__x32_compat_sys_writev' was here > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__x32_compat_sys_writev': >>> arch/x86/include/asm/syscall_wrapper.h:108:10: error: implicit declaration of function '__se_compat_sys_writev'; did you mean '__x32_compat_sys_writev'? [-Werror=implicit-function-declaration] > return __se_compat_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__do_compat_sys_preadv': > arch/x86/include/asm/syscall_wrapper.h:106:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:139:14: error: invalid storage class for function '__se_compat_sys_writev' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ > ^ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__se_compat_sys_writev': > arch/x86/include/asm/syscall_wrapper.h:141:10: error: implicit declaration of function '__do_compat_sys_writev'; did you mean '__se_compat_sys_writev'? [-Werror=implicit-function-declaration] > return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ > ^ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__do_compat_sys_preadv': > arch/x86/include/asm/syscall_wrapper.h:143:21: error: invalid storage class for function '__do_compat_sys_writev' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) > ^ > include/linux/compat.h:60:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1323:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3' > COMPAT_SYSCALL_DEFINE3(writev, compat_ulong_t, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1330:13: error: invalid storage class for function 'do_compat_pwritev64' > static long do_compat_pwritev64(unsigned long fd, > ^~~~~~~~~~~~~~~~~~~ > In file included from include/linux/syscalls.h:96:0, > from fs/read_write.c:17: > arch/x86/include/asm/syscall_wrapper.h:135:14: error: invalid storage class for function '__se_compat_sys_pwritev64' > static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ > ^ > include/linux/compat.h:62:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1350:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE4' > COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:136:21: error: invalid storage class for function '__do_compat_sys_pwritev64' > static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ > ^ > include/linux/compat.h:62:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1350:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE4' > COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ >>> arch/x86/include/asm/syscall_wrapper.h:106:18: error: static declaration of '__x32_compat_sys_pwritev64' follows non-static declaration > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:62:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1350:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE4' > COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > arch/x86/include/asm/syscall_wrapper.h:104:18: note: previous declaration of '__x32_compat_sys_pwritev64' was here > asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ > ^ >>> arch/x86/include/asm/syscall_wrapper.h:138:2: note: in expansion of macro '__X32_COMPAT_SYS_STUBx' > __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > ^~~~~~~~~~~~~~~~~~~~~~ > include/linux/compat.h:62:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx' > COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__) > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c:1350:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE4' > COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd, > ^~~~~~~~~~~~~~~~~~~~~~ > fs/read_write.c: In function '__x32_compat_sys_pwritev64': >>> arch/x86/include/asm/syscall_wrapper.h:108:10: error: implicit declaration of function '__se_compat_sys_pwritev64'; did you mean '__x32_compat_sys_pwritev64'? [-Werror=implicit-function-declaration] > return __se_compat_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ > ^ > > vim +/__x32_compat_sys_preadv64v2 +106 arch/x86/include/asm/syscall_wrapper.h > > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 87 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 88 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 89 #ifdef CONFIG_X86_X32 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 90 /* > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 91 * For the x32 ABI, we need to create a stub for compat_sys_*() which is aware > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 92 * of the x86-64-style parameter ordering of x32 syscalls. The syscalls common > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 93 * with x86_64 obviously do not need such care. > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 94 */ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 95 #define __X32_COMPAT_SYS_STUB0(x, name, ...) \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 96 asmlinkage long __x32_compat_sys_##name(const struct pt_regs *regs);\ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 97 ALLOW_ERROR_INJECTION(__x32_compat_sys_##name, ERRNO); \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 98 asmlinkage long __x32_compat_sys_##name(const struct pt_regs *regs)\ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 99 { \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 100 return __se_compat_sys_##name();\ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 101 } > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 102 > c76fc98260751e Dominik Brodowski 2018-04-09 103 #define __X32_COMPAT_SYS_STUBx(x, name, ...) \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 104 asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs);\ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 105 ALLOW_ERROR_INJECTION(__x32_compat_sys##name, ERRNO); \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 @106 asmlinkage long __x32_compat_sys##name(const struct pt_regs *regs)\ > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 107 { \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 @108 return __se_compat_sys##name(SC_X86_64_REGS_TO_ARGS(x,__VA_ARGS__));\ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 109 } > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 110 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 111 #else /* CONFIG_X86_X32 */ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 112 #define __X32_COMPAT_SYS_STUB0(x, name) > c76fc98260751e Dominik Brodowski 2018-04-09 113 #define __X32_COMPAT_SYS_STUBx(x, name, ...) > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 114 #endif /* CONFIG_X86_X32 */ > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 115 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 116 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 117 #ifdef CONFIG_COMPAT > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 118 /* > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 119 * Compat means IA32_EMULATION and/or X86_X32. As they use a different > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 120 * mapping of registers to parameters, we need to generate stubs for each > d5a00528b58cdb Dominik Brodowski 2018-04-09 121 * of them. > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 122 */ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 123 #define COMPAT_SYSCALL_DEFINE0(name) \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 124 static long __se_compat_sys_##name(void); \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 125 static inline long __do_compat_sys_##name(void); \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 126 __IA32_COMPAT_SYS_STUB0(x, name) \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 127 __X32_COMPAT_SYS_STUB0(x, name) \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 128 static long __se_compat_sys_##name(void) \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 129 { \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 130 return __do_compat_sys_##name(); \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 131 } \ > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 132 static inline long __do_compat_sys_##name(void) > cf3b83e19d7c92 Andy Lutomirski 2019-10-08 133 > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 134 #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 135 static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 136 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ > c76fc98260751e Dominik Brodowski 2018-04-09 137 __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > c76fc98260751e Dominik Brodowski 2018-04-09 @138 __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 139 static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \ > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 140 { \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 141 return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\ > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 142 } \ > 5ac9efa3c50d7c Dominik Brodowski 2018-04-09 143 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) > ebeb8c82ffaf94 Dominik Brodowski 2018-04-05 144 > > :::::: The code at line 106 was first introduced by commit > :::::: 5ac9efa3c50d7caff9f3933bb8a3ad1139d92d92 syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention > > :::::: TO: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx> > :::::: CC: Ingo Molnar <mingo@xxxxxxxxxx> > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation > <.config.gz>