From: kbuild test robot <lkp@intel.com>
To: Saagar Jha <saagar@saagarjha.com>
Cc: kbuild-all@lists.01.org, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH] vfs: prevent signed overflow by using u64 over loff_t
Date: Tue, 14 Jan 2020 15:54:09 +0800 [thread overview]
Message-ID: <202001141531.7tVBJ9ap%lkp@intel.com> (raw)
In-Reply-To: <AECA23B8-C4AC-4280-A709-746DD9FC44F9@saagarjha.com>
[-- Attachment #1: Type: text/plain, Size: 29486 bytes --]
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-20200110]
[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: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
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 fs/read_write.c:20:0:
>> include/linux/compat.h:78:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
asmlinkage long 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,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:17:0:
fs/read_write.c:1271:16: warning: 'alias' attribute ignored [-Wattributes]
const struct compat_iovec __user *,vec,
^
include/linux/syscalls.h:117:25: note: in definition of macro '__SC_DECL'
#define __SC_DECL(t, a) t a
^
include/linux/syscalls.h:114:35: note: in expansion of macro '__MAP5'
#define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
^~~~~~
include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP6'
#define __MAP(n,...) __MAP##n(__VA_ARGS__)
^~~~~
>> include/linux/compat.h:79:35: note: in expansion of macro '__MAP'
asmlinkage long 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,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:20:0:
>> include/linux/compat.h:82: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,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:82:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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,
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compat.h:84:18: error: static declaration of '__se_compat_sys_preadv2' follows non-static declaration
asmlinkage 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,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:83:18: note: previous declaration of '__se_compat_sys_preadv2' was here
asmlinkage 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':
>> include/linux/compat.h:86:14: error: implicit declaration of function '__do_compat_sys_preadv2'; did you mean '__do_compat_sys_preadv'? [-Werror=implicit-function-declaration]
long ret = __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':
include/linux/compat.h:91: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,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:91:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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 fs/read_write.c:20:0:
>> include/linux/compat.h:78:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
asmlinkage long 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,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:17:0:
fs/read_write.c:1324:16: warning: 'alias' attribute ignored [-Wattributes]
const struct compat_iovec __user *, vec,
^
include/linux/syscalls.h:117:25: note: in definition of macro '__SC_DECL'
#define __SC_DECL(t, a) t a
^
include/linux/syscalls.h:111:35: note: in expansion of macro '__MAP2'
#define __MAP3(m,t,a,...) m(t,a), __MAP2(m,__VA_ARGS__)
^~~~~~
include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP3'
#define __MAP(n,...) __MAP##n(__VA_ARGS__)
^~~~~
>> include/linux/compat.h:79:35: note: in expansion of macro '__MAP'
asmlinkage long 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,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:20:0:
>> include/linux/compat.h:82: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,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:82:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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,
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compat.h:84:18: error: static declaration of '__se_compat_sys_writev' follows non-static declaration
asmlinkage 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,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:83:18: note: previous declaration of '__se_compat_sys_writev' was here
asmlinkage 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':
>> include/linux/compat.h:86:14: error: implicit declaration of function '__do_compat_sys_writev'; did you mean '__se_compat_sys_writev'? [-Werror=implicit-function-declaration]
long ret = __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':
include/linux/compat.h:91: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,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:91:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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 fs/read_write.c:20:0:
>> include/linux/compat.h:78:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
asmlinkage long 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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:17:0:
fs/read_write.c:1359:16: warning: 'alias' attribute ignored [-Wattributes]
const struct compat_iovec __user *,vec,
^
include/linux/syscalls.h:117:25: note: in definition of macro '__SC_DECL'
#define __SC_DECL(t, a) t a
^
include/linux/syscalls.h:113:35: note: in expansion of macro '__MAP4'
#define __MAP5(m,t,a,...) m(t,a), __MAP4(m,__VA_ARGS__)
^~~~~~
include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP5'
#define __MAP(n,...) __MAP##n(__VA_ARGS__)
^~~~~
>> include/linux/compat.h:79:35: note: in expansion of macro '__MAP'
asmlinkage long 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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:20:0:
>> include/linux/compat.h:82:21: error: invalid storage class for function '__do_compat_sys_pwritev'
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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:82:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compat.h:84:18: error: static declaration of '__se_compat_sys_pwritev' follows non-static declaration
asmlinkage 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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:83:18: note: previous declaration of '__se_compat_sys_pwritev' was here
asmlinkage 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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
fs/read_write.c: In function '__se_compat_sys_pwritev':
>> include/linux/compat.h:86:14: error: implicit declaration of function '__do_compat_sys_pwritev'; did you mean '__do_compat_sys_writev'? [-Werror=implicit-function-declaration]
long ret = __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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
fs/read_write.c: In function '__do_compat_sys_preadv':
include/linux/compat.h:91:21: error: invalid storage class for function '__do_compat_sys_pwritev'
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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:91:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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:1358:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compat.h:78:13: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
asmlinkage long 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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:17:0:
fs/read_write.c:1380:16: warning: 'alias' attribute ignored [-Wattributes]
const struct compat_iovec __user *,vec,
^
include/linux/syscalls.h:117:25: note: in definition of macro '__SC_DECL'
#define __SC_DECL(t, a) t a
^
include/linux/syscalls.h:114:35: note: in expansion of macro '__MAP5'
#define __MAP6(m,t,a,...) m(t,a), __MAP5(m,__VA_ARGS__)
^~~~~~
include/linux/syscalls.h:115:22: note: in expansion of macro '__MAP6'
#define __MAP(n,...) __MAP##n(__VA_ARGS__)
^~~~~
>> include/linux/compat.h:79:35: note: in expansion of macro '__MAP'
asmlinkage long 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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
In file included from fs/read_write.c:20:0:
>> include/linux/compat.h:82:21: error: invalid storage class for function '__do_compat_sys_pwritev2'
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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:82:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/compat.h:84:18: error: static declaration of '__se_compat_sys_pwritev2' follows non-static declaration
asmlinkage 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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:83:18: note: previous declaration of '__se_compat_sys_pwritev2' was here
asmlinkage 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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
fs/read_write.c: In function '__se_compat_sys_pwritev2':
>> include/linux/compat.h:86:14: error: implicit declaration of function '__do_compat_sys_pwritev2'; did you mean '__do_compat_sys_pwritev'? [-Werror=implicit-function-declaration]
long ret = __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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
fs/read_write.c: In function '__do_compat_sys_preadv':
include/linux/compat.h:91:21: error: invalid storage class for function '__do_compat_sys_pwritev2'
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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
include/linux/compat.h:91:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
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:1379:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE6'
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
^~~~~~~~~~~~~~~~~~~~~~
fs/read_write.c:1393:16: error: invalid storage class for function 'do_sendfile'
static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
^~~~~~~~~~~
fs/read_write.c:1492:1: warning: 'alias' attribute ignored [-Wattributes]
SYSCALL_DEFINE4(sendfile, int, out_fd, int, in_fd, off_t __user *, offset, size_t, count)
^~~~~~~~~~~~~~~
In file included from fs/read_write.c:17:0:
vim +/__do_compat_sys_preadv2 +82 include/linux/compat.h
217f4433fc2fe7 Heiko Carstens 2014-02-26 54
468366138850f2 Al Viro 2012-11-23 55 #define COMPAT_SYSCALL_DEFINE1(name, ...) \
468366138850f2 Al Viro 2012-11-23 56 COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__)
468366138850f2 Al Viro 2012-11-23 57 #define COMPAT_SYSCALL_DEFINE2(name, ...) \
468366138850f2 Al Viro 2012-11-23 58 COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
468366138850f2 Al Viro 2012-11-23 59 #define COMPAT_SYSCALL_DEFINE3(name, ...) \
468366138850f2 Al Viro 2012-11-23 60 COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
468366138850f2 Al Viro 2012-11-23 61 #define COMPAT_SYSCALL_DEFINE4(name, ...) \
468366138850f2 Al Viro 2012-11-23 62 COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
468366138850f2 Al Viro 2012-11-23 63 #define COMPAT_SYSCALL_DEFINE5(name, ...) \
468366138850f2 Al Viro 2012-11-23 64 COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
468366138850f2 Al Viro 2012-11-23 65 #define COMPAT_SYSCALL_DEFINE6(name, ...) \
468366138850f2 Al Viro 2012-11-23 66 COMPAT_SYSCALL_DEFINEx(6, _##name, __VA_ARGS__)
468366138850f2 Al Viro 2012-11-23 67
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 68 /*
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 69 * The asmlinkage stub is aliased to a function named __se_compat_sys_*() which
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 70 * sign-extends 32-bit ints to longs whenever needed. The actual work is
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 71 * done within __do_compat_sys_*().
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 72 */
7303e30ec1d8fb Dominik Brodowski 2018-04-05 73 #ifndef COMPAT_SYSCALL_DEFINEx
468366138850f2 Al Viro 2012-11-23 74 #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
bee20031772af3 Arnd Bergmann 2018-06-19 75 __diag_push(); \
bee20031772af3 Arnd Bergmann 2018-06-19 76 __diag_ignore(GCC, 8, "-Wattribute-alias", \
bee20031772af3 Arnd Bergmann 2018-06-19 77 "Type aliasing is used to sanitize syscall arguments");\
3e2052e5dd4062 Dominik Brodowski 2018-03-22 @78 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \
83460ec8dcac14 Andi Kleen 2013-11-12 @79 asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 80 __attribute__((alias(__stringify(__se_compat_sys##name)))); \
c9a211951c7c79 Howard McLauchlan 2018-03-21 81 ALLOW_ERROR_INJECTION(compat_sys##name, ERRNO); \
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 @82 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 83 asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 @84 asmlinkage long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
468366138850f2 Al Viro 2012-11-23 85 { \
bee20031772af3 Arnd Bergmann 2018-06-19 @86 long ret = __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
bee20031772af3 Arnd Bergmann 2018-06-19 87 __MAP(x,__SC_TEST,__VA_ARGS__); \
bee20031772af3 Arnd Bergmann 2018-06-19 88 return ret; \
468366138850f2 Al Viro 2012-11-23 89 } \
bee20031772af3 Arnd Bergmann 2018-06-19 90 __diag_pop(); \
5ac9efa3c50d7c Dominik Brodowski 2018-04-09 91 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
7303e30ec1d8fb Dominik Brodowski 2018-04-05 92 #endif /* COMPAT_SYSCALL_DEFINEx */
468366138850f2 Al Viro 2012-11-23 93
:::::: The code at line 82 was first introduced by commit
:::::: 5ac9efa3c50d7caff9f3933bb8a3ad1139d92d92 syscalls/core, syscalls/x86: Clean up compat syscall stub naming convention
:::::: TO: Dominik Brodowski <linux@dominikbrodowski.net>
:::::: CC: Ingo Molnar <mingo@kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25639 bytes --]
next prev parent reply other threads:[~2020-01-14 7:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 6:40 [PATCH] vfs: prevent signed overflow by using u64 over loff_t Saagar Jha
2020-01-14 7:54 ` kbuild test robot [this message]
2020-01-14 8:28 ` [PATCH v2] " Saagar Jha
2020-01-16 15:21 ` [PATCH] " kbuild test robot
2020-01-17 9:58 ` Saagar Jha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202001141531.7tVBJ9ap%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=saagar@saagarjha.com \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).