[linux-stable-rc:linux-4.14.y 3879/4798] ipc/mqueue.c:1531:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sergey,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
head:   9fcb9d72e8a3a813caae6e2fac43a73603d75abd
commit: 8e99c881e497e7f7528f693c563e204ae888a846 [3879/4798] tools/lib/subcmd/pager.c: do not alias select() params
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-8 (Debian 8.1.0-3) 8.1.0
reproduce:
        git checkout 8e99c881e497e7f7528f693c563e204ae888a846
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from ipc/mqueue.c:29:
   include/linux/syscalls.h:211:18: warning: 'sys_mq_open' alias between functions of incompatible types 'long int(const char *, int,  umode_t,  struct mq_attr *)' {aka 'long int(const char *, int,  short unsigned int,  struct mq_attr *)'} and 'long int(long int,  long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:199:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:847:1: note: in expansion of macro 'SYSCALL_DEFINE4'
    SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:215:18: note: aliased declaration here
     asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:199:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE4(name, ...) SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:847:1: note: in expansion of macro 'SYSCALL_DEFINE4'
    SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, umode_t, mode,
    ^~~~~~~~~~~~~~~
   In file included from include/linux/ethtool.h:17,
                    from include/linux/netdevice.h:41,
                    from include/net/sock.h:51,
                    from ipc/mqueue.c:42:
   include/linux/compat.h:51:18: warning: 'compat_sys_mq_getsetattr' alias between functions of incompatible types 'long int(mqd_t,  const struct compat_mq_attr *, struct compat_mq_attr *)' {aka 'long int(int,  const struct compat_mq_attr *, struct compat_mq_attr *)'} and 'long int(long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:42:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1531:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3'
    COMPAT_SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:55:18: note: aliased declaration here
     asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:42:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1531:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE3'
    COMPAT_SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:51:18: warning: 'compat_sys_mq_notify' alias between functions of incompatible types 'long int(mqd_t,  const struct compat_sigevent *)' {aka 'long int(int,  const struct compat_sigevent *)'} and 'long int(long int,  long int)' [-Wattribute-alias]
     asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:40:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1517:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE2'
    COMPAT_SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:55:18: note: aliased declaration here
     asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:40:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1517:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE2'
    COMPAT_SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:51:18: warning: 'compat_sys_mq_timedreceive' alias between functions of incompatible types 'long int(mqd_t,  char *, compat_size_t,  unsigned int *, const struct compat_timespec *)' {aka 'long int(int,  char *, unsigned int,  unsigned int *, const struct compat_timespec *)'} and 'long int(long int,  long int,  long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:46:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1502:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
    COMPAT_SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:55:18: note: aliased declaration here
     asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:46:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1502:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
    COMPAT_SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:51:18: warning: 'compat_sys_mq_timedsend' alias between functions of incompatible types 'long int(mqd_t,  const char *, compat_size_t,  unsigned int,  const struct compat_timespec *)' {aka 'long int(int,  const char *, unsigned int,  unsigned int,  const struct compat_timespec *)'} and 'long int(long int,  long int,  long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:46:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
   ipc/mqueue.c:1487:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
    COMPAT_SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:55:18: note: aliased declaration here
     asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:46:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
   ipc/mqueue.c:1487:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE5'
    COMPAT_SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:51:18: warning: 'compat_sys_mq_open' alias between functions of incompatible types 'long int(const char *, int,  compat_mode_t,  struct compat_mq_attr *)' {aka 'long int(const char *, int,  short unsigned int,  struct compat_mq_attr *)'} and 'long int(long int,  long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:44:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1464:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE4'
    COMPAT_SYSCALL_DEFINE4(mq_open, const char __user *, u_name,
    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/compat.h:55:18: note: aliased declaration here
     asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\
                     ^~~~~~~~~~
   include/linux/compat.h:44:2: note: in expansion of macro 'COMPAT_SYSCALL_DEFINEx'
     COMPAT_SYSCALL_DEFINEx(4, _##name, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~~~~~~
>> ipc/mqueue.c:1464:1: note: in expansion of macro 'COMPAT_SYSCALL_DEFINE4'
    COMPAT_SYSCALL_DEFINE4(mq_open, const char __user *, u_name,
    ^~~~~~~~~~~~~~~~~~~~~~
   In file included from ipc/mqueue.c:29:
   include/linux/syscalls.h:211:18: warning: 'sys_mq_getsetattr' alias between functions of incompatible types 'long int(mqd_t,  const struct mq_attr *, struct mq_attr *)' {aka 'long int(int,  const struct mq_attr *, struct mq_attr *)'} and 'long int(long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:198:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1398:1: note: in expansion of macro 'SYSCALL_DEFINE3'
    SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:215:18: note: aliased declaration here
     asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:198:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE3(name, ...) SYSCALL_DEFINEx(3, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1398:1: note: in expansion of macro 'SYSCALL_DEFINE3'
    SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:211:18: warning: 'sys_mq_notify' alias between functions of incompatible types 'long int(mqd_t,  const struct sigevent *)' {aka 'long int(int,  const struct sigevent *)'} and 'long int(long int,  long int)' [-Wattribute-alias]
     asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:197:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1342:1: note: in expansion of macro 'SYSCALL_DEFINE2'
    SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:215:18: note: aliased declaration here
     asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:197:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1342:1: note: in expansion of macro 'SYSCALL_DEFINE2'
    SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:211:18: warning: 'sys_mq_timedreceive' alias between functions of incompatible types 'long int(mqd_t,  char *, size_t,  unsigned int *, const struct timespec *)' {aka 'long int(int,  char *, long unsigned int,  unsigned int *, const struct timespec *)'} and 'long int(long int,  long int,  long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:200:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1197:1: note: in expansion of macro 'SYSCALL_DEFINE5'
    SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:215:18: note: aliased declaration here
     asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:200:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1197:1: note: in expansion of macro 'SYSCALL_DEFINE5'
    SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:211:18: warning: 'sys_mq_timedsend' alias between functions of incompatible types 'long int(mqd_t,  const char *, size_t,  unsigned int,  const struct timespec *)' {aka 'long int(int,  const char *, long unsigned int,  unsigned int,  const struct timespec *)'} and 'long int(long int,  long int,  long int,  long int,  long int)' [-Wattribute-alias]
     asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:200:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1183:1: note: in expansion of macro 'SYSCALL_DEFINE5'
    SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:215:18: note: aliased declaration here
     asmlinkage long SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
                     ^~~
   include/linux/syscalls.h:207:2: note: in expansion of macro '__SYSCALL_DEFINEx'
     __SYSCALL_DEFINEx(x, sname, __VA_ARGS__)
     ^~~~~~~~~~~~~~~~~
   include/linux/syscalls.h:200:36: note: in expansion of macro 'SYSCALL_DEFINEx'
    #define SYSCALL_DEFINE5(name, ...) SYSCALL_DEFINEx(5, _##name, __VA_ARGS__)
                                       ^~~~~~~~~~~~~~~
   ipc/mqueue.c:1183:1: note: in expansion of macro 'SYSCALL_DEFINE5'
    SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
    ^~~~~~~~~~~~~~~
   include/linux/syscalls.h:211:18: warning: 'sys_mq_unlink' alias between functions of incompatible types 'long int(const char *)' and 'long int(long int)' [-Wattribute-alias]

vim +/COMPAT_SYSCALL_DEFINE3 +1531 ipc/mqueue.c

0d060606 Al Viro        2017-06-27  1463  
0d060606 Al Viro        2017-06-27 @1464  COMPAT_SYSCALL_DEFINE4(mq_open, const char __user *, u_name,
0d060606 Al Viro        2017-06-27  1465  		       int, oflag, compat_mode_t, mode,
0d060606 Al Viro        2017-06-27  1466  		       struct compat_mq_attr __user *, u_attr)
0d060606 Al Viro        2017-06-27  1467  {
0d060606 Al Viro        2017-06-27  1468  	struct mq_attr attr, *p = NULL;
0d060606 Al Viro        2017-06-27  1469  	if (u_attr && oflag & O_CREAT) {
0d060606 Al Viro        2017-06-27  1470  		p = &attr;
0d060606 Al Viro        2017-06-27  1471  		if (get_compat_mq_attr(&attr, u_attr))
0d060606 Al Viro        2017-06-27  1472  			return -EFAULT;
0d060606 Al Viro        2017-06-27  1473  	}
0d060606 Al Viro        2017-06-27  1474  	return do_mq_open(u_name, oflag, mode, p);
0d060606 Al Viro        2017-06-27  1475  }
0d060606 Al Viro        2017-06-27  1476  
0d060606 Al Viro        2017-06-27  1477  static int compat_prepare_timeout(const struct compat_timespec __user *p,
b9047726 Deepa Dinamani 2017-08-02  1478  				   struct timespec64 *ts)
0d060606 Al Viro        2017-06-27  1479  {
b9047726 Deepa Dinamani 2017-08-02  1480  	if (compat_get_timespec64(ts, p))
0d060606 Al Viro        2017-06-27  1481  		return -EFAULT;
b9047726 Deepa Dinamani 2017-08-02  1482  	if (!timespec64_valid(ts))
0d060606 Al Viro        2017-06-27  1483  		return -EINVAL;
0d060606 Al Viro        2017-06-27  1484  	return 0;
0d060606 Al Viro        2017-06-27  1485  }
0d060606 Al Viro        2017-06-27  1486  
0d060606 Al Viro        2017-06-27 @1487  COMPAT_SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes,
0d060606 Al Viro        2017-06-27  1488  		       const char __user *, u_msg_ptr,
0d060606 Al Viro        2017-06-27  1489  		       compat_size_t, msg_len, unsigned int, msg_prio,
0d060606 Al Viro        2017-06-27  1490  		       const struct compat_timespec __user *, u_abs_timeout)
0d060606 Al Viro        2017-06-27  1491  {
b9047726 Deepa Dinamani 2017-08-02  1492  	struct timespec64 ts, *p = NULL;
0d060606 Al Viro        2017-06-27  1493  	if (u_abs_timeout) {
0d060606 Al Viro        2017-06-27  1494  		int res = compat_prepare_timeout(u_abs_timeout, &ts);
0d060606 Al Viro        2017-06-27  1495  		if (res)
0d060606 Al Viro        2017-06-27  1496  			return res;
0d060606 Al Viro        2017-06-27  1497  		p = &ts;
0d060606 Al Viro        2017-06-27  1498  	}
0d060606 Al Viro        2017-06-27  1499  	return do_mq_timedsend(mqdes, u_msg_ptr, msg_len, msg_prio, p);
0d060606 Al Viro        2017-06-27  1500  }
0d060606 Al Viro        2017-06-27  1501  
0d060606 Al Viro        2017-06-27 @1502  COMPAT_SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes,
0d060606 Al Viro        2017-06-27  1503  		       char __user *, u_msg_ptr,
0d060606 Al Viro        2017-06-27  1504  		       compat_size_t, msg_len, unsigned int __user *, u_msg_prio,
0d060606 Al Viro        2017-06-27  1505  		       const struct compat_timespec __user *, u_abs_timeout)
0d060606 Al Viro        2017-06-27  1506  {
b9047726 Deepa Dinamani 2017-08-02  1507  	struct timespec64 ts, *p = NULL;
0d060606 Al Viro        2017-06-27  1508  	if (u_abs_timeout) {
0d060606 Al Viro        2017-06-27  1509  		int res = compat_prepare_timeout(u_abs_timeout, &ts);
0d060606 Al Viro        2017-06-27  1510  		if (res)
0d060606 Al Viro        2017-06-27  1511  			return res;
0d060606 Al Viro        2017-06-27  1512  		p = &ts;
0d060606 Al Viro        2017-06-27  1513  	}
0d060606 Al Viro        2017-06-27  1514  	return do_mq_timedreceive(mqdes, u_msg_ptr, msg_len, u_msg_prio, p);
0d060606 Al Viro        2017-06-27  1515  }
0d060606 Al Viro        2017-06-27  1516  
0d060606 Al Viro        2017-06-27 @1517  COMPAT_SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes,
0d060606 Al Viro        2017-06-27  1518  		       const struct compat_sigevent __user *, u_notification)
0d060606 Al Viro        2017-06-27  1519  {
0d060606 Al Viro        2017-06-27  1520  	struct sigevent n, *p = NULL;
0d060606 Al Viro        2017-06-27  1521  	if (u_notification) {
0d060606 Al Viro        2017-06-27  1522  		if (get_compat_sigevent(&n, u_notification))
0d060606 Al Viro        2017-06-27  1523  			return -EFAULT;
0d060606 Al Viro        2017-06-27  1524  		if (n.sigev_notify == SIGEV_THREAD)
0d060606 Al Viro        2017-06-27  1525  			n.sigev_value.sival_ptr = compat_ptr(n.sigev_value.sival_int);
0d060606 Al Viro        2017-06-27  1526  		p = &n;
0d060606 Al Viro        2017-06-27  1527  	}
0d060606 Al Viro        2017-06-27  1528  	return do_mq_notify(mqdes, p);
0d060606 Al Viro        2017-06-27  1529  }
0d060606 Al Viro        2017-06-27  1530  
0d060606 Al Viro        2017-06-27 @1531  COMPAT_SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
0d060606 Al Viro        2017-06-27  1532  		       const struct compat_mq_attr __user *, u_mqstat,
0d060606 Al Viro        2017-06-27  1533  		       struct compat_mq_attr __user *, u_omqstat)
0d060606 Al Viro        2017-06-27  1534  {
0d060606 Al Viro        2017-06-27  1535  	int ret;
0d060606 Al Viro        2017-06-27  1536  	struct mq_attr mqstat, omqstat;
0d060606 Al Viro        2017-06-27  1537  	struct mq_attr *new = NULL, *old = NULL;
0d060606 Al Viro        2017-06-27  1538  
0d060606 Al Viro        2017-06-27  1539  	if (u_mqstat) {
0d060606 Al Viro        2017-06-27  1540  		new = &mqstat;
0d060606 Al Viro        2017-06-27  1541  		if (get_compat_mq_attr(new, u_mqstat))
0d060606 Al Viro        2017-06-27  1542  			return -EFAULT;
0d060606 Al Viro        2017-06-27  1543  	}
0d060606 Al Viro        2017-06-27  1544  	if (u_omqstat)
0d060606 Al Viro        2017-06-27  1545  		old = &omqstat;
0d060606 Al Viro        2017-06-27  1546  
0d060606 Al Viro        2017-06-27  1547  	ret = do_mq_getsetattr(mqdes, new, old);
0d060606 Al Viro        2017-06-27  1548  	if (ret || !old)
0d060606 Al Viro        2017-06-27  1549  		return ret;
0d060606 Al Viro        2017-06-27  1550  
0d060606 Al Viro        2017-06-27  1551  	if (put_compat_mq_attr(old, u_omqstat))
0d060606 Al Viro        2017-06-27  1552  		return -EFAULT;
0d060606 Al Viro        2017-06-27  1553  	return 0;
^1da177e Linus Torvalds 2005-04-16  1554  }
0d060606 Al Viro        2017-06-27  1555  #endif
^1da177e Linus Torvalds 2005-04-16  1556  

:::::: The code at line 1531 was first introduced by commit
:::::: 0d0606060baefdb13d3d80dba1b4c816b0676e16 mqueue: move compat syscalls to native ones

:::::: TO: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
:::::: CC: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux