Hello community, here is the log from the commit of package trinity for openSUSE:Factory checked in at 2015-07-12 22:52:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-06-23 12:00:05.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.trinity.new/trinity.changes 2015-07-12 22:52:49.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Jun 30 09:44:29 UTC 2015 - [email protected] + +- Update to 20150629 +- Add older-distros.patch: support for SLE11 + +------------------------------------------------------------------- Old: ---- trinity-20150617.tar.xz New: ---- older-distros.patch trinity-20150629.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ trinity.spec ++++++ --- /var/tmp/diff_new_pack.F1JFar/_old 2015-07-12 22:52:50.000000000 +0200 +++ /var/tmp/diff_new_pack.F1JFar/_new 2015-07-12 22:52:50.000000000 +0200 @@ -17,13 +17,14 @@ Name: trinity -Version: 20150617 +Version: 20150629 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 @@ -37,6 +38,7 @@ %prep %setup -q +%patch0 -p1 %build ./configure.sh ++++++ older-distros.patch ++++++ --- include/compat.h | 3 +++ 1 file changed, 3 insertions(+) --- a/include/compat.h +++ b/include/compat.h @@ -1018,6 +1018,9 @@ struct kvm_get_htab_fd { #endif /* time.h */ +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW 4 +#endif #ifndef CLOCK_BOOTTIME #define CLOCK_BOOTTIME 7 #endif ++++++ trinity-20150617.tar.xz -> trinity-20150629.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/blockdevs.c new/trinity-20150629/blockdevs.c --- old/trinity-20150617/blockdevs.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/blockdevs.c 2015-06-30 11:29:30.000000000 +0200 @@ -7,7 +7,7 @@ #include "types.h" #include "utils.h" -static int nr_blockdevs = 0; +static unsigned int nr_blockdevs = 0; struct bdevlist { struct list_head list; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/children/random-syscalls.c new/trinity-20150629/children/random-syscalls.c --- old/trinity-20150617/children/random-syscalls.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/children/random-syscalls.c 2015-06-30 11:29:30.000000000 +0200 @@ -137,8 +137,9 @@ do_syscall(rec); if (this_child->pid == 0) { - output(0, "Sanity check failed. my pid became zero after syscall:%d(%lx, %lx, %lx) was:%d\n", - syscallnr, a1, a2, a3, oldpid); + output(0, "Sanity check failed. my pid became zero after syscall:%s(%lx, %lx, %lx) was:%d\n", + print_syscall_name(syscallnr, do32), + a1, a2, a3, oldpid); dump_childnos(); dump_childdata(this_child); panic(EXIT_PID_OUT_OF_RANGE); @@ -146,8 +147,9 @@ if (old != 0) { if (rec->tv.tv_sec - old > 60) { - output(0, "Sanity check failed. Something stomped on rec->tv after syscall:%d(%lx, %lx, %lx) was:%lx now:%lx.\n", - syscallnr, a1, a2, a3, old, rec->tv.tv_sec); + output(0, "Sanity check failed. Something stomped on rec->tv after syscall:%s(%lx, %lx, %lx) was:%lx now:%lx.\n", + print_syscall_name(syscallnr, do32), + a1, a2, a3, old, rec->tv.tv_sec); dump_childnos(); dump_childdata(this_child); panic(EXIT_PID_OUT_OF_RANGE); @@ -156,8 +158,10 @@ /* post syscall sanity checks. */ if (len != strlen(rec->prebuffer)) { - output(0, "Sanity check failed: prebuffer length changed from %d to %d after syscall:%d(%lx, %lx, %lx).\n", - len, strlen(rec->prebuffer), syscallnr, a1, a2, a3); + output(0, "Sanity check failed: prebuffer length changed from %d to %d after syscall:%s(%lx, %lx, %lx).\n", + len, strlen(rec->prebuffer), + print_syscall_name(syscallnr, do32), + a1, a2, a3); dump_childnos(); dump_childdata(this_child); panic(EXIT_PID_OUT_OF_RANGE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/debug.c new/trinity-20150629/debug.c --- old/trinity-20150617/debug.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/debug.c 2015-06-30 11:29:30.000000000 +0200 @@ -49,7 +49,7 @@ { printf("BUG!: %s%s%s\n", ANSI_RED, bugtxt, ANSI_RESET); printf("BUG!: %s\n", VERSION); - printf("BUG!: [%d] %s:%s:%d\n", getpid(), filename, funcname, lineno); + printf("BUG!: [%d] %s:%s:%u\n", getpid(), filename, funcname, lineno); show_backtrace(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/include/compat.h new/trinity-20150629/include/compat.h --- old/trinity-20150617/include/compat.h 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/include/compat.h 2015-06-30 11:29:30.000000000 +0200 @@ -256,6 +256,12 @@ #define NETLINK_RX_RING 6 #define NETLINK_TX_RING 7 #endif +#ifndef NETLINK_LISTEN_ALL_NSID +#define NETLINK_LISTEN_ALL_NSID 8 +#endif +#ifndef NETLINK_LIST_MEMBERSHIPS +#define NETLINK_LIST_MEMBERSHIPS 9 +#endif /* linux/prctl.h */ #ifndef PR_MCE_KILL_GET @@ -465,6 +471,10 @@ #define TCP_CC_INFO 26 #endif +#ifndef TCP_SAVE_SYN +#define TCP_SAVE_SYN 27 +#define TCP_SAVED_SYN 28 +#endif /* linux/if_packet.h */ #ifndef PACKET_VNET_HDR @@ -531,6 +541,12 @@ #ifndef IP_NODEFRAG #define IP_NODEFRAG 22 #endif +#ifndef IP_CHECKSUM +#define IP_CHECKSUM 23 +#endif +#ifndef IP_BIND_ADDRESS_NO_PORT +#define IP_BIND_ADDRESS_NO_PORT 24 +#endif #ifndef IP_MULTICAST_ALL #define IP_MULTICAST_ALL 49 #endif @@ -540,6 +556,9 @@ #ifndef IPPROTO_BEETPH #define IPPROTO_BEETPH 94 #endif +#ifndef IPPROTO_MPLS +#define IPPROTO_MPLS 137 +#endif /* linux/in6.h */ #ifndef IPV6_FLOWINFO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/include/utils.h new/trinity-20150629/include/utils.h --- old/trinity-20150617/include/utils.h 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/include/utils.h 2015-06-30 11:29:30.000000000 +0200 @@ -5,8 +5,8 @@ #include <stdio.h> #include <string.h> -#define MB (1024 * 1024UL) -#define GB (1024 * MB) +#define MB(_x) (_x * 1024UL * 1024UL) +#define GB(_x) (_x * 1024UL * MB(1)) void * alloc_shared(unsigned int size); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/mm/maps-initial.c new/trinity-20150629/mm/maps-initial.c --- old/trinity-20150617/mm/maps-initial.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/mm/maps-initial.c 2015-06-30 11:29:30.000000000 +0200 @@ -76,8 +76,8 @@ { unsigned int i; const unsigned long sizes[] = { - 1 * MB, 2 * MB, 4 * MB, 10 * MB, -// 1 * GB, // disabled for now, due to OOM. + MB(1), MB(2), MB(4), MB(10), +// GB(1), // disabled for now, due to OOM. }; initial_mappings = zmalloc(sizeof(struct map)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/net/proto-ipv4.c new/trinity-20150629/net/proto-ipv4.c --- old/trinity-20150617/net/proto-ipv4.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/net/proto-ipv4.c 2015-06-30 11:29:30.000000000 +0200 @@ -135,6 +135,7 @@ { .proto = IPPROTO_SCTP, .type = SOCK_SEQPACKET }, { .proto = IPPROTO_UDPLITE, .type = SOCK_DGRAM }, { .proto = IPPROTO_RAW, }, + { .proto = IPPROTO_MPLS, }, }; unsigned char val; @@ -169,6 +170,8 @@ { .name = IP_ORIGDSTADDR, }, { .name = IP_MINTTL, }, { .name = IP_NODEFRAG, }, + { .name = IP_CHECKSUM, }, + { .name = IP_BIND_ADDRESS_NO_PORT, }, { .name = IP_MULTICAST_IF, .len = sizeof(struct ip_mreqn) }, { .name = IP_MULTICAST_TTL, }, { .name = IP_MULTICAST_LOOP, }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/net/proto-netlink.c new/trinity-20150629/net/proto-netlink.c --- old/trinity-20150617/net/proto-netlink.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/net/proto-netlink.c 2015-06-30 11:29:30.000000000 +0200 @@ -49,7 +49,8 @@ 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_NO_ENOBUFS, NETLINK_RX_RING, NETLINK_TX_RING, NETLINK_LISTEN_ALL_NSID, + NETLINK_LIST_MEMBERSHIPS, }; void netlink_setsockopt(struct sockopt *so) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/net/proto-tcp.c new/trinity-20150629/net/proto-tcp.c --- old/trinity-20150617/net/proto-tcp.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/net/proto-tcp.c 2015-06-30 11:29:30.000000000 +0200 @@ -11,7 +11,7 @@ TCP_CONGESTION, TCP_MD5SIG, TCP_COOKIE_TRANSACTIONS, TCP_THIN_LINEAR_TIMEOUTS, TCP_THIN_DUPACK, TCP_USER_TIMEOUT, TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS, TCP_FASTOPEN, TCP_TIMESTAMP, - TCP_NOTSENT_LOWAT, TCP_CC_INFO, + TCP_NOTSENT_LOWAT, TCP_CC_INFO, TCP_SAVE_SYN, TCP_SAVED_SYN, }; void tcp_setsockopt(struct sockopt *so) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/rand/random-pathname.c new/trinity-20150629/rand/random-pathname.c --- old/trinity-20150617/rand/random-pathname.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/rand/random-pathname.c 2015-06-30 11:29:30.000000000 +0200 @@ -35,6 +35,7 @@ newpath[0] = '.'; newpath[1] = '/'; (void) strncpy(newpath + 2, pathname, len); + len += 2; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/rand/random.c new/trinity-20150629/rand/random.c --- old/trinity-20150617/rand/random.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/rand/random.c 2015-06-30 11:29:30.000000000 +0200 @@ -46,7 +46,7 @@ if (RAND_BOOL()) { ptr[startoffset++] = '-'; remain--; - if (remain <= 0) + if (remain == 0) break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/shm.c new/trinity-20150629/shm.c --- old/trinity-20150617/shm.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/shm.c 2015-06-30 11:29:30.000000000 +0200 @@ -2,6 +2,7 @@ * Shared mapping creation. */ +#include <malloc.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -34,7 +35,7 @@ /* clear the whole shm. */ memset(shm, 0, shm_size); - printf("shm:%p-%p (%d pages)\n", shm, shm + shm_size - 1, nr_shm_pages); + printf("shm:%p-%p (%u pages)\n", shm, shm + shm_size - 1, nr_shm_pages); } void shm_ro(void) @@ -52,6 +53,7 @@ void init_shm(void) { unsigned int i; + unsigned int childptrslen; output(2, "shm is at %p\n", shm); @@ -67,7 +69,13 @@ /* Set seed in parent thread */ set_seed(NULL); - shm->children = zmalloc(max_children * sizeof(struct childdata *)); + childptrslen = max_children * sizeof(struct childdata *); + /* round up to page size */ + childptrslen += page_size - 1; + childptrslen &= PAGE_MASK; + + shm->children = memalign(page_size, childptrslen); + memset(shm->children, 0, childptrslen); /* We allocate the childdata structs as shared mappings, because * the watchdog process needs to peek into each childs syscall records @@ -86,4 +94,5 @@ child->logfile = NULL; } + mprotect(shm->children, childptrslen, PROT_READ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/syscalls/mmap.c new/trinity-20150629/syscalls/mmap.c --- old/trinity-20150617/syscalls/mmap.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/syscalls/mmap.c 2015-06-30 11:29:30.000000000 +0200 @@ -22,6 +22,55 @@ // need this to actually get MAP_UNINITIALIZED defined #define CONFIG_MMAP_ALLOW_UNINITIALIZED +static long sizes[] = { + -1, /* over-written with page_size below */ + MB(1), MB(2), MB(4), MB(10), + GB(1), +}; + +static int init_mmap(void) +{ + FILE *fp; + char *buffer; + size_t n = 0; + + if (sizes[0] != -1) + return 0; + + sizes[0] = page_size; + + fp = fopen("/proc/meminfo", "r"); + if (!fp) + return -1; + + buffer = malloc(4096); + if (!buffer) { + fclose(fp); + return -1; + } + + while (getline(&buffer, &n, fp) >= 0) { + unsigned int free; + + if (sscanf(buffer, "MemFree: %u", &free) == 1) { + unsigned long long freegb; + + freegb = free / 1024; + + if (freegb < GB(8ULL)) { + printf("Free memory: %.2fGB\n", (double) freegb / 1024); + printf("Low on memory, disabling mmaping of 1GB pages\n"); + sizes[5] = page_size; + return 0; + } + } + } + + free(buffer); + fclose(fp); + return 0; +} + static void do_anon(struct syscallrecord *rec) { /* no fd if anonymous mapping. */ @@ -39,13 +88,6 @@ MAP_32BIT, #endif }; - unsigned long sizes[] = { - -1, /* over-written with page_size below */ - 1 * MB, 2 * MB, 4 * MB, 10 * MB, - 1 * GB, - }; - - sizes[0] = page_size; /* Don't actually set a hint right now. */ rec->a1 = 0; @@ -158,6 +200,7 @@ .group = GROUP_VM, .flags = NEED_ALARM, + .init = init_mmap, }; struct syscallentry syscall_mmap2 = { @@ -190,4 +233,5 @@ .group = GROUP_VM, .flags = NEED_ALARM, + .init = init_mmap, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/syscalls/mremap.c new/trinity-20150629/syscalls/mremap.c --- old/trinity-20150617/syscalls/mremap.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/syscalls/mremap.c 2015-06-30 11:29:30.000000000 +0200 @@ -18,9 +18,9 @@ static struct map *map; static const unsigned long alignments[] = { - 1 * MB, 2 * MB, 4 * MB, 8 * MB, - 10 * MB, 100 * MB, - 1 * GB, 2 * GB, 4 * GB, + MB(1), MB(2), MB(4), MB(4), + MB(10), MB(100), + GB(1), GB(2), GB(4), }; static void sanitise_mremap(struct syscallrecord *rec) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/syscalls/setsockopt.c new/trinity-20150629/syscalls/setsockopt.c --- old/trinity-20150617/syscalls/setsockopt.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/syscalls/setsockopt.c 2015-06-30 11:29:30.000000000 +0200 @@ -67,6 +67,7 @@ { .proto = IPPROTO_SCTP, .sol = SOL_SCTP, .func = &sctp_setsockopt }, { .proto = IPPROTO_UDPLITE, .sol = SOL_UDPLITE, .func = &udplite_setsockopt }, { .proto = IPPROTO_RAW, .sol = SOL_RAW, .func = &raw_setsockopt }, + { .proto = IPPROTO_MPLS, .func = NULL }, }; struct sso_funcptr { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/tools/analyze-sockets.c new/trinity-20150629/tools/analyze-sockets.c --- old/trinity-20150617/tools/analyze-sockets.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/tools/analyze-sockets.c 2015-06-30 11:29:30.000000000 +0200 @@ -143,7 +143,6 @@ static void open_sockets(char *cachefilename) { int cachefile; - unsigned int family, type, protocol; unsigned int buffer[3]; int bytesread = -1; unsigned int nr_sockets = 0; @@ -153,6 +152,8 @@ return; while (bytesread != 0) { + unsigned int family, type, protocol; + bytesread = read(cachefile, buffer, sizeof(int) * 3); if (bytesread == 0) break; @@ -161,7 +162,7 @@ type = buffer[1]; protocol = buffer[2]; - printf("family:%s type:%s protocol:%s (%d)\n", + printf("family:%s type:%s protocol:%s (%u)\n", get_family_name(family), decode_type(type), get_proto_name(family, protocol), protocol); @@ -169,7 +170,7 @@ } - printf("%d entries in socket cachefile.\n", nr_sockets); + printf("%u entries in socket cachefile.\n", nr_sockets); close(cachefile); } @@ -182,4 +183,6 @@ } open_sockets(argv[1]); + + exit(EXIT_SUCCESS); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/trinity-20150617/uid.c new/trinity-20150629/uid.c --- old/trinity-20150617/uid.c 2015-06-22 14:00:27.000000000 +0200 +++ new/trinity-20150629/uid.c 2015-06-30 11:29:30.000000000 +0200 @@ -95,7 +95,7 @@ outputstd("ctrl-c now unless you really know what you are doing.\n"); for (i = 10; i > 0; i--) { - outputstd("Continuing in %d seconds.\r", i); + outputstd("Continuing in %u seconds.\r", i); (void)fflush(stdout); sleep(1); }
