As alluded to in my last post, a few days ago I released a new version of Trinity.
The bulk of the work in this release happened prior to my burn out back in July. The combination of everything described in that post, and general unhappiness in my last job etc led to me just wanting to walk away from everything for an indeterminate amount of time.
Distance is good. I’ve continued to poke at trinity in small amounts since then. At last weeks kernel summit, a number of people expressed just how useful they find Trinity and how much they were bummed to find out I wasn’t working on it any more. With that feedback, I felt motivated to clean the decks and get 1.6 out. There’s a short description of most of the bigger changes below, but there were probably a whole bunch more changes made that I forgot to highlight in the shortlog.
With that release wrapped up, and with the fresh perspective of having been ‘away’ from the project for a while, when I was travelling last week, I started work on some new features, starting with implementing a generic object cache instead of hard coding a “remember this” set of functionality for every single object type a syscall could return. A relatively small amount of code, which should make life easier to support recycling syscall results for syscalls other than mmap (which is all that’s implemented right now).
So,.. while I’m working on this stuff again, it’s not the comeback many would like. I don’t know just how much time I’m going to have to devote to working on Trinity. From time to time, I suspect I’ll find some intersection between my work at Facebook and the sort of targeted testing that Trinity is useful for, but it’s not my primary focus, and probably won’t be again. Additionally, I’ve got a bunch of ideas for new projects I’m itching to work on that spawned from discussions last week, so “spare time” hacking effort might be devoted more to them in future.
tl;dr: Don’t send me feature requests. I’ve got more than enough ideas for stuff *I* want to implement. Diffs speak louder than words.
Summary of some of the bigger changes to Trinity since the last (1.5) tarball release include:
- Assorted improvements to the tuned random number generation.
(Including one particularly stupid bug where sometimes all child processes would get the same seed, and end up doing the same syscalls. oops)
- Various networking related improvements/fixes:
- tcp: add TCP_TIMESTAMP, TCP_NOTSENT_LOWAT & TCP_CC_INFO socket options.
- ipv6: Improved generation of random addresses. (No longer just localhost)
- ipv6: Added 14 missing socket options.
- ipv6: Now passes correct lengths for socket options. (Note: This change may break older glibcs: See this patch.)
- Beginnings of some better proto-alg sockaddr generation.
- Recognise PF_IB and PF_MPLS network protocols
- Socket generation improvements. (Picks right socket type to go with protocol)
- Now supports an ARG_SOCKETINFO for syscalls that operate primarily on sockets. (Still occasionally passes random fd’s)
- accept,accept4,bind,connect,getpeername,getsockname,recv,setsockopt,send converted to use ARG_SOCKETINFO.
- setsockopt now also matches the protocol of the socket passed to the right setsockopt args.
- netlink socket generation fix (pid is a portid, not a process id)
- The -P parameter no longer accepts the incomprehensible numeric form of arguments, just names.
- The PF_ prefix to the -P parameter is now optional, so you can just say ‘UNIX’ instead of ‘PF_UNIX’.
- Updates to keep up with new upstream kernel changes.
- Updated perf_event_open syscall to include 4.1 changes
- Updated syscall lists
alpha: execveat, getrandom, memfd_create
s390[x]: execveat, NUMA related syscalls
- mips: add new prctls for PR_SET_FP_MODE / PR_GET_FP_MODE
- Support for new fallocate flags (FALLOC_FL_INSERT_RANGE)
- Remove some false-positive triggering checks from the watchdog.
- Watchdog process is now nice’d to -19
- Monitor how many processes are currently stalled.
- If all child processes are stalled, send SIGKILLs to 50%
- New fd generators for drm dumb buffers & inotify watches.
- blacklist /dev/sd* from the fd list, so we can be a bit safer when running as root with –dropprivs
- Fixed the ‘bind process to CPU’ code to only pick online CPUs.
- Self-corruption checks added to child processes, like the watchdog code already did.
- Remove guard pages around shm.
- In debug mode, write protect the shm before making syscalls.
- Refactoring of logging code.
- Various code cleanups as usual.
- No longer tries to mmap 1GB pages if running with less than 8GB free.