summary refs log tree commit diff
path: root/ripple
AgeCommit message (Collapse)Author
2022-10-28ripple/fossil: make protos available as MIT OR Apache-2.0 HEAD trunkedef
This is more generally useful for other software and interop, so it should be licensed as liberally as possible. Change-Id: Iad848b0cb28f69b837f495ca20f00f9cbe677353
2022-10-27ripple/fossil: renumber size/executableedef
name/ref/size are numbered identically across FileNode & DirectoryNode, although the size field has different meanings. FileNode.size encodes size in bytes, whereas DirectoryNode.size encodes the number of transitive child nodes. This is a breaking format change, but the on-disk format is not yet considered stable. Change-Id: Ic9aa256d0fcd57ac08338c33047159332f5d657a
2022-07-31ripple/minitrace/maps_file: represent protection bits with ProtFlagsedef
Change-Id: Ia9dbddcd13da3fcb0c0ef30082d6f6750e4014da
2022-07-31ripple/minitrace/maps_file: represent inodes more preciselyedef
Change-Id: I5c537b5e41bb085094eb758617c40abe16531ab9
2022-07-31ripple/minitrace/syscall_abi/device: initedef
dev_t, but non-nullable and with a proper Rust API. Change-Id: I3d968b25f59b6e1a35c88f94bd0f135873b6dc2b
2022-07-31ripple/minitrace: drop redundant TODOedef
map_files reading is already implemented ^_^ Change-Id: I4b56dbb7d8100ee6802e81061174358290ab3201
2022-07-31ripple/minitrace: recognise anonymous/special mappings by dev/inodeedef
Change-Id: If90d5e75e97bcac7c5d8bfa770c003a306f7ac7b
2022-07-31ripple/minitrace: handle anonymous mappingsedef
Change-Id: I70ff40a1714f5f43c31106c23e23d37ea1104669
2022-07-31ripple/minitrace: reduce check_syscall to just its namesake taskedef
Printing gets moved into the main loop, and check_syscall gets a bunch more compact. Change-Id: Ifec602b92a5fb308148a474dd28247060ff15505
2022-07-31ripple/minitrace: ensure anonymous mmap offset is 0edef
Change-Id: Ia7a8dc32bdcb97c002219e81080849b9f980ce95
2022-07-31ripple/minitrace: terminate Process on dropedef
This ensures even outright panics in minitrace still cleanly terminate the process. Change-Id: I5debbae2e6e1bb38ef8782bbdf9f26661876fdbe
2022-07-31ripple/minitrace: use pidfd_send_signal over kill(2)edef
This is slightly safer, protecting against mis-targeted kills due to PID reuse. Change-Id: I4800a47dfb52a49a2be1b9d7450f7f4704b8078b
2022-07-31ripple/minitrace: use kill(2) over PTRACE_KILLedef
PTRACE_KILL is deprecated, and the manpage recommends using kill(pid, SIGKILL) instead. Change-Id: I8eda5a7add224838c2b01ef8b6999560bae446eb
2022-07-30ripple/minitrace: drop check_syscall match arms that don't do any validationedef
A lot of validation has moved into argument parsing, but ~no-op match arms haven't really been dropped. Change-Id: If4fb36073d5d8e8efc771beaa4a2b98cfb0a5726
2022-07-30ripple/minitrace/syscall_abi: represent prlimit64 pid with a unit structedef
We don't accept nonzero values here, so we should simply reject those early. Change-Id: I329ae76b1f44f6d3305e710ed8f5f90ee0df988f
2022-07-30ripple/minitrace/syscall_abi: represent RobustListHeadSize with a unit structedef
Change-Id: I709870b36d5b2329be53389af6c816aaeadfdd7b
2022-07-30ripple/minitrace/syscall_abi: represent SigSetSize with a unit structedef
This way we validate the sigsetsize early, and leave the invalid state unrepresentable. Change-Id: I237942089b4eb7fff06ada7ea8be7b8f94b2fcfd
2022-07-30ripple/minitrace/syscall_abi: initedef
Factor out the rather sprawling syscall ABI definitions from the main program. The macros, argument parsing, and file descriptor code get some space to breathe too. Change-Id: I0aa01b6b94e4d4b770bb9ef59926e2236c50b258
2022-07-30ripple/minitrace: configure stack rlimitsedef
Removing the RLIMIT_STACK soft limit changes address space layout markedly. Change-Id: I64d1a1fc1b397200245d5f790ce126c99d4b4797
2022-07-30ripple/minitrace/maps_file: show both bounds of the backing rangeedef
Change-Id: I2868f0583757f83b014ca8fa206029309c6ddd9d
2022-07-30ripple/minitrace: group contiguous mappings in debug outputedef
Specifically, contiguous linear mappings from the same backing file. Change-Id: I8adc6a3e33df6a2c27cb12218e41cb22b1b4621d
2022-07-30ripple/minitrace: read /proc/$pid/map_files to disambiguate pathnamesedef
This differentiates \n in pathnames from \012 in pathnames. Change-Id: I2c86084c9e46f42b43ea7c824be147d97d26a800
2022-07-30ripple/minitrace: enable anyhow backtracesedef
Change-Id: Iad5f0bc07018c7c0d8c5345fc499e0e171bf75e3
2022-07-30ripple/minitrace: dump early memory mappingsedef
These are from right after exec(2), so they are all done by the kernel. Change-Id: Ic76aa9c40acac64462fa6ab5c33cabcee3e096e5
2022-07-29ripple/minitrace: log ~all syscalls to stdoutedef
Except for times(2), which is called incessantly by cc1. Change-Id: Ie98f022136f7b018a3fce706af194502dc4fe202
2022-07-29ripple/minitrace: support zero-arg syscallsedef
Change-Id: I5b29792ad80dd3f80a6f51db45bced09cdbdfd6a
2022-07-29ripple/minitrace: strictly verify fd argumentsedef
Change-Id: I9210105171314d036dc12a1b36ce01aaeeb2466d
2022-07-29ripple/minitrace: verify openat mode strictlyedef
Change-Id: I943054765b764416ebe031535067dd3631c2ddaf
2022-07-29ripple/minitrace: verify rt_sigaction sigsetsize strictlyedef
Change-Id: I053f3f261963d955b0e54b20e5cd42f81b3e6a57
2022-07-29ripple/minitrace: verify rt_sigaction signal strictlyedef
Change-Id: I9237b8740fea2b84174b77487fc42e9464a0b2fc
2022-07-29ripple/minitrace: verify access(2) mode strictlyedef
Change-Id: I5e9f300a6db5fd40b2d46679ae6e613c1352a899
2022-07-29ripple/minitrace: factor out libc_checkedef
Change-Id: I4feb931cbf98c852f975e1e68fd5e0ec8f0eecf4
2022-07-29ripple/minitrace: verify mmap/mprotect page alignmentedef
Change-Id: If0d0d68264a2395c7ee746b5bca0c794ca4e4d65
2022-07-29ripple/minitrace: implement and use SyscallArg for enumsedef
Change-Id: Ia06d73ee49881d5db2fc57545e8040ce3976a584
2022-07-29ripple/minitrace: use # instead of prefixing with 0xedef
Change-Id: Ie21b75abcfc3f3d0fe68d84d81e92914fc9a7c0c
2022-07-29ripple/minitrace: drop process arg to check_syscalledef
Change-Id: Iaf9905852fb8cef97340da149ada6e6e4c3b6d17
2022-07-29ripple/minitrace: verify newfstatat flags strictlyedef
Change-Id: Ia85d147d493e1d6fb5a67ff5240dc64b17afb1af
2022-07-29ripple/minitrace: replace read_mem_cstr calls with CString argumentsedef
Change-Id: Ib8aec16cfca88db69765e7fa25aeaf8ea240f18d
2022-07-29ripple/minitrace: interpret CString arguments to syscallsedef
Change-Id: Ib8ddefb7a969e5cfd7e891233d083670a0c72596
2022-07-29ripple/minitrace: don't impl Copy for SyscallEntryedef
We'd like to be able to have heap-allocated syscall data, which means we can't impl Copy. Change-Id: Ib40dcaf7f99baeaae0dae1153e80deae88d76978
2022-07-29ripple/minitrace: use inline variable style for format stringsedef
Change-Id: I6ed5bd5dffbf5706b718be4f15896b831b3d64f5
2022-07-29ripple/minitrace: match read_mem_cstr return value names to input namesedef
Change-Id: I93538f4fd3daa4065d70fa3d4d9f638d83093f7b
2022-07-29ripple/minitrace: verify that libc flag naming matchesedef
Change-Id: Ic6392ac15d249f22aec9d866de088d5901d09948
2022-07-29ripple/minitrace: convert OpenFlags to bitshiftsedef
Change-Id: I12392d386027542815e2a4b96372121ece3adfeb
2022-07-29ripple/minitrace: verify syscall bitflags against libcedef
Change-Id: Ie9eae95ff5f6e438ef84007153a599d092953382
2022-07-29ripple/minitrace: make syscall_bitflags! non-recursiveedef
Change-Id: I81047a4ac68e11a37882175732e4985c2f43a183
2022-07-29ripple/minitrace: match identifier style in macrosedef
Having macro identifiers match the "real" identifier style makes macro code markedly more readable. Change-Id: Ib675390cc04941ce782c75b2ee686709441081fc
2022-07-29ripple/minitrace: pluralise newfstatat flags parameteredef
Change-Id: I025b5f707b15933c4dccdf36ce9e2c8d8673fe74
2022-07-28ripple/minitrace: bitflags-ify mmap/mprotect protection flagsedef
Change-Id: Iaf6d5717e2d83a6f81fda34da086311d21f345c2
2022-07-28ripple/minitrace: mark file descriptor parametersedef
This doesn't specifically handle * the distinction between borrowed/owned file descriptors (in non-return positions, that only applies to `close`) * "nullable" fd parameters (-1 for not-present) * other sentinel fds, like AT_FDCWD * fd validity in general Change-Id: I00fa68ec94b8f24e28c661d0c007becb37c0a5f3