Hello community, here is the log from the commit of package trinity for openSUSE:Factory checked in at 2015-08-21 07:41:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/trinity (Old) and /work/SRC/openSUSE:Factory/.trinity.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "trinity" Changes: -------- --- /work/SRC/openSUSE:Factory/trinity/trinity.changes 2015-07-12 22:52:49.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.trinity.new/trinity.changes 2015-08-21 07:42:02.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Aug 19 14:40:47 UTC 2015 - [email protected] + +- Update to 20150804 +- Drop older-distros.patch it is already part of upstream + +------------------------------------------------------------------- Old: ---- older-distros.patch trinity-20150629.tar.xz New: ---- trinity-20150804.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trinity.spec ++++++ --- /var/tmp/diff_new_pack.xLnvOP/_old 2015-08-21 07:42:03.000000000 +0200 +++ /var/tmp/diff_new_pack.xLnvOP/_new 2015-08-21 07:42:03.000000000 +0200 @@ -17,14 +17,13 @@ Name: trinity -Version: 20150629 +Version: 20150804 Release: 0 Summary: A Linux System call fuzz tester License: GPL-2.0 Group: Development/Tools/Other Url: http://codemonkey.org.uk/projects/trinity/ Source0: %{name}-%{version}.tar.xz -Patch0: older-distros.patch BuildRequires: gcc BuildRequires: make BuildRequires: xz @@ -38,7 +37,6 @@ %prep %setup -q -%patch0 -p1 %build ./configure.sh ++++++ trinity-20150629.tar.xz -> trinity-20150804.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/fds/sockets.c new/trinity-20150804/fds/sockets.c --- old/trinity-20150629/fds/sockets.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/fds/sockets.c 2015-08-19 16:40:29.000000000 +0200 @@ -36,8 +36,10 @@ so->optval = 0; retry: - if (so->optval != 0) + if (so->optval != 0) { free((void *) so->optval); + so->optval = 0; + } do_setsockopt(so, triplet); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/include/compat.h new/trinity-20150804/include/compat.h --- old/trinity-20150629/include/compat.h 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/include/compat.h 2015-08-19 16:40:29.000000000 +0200 @@ -275,6 +275,9 @@ #ifndef PR_SET_CHILD_SUBREAPER #define PR_SET_CHILD_SUBREAPER 36 #define PR_GET_CHILD_SUBREAPER 37 +#endif + +#ifndef PR_SET_NO_NEW_PRIVS #define PR_SET_NO_NEW_PRIVS 38 #define PR_GET_NO_NEW_PRIVS 39 #define PR_GET_TID_ADDRESS 40 @@ -1018,6 +1021,17 @@ #endif /* time.h */ +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW 4 +#endif #ifndef CLOCK_BOOTTIME #define CLOCK_BOOTTIME 7 #endif + +/* asm-generic/poll.h */ +#ifndef POLLFREE +#define POLLFREE 0x4000 +#endif +#ifndef POLL_BUSY_LOOP +#define POLL_BUSY_LOOP 0x8000 +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/include/syscalls-aarch64.h new/trinity-20150804/include/syscalls-aarch64.h --- old/trinity-20150629/include/syscalls-aarch64.h 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/include/syscalls-aarch64.h 2015-08-19 16:40:29.000000000 +0200 @@ -289,4 +289,7 @@ /* 276 */ { .entry = &syscall_renameat2 }, /* 277 */ { .entry = &syscall_seccomp }, /* 278 */ { .entry = &syscall_getrandom }, +/* 279 */ { .entry = &syscall_memfd_create }, +/* 280 */ { .entry = &syscall_bpf }, +/* 281 */ { .entry = &syscall_execveat }, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/ioctls/vt.c new/trinity-20150804/ioctls/vt.c --- old/trinity-20150629/ioctls/vt.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/ioctls/vt.c 2015-08-19 16:40:29.000000000 +0200 @@ -2,6 +2,7 @@ #include <sys/ioctl.h> #include <linux/kd.h> #include <linux/serial.h> +#include <sys/termios.h> #include "utils.h" #include "ioctls.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-atm.c new/trinity-20150804/net/proto-atm.c --- old/trinity-20150629/net/proto-atm.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-atm.c 2015-08-19 16:40:29.000000000 +0200 @@ -52,8 +52,5 @@ void atm_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(atm_opts); - so->optname = atm_opts[val]; + so->optname = RAND_ARRAY(atm_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-ax25.c new/trinity-20150804/net/proto-ax25.c --- old/trinity-20150629/net/proto-ax25.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-ax25.c 2015-08-19 16:40:29.000000000 +0200 @@ -63,8 +63,5 @@ void ax25_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(ax25_opts); - so->optname = ax25_opts[val]; + so->optname = RAND_ARRAY(ax25_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-bluetooth.c new/trinity-20150804/net/proto-bluetooth.c --- old/trinity-20150629/net/proto-bluetooth.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-bluetooth.c 2015-08-19 16:40:29.000000000 +0200 @@ -21,8 +21,6 @@ void bluetooth_setsockopt(struct sockopt *so) { - unsigned char val; - switch(rand() % 5) { case 0: so->level = SOL_HCI; break; case 1: so->level = SOL_L2CAP; break; @@ -36,26 +34,22 @@ switch (so->level) { case SOL_HCI: - val = RAND_ARRAY(bluetooth_hci_opts); - so->optname = bluetooth_hci_opts[val]; + so->optname = RAND_ARRAY(bluetooth_hci_opts); break; case SOL_L2CAP: - val = RAND_ARRAY(bluetooth_l2cap_opts); - so->optname = bluetooth_l2cap_opts[val]; + so->optname = RAND_ARRAY(bluetooth_l2cap_opts); break; case SOL_SCO: /* no options currently */ break; case SOL_RFCOMM: - val = RAND_ARRAY(bluetooth_rfcomm_opts); - so->optname = bluetooth_rfcomm_opts[val]; + so->optname = RAND_ARRAY(bluetooth_rfcomm_opts); break; case SOL_BLUETOOTH: - val = RAND_ARRAY(bluetooth_opts); - so->optname = bluetooth_opts[val]; + so->optname = RAND_ARRAY(bluetooth_opts); break; default: break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-caif.c new/trinity-20150804/net/proto-caif.c --- old/trinity-20150629/net/proto-caif.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-caif.c 2015-08-19 16:40:29.000000000 +0200 @@ -49,10 +49,7 @@ void caif_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(caif_opts); - so->optname = caif_opts[val]; + so->optname = RAND_ARRAY(caif_opts); } #else /* stub if we are built on something without CAIF headers */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-dccp.c new/trinity-20150804/net/proto-dccp.c --- old/trinity-20150629/net/proto-dccp.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-dccp.c 2015-08-19 16:40:29.000000000 +0200 @@ -14,8 +14,5 @@ void dccp_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(dccp_opts); - so->optname = dccp_opts[val]; + so->optname = RAND_ARRAY(dccp_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-decnet.c new/trinity-20150804/net/proto-decnet.c --- old/trinity-20150629/net/proto-decnet.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-decnet.c 2015-08-19 16:40:29.000000000 +0200 @@ -50,10 +50,7 @@ void decnet_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(decnet_opts); - so->optname = decnet_opts[val]; + so->optname = RAND_ARRAY(decnet_opts); // TODO: set optlen correctly } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-icmp6.c new/trinity-20150804/net/proto-icmp6.c --- old/trinity-20150629/net/proto-icmp6.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-icmp6.c 2015-08-19 16:40:29.000000000 +0200 @@ -11,9 +11,6 @@ void icmpv6_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(icmpv6_opts); - so->optname = icmpv6_opts[val]; + so->optname = RAND_ARRAY(icmpv6_opts); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-irda.c new/trinity-20150804/net/proto-irda.c --- old/trinity-20150629/net/proto-irda.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-irda.c 2015-08-19 16:40:29.000000000 +0200 @@ -58,8 +58,5 @@ void irda_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(irda_opts); - so->optname = irda_opts[val]; + so->optname = RAND_ARRAY(irda_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-iucv.c new/trinity-20150804/net/proto-iucv.c --- old/trinity-20150629/net/proto-iucv.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-iucv.c 2015-08-19 16:40:29.000000000 +0200 @@ -9,10 +9,7 @@ void iucv_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(iucv_opts); - so->optname = iucv_opts[val]; + so->optname = RAND_ARRAY(iucv_opts); so->optlen = sizeof(int); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-llc.c new/trinity-20150804/net/proto-llc.c --- old/trinity-20150629/net/proto-llc.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-llc.c 2015-08-19 16:40:29.000000000 +0200 @@ -52,8 +52,5 @@ void llc_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(llc_opts); - so->optname = llc_opts[val]; + so->optname = RAND_ARRAY(llc_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-netlink.c new/trinity-20150804/net/proto-netlink.c --- old/trinity-20150629/net/proto-netlink.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-netlink.c 2015-08-19 16:40:29.000000000 +0200 @@ -49,14 +49,10 @@ static const unsigned int netlink_opts[] = { NETLINK_ADD_MEMBERSHIP, NETLINK_DROP_MEMBERSHIP, NETLINK_PKTINFO, NETLINK_BROADCAST_ERROR, - NETLINK_NO_ENOBUFS, NETLINK_RX_RING, NETLINK_TX_RING, NETLINK_LISTEN_ALL_NSID, - NETLINK_LIST_MEMBERSHIPS, + NETLINK_NO_ENOBUFS, NETLINK_RX_RING, NETLINK_TX_RING, }; void netlink_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(netlink_opts); - so->optname = netlink_opts[val]; + so->optname = RAND_ARRAY(netlink_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-netrom.c new/trinity-20150804/net/proto-netrom.c --- old/trinity-20150629/net/proto-netrom.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-netrom.c 2015-08-19 16:40:29.000000000 +0200 @@ -13,9 +13,6 @@ void netrom_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(netrom_opts); - so->optname = netrom_opts[val]; + so->optname = RAND_ARRAY(netrom_opts); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-packet.c new/trinity-20150804/net/proto-packet.c --- old/trinity-20150629/net/proto-packet.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-packet.c 2015-08-19 16:40:29.000000000 +0200 @@ -53,13 +53,11 @@ void packet_setsockopt(struct sockopt *so) { - unsigned char val; char *optval; optval = (char *) so->optval; - val = RAND_ARRAY(packet_opts); - so->optname = packet_opts[val]; + so->optname = RAND_ARRAY(packet_opts); /* Adjust length according to operation set. */ switch (so->optname) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-pppox.c new/trinity-20150804/net/proto-pppox.c --- old/trinity-20150629/net/proto-pppox.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-pppox.c 2015-08-19 16:40:29.000000000 +0200 @@ -169,10 +169,7 @@ void pppol2tp_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(pppol2tp_opts); - so->optname = pppol2tp_opts[val]; + so->optname = RAND_ARRAY(pppol2tp_opts); so->optlen = sizeof(int); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-rds.c new/trinity-20150804/net/proto-rds.c --- old/trinity-20150629/net/proto-rds.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-rds.c 2015-08-19 16:40:29.000000000 +0200 @@ -38,10 +38,7 @@ void rds_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(rds_opts); - so->optname = rds_opts[val]; + so->optname = RAND_ARRAY(rds_opts); } #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-rose.c new/trinity-20150804/net/proto-rose.c --- old/trinity-20150629/net/proto-rose.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-rose.c 2015-08-19 16:40:29.000000000 +0200 @@ -42,9 +42,6 @@ void rose_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(rose_opts); - so->optname = rose_opts[val]; + so->optname = RAND_ARRAY(rose_opts); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-rxrpc.c new/trinity-20150804/net/proto-rxrpc.c --- old/trinity-20150629/net/proto-rxrpc.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-rxrpc.c 2015-08-19 16:40:29.000000000 +0200 @@ -10,8 +10,5 @@ void rxrpc_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(rxrpc_opts); - so->optname = rxrpc_opts[val]; + so->optname = RAND_ARRAY(rxrpc_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-sctp.c new/trinity-20150804/net/proto-sctp.c --- old/trinity-20150629/net/proto-sctp.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-sctp.c 2015-08-19 16:40:29.000000000 +0200 @@ -19,8 +19,5 @@ void sctp_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(sctp_opts); - so->optname = sctp_opts[val]; + so->optname = RAND_ARRAY(sctp_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-socket.c new/trinity-20150804/net/proto-socket.c --- old/trinity-20150629/net/proto-socket.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-socket.c 2015-08-19 16:40:29.000000000 +0200 @@ -21,12 +21,9 @@ void socket_setsockopt(struct sockopt *so) { - unsigned char val; - so->level = SOL_SOCKET; - val = RAND_ARRAY(socket_opts); - so->optname = socket_opts[val]; + so->optname = RAND_ARRAY(socket_opts); /* Adjust length according to operation set. */ switch (so->optname) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-tcp.c new/trinity-20150804/net/proto-tcp.c --- old/trinity-20150629/net/proto-tcp.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-tcp.c 2015-08-19 16:40:29.000000000 +0200 @@ -16,8 +16,5 @@ void tcp_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(tcp_opts); - so->optname = tcp_opts[val]; + so->optname = RAND_ARRAY(tcp_opts); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-tipc.c new/trinity-20150804/net/proto-tipc.c --- old/trinity-20150629/net/proto-tipc.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-tipc.c 2015-08-19 16:40:29.000000000 +0200 @@ -52,10 +52,7 @@ void tipc_setsockopt(struct sockopt *so) { - unsigned char val; - - val = RAND_ARRAY(tipc_opts); - so->optname = tipc_opts[val]; + so->optname = RAND_ARRAY(tipc_opts); so->optlen = sizeof(__u32); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-udp.c new/trinity-20150804/net/proto-udp.c --- old/trinity-20150629/net/proto-udp.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-udp.c 2015-08-19 16:40:29.000000000 +0200 @@ -11,11 +11,9 @@ void udp_setsockopt(struct sockopt *so) { - unsigned char val; char *optval; - val = RAND_ARRAY(udp_opts); - so->optname = udp_opts[val]; + so->optname = RAND_ARRAY(udp_opts); switch (so->optname) { case UDP_CORK: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/net/proto-udplite.c new/trinity-20150804/net/proto-udplite.c --- old/trinity-20150629/net/proto-udplite.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/net/proto-udplite.c 2015-08-19 16:40:29.000000000 +0200 @@ -12,10 +12,8 @@ void udplite_setsockopt(struct sockopt *so) { char *optval; - unsigned char val; - val = RAND_ARRAY(udplite_opts); - so->optname = udplite_opts[val]; + so->optname = RAND_ARRAY(udplite_opts); switch (so->optname) { case UDP_CORK: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/params.c new/trinity-20150804/params.c --- old/trinity-20150629/params.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/params.c 2015-08-19 16:40:29.000000000 +0200 @@ -97,7 +97,7 @@ exit(EXIT_SUCCESS); } -static const char paramstr[] = "a:b:c:C:dDg:hIl:LN:mP:E:pqr:s:T:SV:vx:X"; +static const char paramstr[] = "a:b:c:C:dDE:g:hIl:LmN:P:pqr:s:ST:V:vx:X"; static const struct option longopts[] = { { "arch", required_argument, NULL, 'a' }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/syscalls/poll.c new/trinity-20150804/syscalls/poll.c --- old/trinity-20150629/syscalls/poll.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/syscalls/poll.c 2015-08-19 16:40:29.000000000 +0200 @@ -1,27 +1,32 @@ /* * sys_poll(struct pollfd __user *ufds, unsigned int nfds, int timeout); */ -#include <poll.h> +#include <stdlib.h> +#include <signal.h> +#include <asm/poll.h> #include "random.h" #include "sanitise.h" #include "utils.h" +#include "compat.h" + +static const unsigned long poll_events[] = { + POLLIN, POLLPRI, POLLOUT, POLLERR, + POLLHUP, POLLNVAL, POLLRDBAND, POLLWRNORM, + POLLWRBAND, POLLMSG, POLLREMOVE, POLLRDHUP, + POLLFREE, POLL_BUSY_LOOP, +}; static void sanitise_poll(struct syscallrecord *rec) { struct pollfd *pollfd; unsigned int i; unsigned int num_fds = rand() % 10; - unsigned long flags[] = { - POLLIN, POLLPRI, POLLOUT, POLLRDHUP, - POLLERR, POLLHUP, POLLNVAL, POLLRDNORM, - POLLRDBAND, POLLWRNORM, POLLWRBAND, POLLMSG - }; pollfd = zmalloc(num_fds * sizeof(struct pollfd)); for (i = 0; i < num_fds; i++) { pollfd[i].fd = get_random_fd(); - pollfd[i].events = set_rand_bitmask(ARRAY_SIZE(flags), flags); + pollfd[i].events = set_rand_bitmask(ARRAY_SIZE(poll_events), poll_events); } rec->a1 = (unsigned long) pollfd; @@ -46,3 +51,47 @@ .sanitise = sanitise_poll, .post = post_poll, }; + +/* + * SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds, + struct timespec __user *, tsp, const sigset_t __user *, sigmask, size_t, sigsetsize) + */ + +static void sanitise_ppoll(struct syscallrecord *rec) +{ + struct pollfd *fds; + struct timespec *ts; + + sanitise_poll(rec); + + fds = (struct pollfd *) rec->a1; + if (fds == NULL) + return; + + ts = zmalloc(sizeof(struct timespec)); + rec->a3 = (unsigned long) ts; + ts->tv_sec = 1; + ts->tv_nsec = 0; + + rec->a5 = sizeof(sigset_t); +} + +static void post_ppoll(struct syscallrecord *rec) +{ + freeptr(&rec->a1); + freeptr(&rec->a4); +} + +struct syscallentry syscall_ppoll = { + .name = "ppoll", + .num_args = 5, + .arg1name = "ufds", + .arg2name = "nfds", + .arg3name= "tsp", + .arg4name = "sigmask", + .arg4type = ARG_ADDRESS, + .arg5name = "sigsetsize", + .flags = NEED_ALARM, + .sanitise = sanitise_ppoll, + .post = post_ppoll, +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/syscalls/ppoll.c new/trinity-20150804/syscalls/ppoll.c --- old/trinity-20150629/syscalls/ppoll.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/syscalls/ppoll.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -/* - * SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds, - struct timespec __user *, tsp, const sigset_t __user *, sigmask, size_t, sigsetsize) - */ -#include "sanitise.h" - -struct syscallentry syscall_ppoll = { - .name = "ppoll", - .num_args = 5, - .arg1name = "ufds", - .arg1type = ARG_ADDRESS, - .arg2name = "nfds", - .arg2type = ARG_LEN, - .arg3name= "tsp", - .arg3type = ARG_ADDRESS, - .arg4name = "sigmask", - .arg4type = ARG_ADDRESS, - .arg5name = "sigsetsize", - .flags = NEED_ALARM, -}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/syscalls/setsockopt.c new/trinity-20150804/syscalls/setsockopt.c --- old/trinity-20150629/syscalls/setsockopt.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/syscalls/setsockopt.c 2015-08-19 16:40:29.000000000 +0200 @@ -232,6 +232,8 @@ */ void do_setsockopt(struct sockopt *so, struct socket_triplet *triplet) { + so->optname = 0; + /* get a page for the optval to live in. * TODO: push this down into the per-proto .func calls */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150629/tables.c new/trinity-20150804/tables.c --- old/trinity-20150629/tables.c 2015-06-30 11:29:30.000000000 +0200 +++ new/trinity-20150804/tables.c 2015-08-19 16:40:29.000000000 +0200 @@ -124,10 +124,42 @@ void count_syscalls_enabled(void) { if (biarch == TRUE) { - output(0, "32-bit syscalls: %d enabled, %d disabled. " - "64-bit syscalls: %d enabled, %d disabled.\n", - shm->nr_active_32bit_syscalls, max_nr_32bit_syscalls - shm->nr_active_32bit_syscalls, - shm->nr_active_64bit_syscalls, max_nr_64bit_syscalls - shm->nr_active_64bit_syscalls); + char str32[40]; + char str64[40]; + unsigned int nr; + + memset(str32, 0, sizeof(str32)); + memset(str64, 0, sizeof(str64)); + + /* first the 32bit syscalls */ + if (shm->nr_active_32bit_syscalls != 0) { + char *p = str32; + + p += sprintf(p, "%d enabled", shm->nr_active_32bit_syscalls); + + nr = max_nr_32bit_syscalls - shm->nr_active_32bit_syscalls; + if (nr != 0) + p += sprintf(p, ", %u disabled", nr); + } else { + sprintf(str32, "all disabled."); + } + + /* now the 64bit syscalls. */ + if (shm->nr_active_64bit_syscalls != 0) { + char *p = str64; + + p += sprintf(p, "%d enabled", shm->nr_active_64bit_syscalls); + + nr = max_nr_64bit_syscalls - shm->nr_active_64bit_syscalls; + if (nr != 0) + p += sprintf(p, ", %u disabled", nr); + } else { + sprintf(str64, "all disabled"); + } + + output(0, "32-bit syscalls: %s. 64-bit syscalls: %s.\n", + str32, str64); + } else { output(0, "Enabled %d syscalls. Disabled %d syscalls.\n", shm->nr_active_syscalls, max_nr_syscalls - shm->nr_active_syscalls);
