summary refs log tree commit diff
path: root/ripple/minitrace
AgeCommit message (Collapse)Author
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
2022-07-27ripple/minitrace: remove GRND_ prefix from GrndFlagsedef
Change-Id: Icfcab2fccc1c152a694dfba3ba1e272cdacdbfab
2022-07-27ripple/minitrace: parse mmap flags strictlyedef
Change-Id: I56731f205e065bf501fd31a69c71c10aa7a2f720
2022-07-27ripple/minitrace: mmap fd is an i32, not u64edef
Change-Id: I092d4f47231d560a0c4ac023e63051def34c2c92
2022-07-27ripple/minitrace: better errors for invalid syscall argsedef
Change-Id: I26356c9b88c838e3c87e4083ac17f958c7c57bb7
2022-07-27ripple/minitrace: introduce syscall_bitflags!edef
Squeeze the bitflags / SyscallArg impl boilerplate into one macro. Change-Id: I5b5213b6f3ee11bc61b6f8439ceb2510ef6dffec
2022-07-27ripple/minitrace: implement SyscallArg for bitflagsedef
Change-Id: I1b4e7e01b5d5c840ac2e94f9637552f71e61ed04
2022-07-27ripple/minitrace: disable dead_code lint on SyscallArgsedef
Every single syscall arg producing a warning is just noisy. Change-Id: I339260886110e2982217ebbf9d29cb1cf91c747c
2022-07-27ripple/minitrace: refactor syscall interpretationV
We separate type-based parsing of syscall arguments from more detailed validation based on multiple parameters or on specific values. The former is implemented with a macro that takes syscall signatures and generates the relevant enum variant and parsing code. Co-authored-by: edef <edef@unfathomable.blue> Change-Id: I7e334d3e128e7b1461bfd6fae7c8ec5dd6ada0a8
2022-07-27ripple/minitrace: fix newfstatat dirfd handlingedef
Same bug as Ied63822001c8700fc71c89ec16d18036fbc33972, hiding missing behaviour around dirfd. newfstatat(AT_FDCWD, path, …) is used, as is newfstatat(fd, "", …). Change-Id: I03b9dc5118d7a47514abef82c4a577e8362fbb4d
2022-07-08ripple/minitrace: convert openat dirfd correctlyedef
Our conversion always mangled it, *and* our comparison was inverted, so both bugs remained hidden. Change-Id: Ied63822001c8700fc71c89ec16d18036fbc33972
2022-06-19ripple/minitrace: fix syscall ABIV
The fourth argument is passed in r10, not rcx, which is merely clobbered by syscalls. Change-Id: I0c7210c621f6955deccf21348ce6f495424555cc
2022-06-17ripple/minitrace: add set_tid_address, set_robust_list, and getrandomV
With this, minitrace has all the syscalls needed to run cc1. Change-Id: Iaeef58769f69d64e192af2270eb520e891daec94
2022-02-28ripple: bump Rust edition to 2021V
Change-Id: I25fde01a2eee6fd3affd7f069745c346eb3b19ff
2022-02-16ripple/minitrace: use CString::from_vec_with_nul for constructionV
New Rust version, fresh new APIs. Change-Id: I0983ea45a27ec25c16b1a7ff4dc828540ccd0b5f
2022-02-08ripple/minitrace: clean up prlimit64 arg destructuringV
Change-Id: If54ca6c931c0f3c8d99a65aeca15385f1ef8ebf3
2022-02-08ripple/minitrace: clean up arch_prctl arg destructuringV
Change-Id: I403062ce3570eac201612dcf083a8c670380f6a8
2022-02-08ripple/minitrace: log newfstatat pathsV
Change-Id: Ieec434cdbddb45ab099bb9cf91dea1a135fd06ad
2022-02-08ripple/minitrace: log readlink pathsedef
Change-Id: Idd2b174e0805e1a255f6a9a5cb9868aa59aa332a
2022-02-08ripple/minitrace: clean up ioctl handlingV
TIOCGWINSZ was mistakenly listed as TCGETS, and parameter destructuring got cleaned up. Change-Id: I8dce783c50d34ab619cf7b05c9b705b5e11bc459
2022-02-08ripple/minitrace: log access(2) pathsedef
Co-authored-by: V <v@unfathomable.blue> Change-Id: I26603ca7de3ac4a21b64390e4fc3d9f44a6c172a
2022-02-08ripple/minitrace: consistently use .. for arg matchingedef
Change-Id: Iadaebe17f1362460bf5b7b5770da3b94afbca237
2022-02-08ripple/minitrace: clear child environment variablesedef
Change-Id: If55273931055ff9033aca2e274b6cf7b4a510ec2
2022-02-08ripple/minitrace: enforce openat flagsedef
Co-authored-by: V <v@unfathomable.blue> Change-Id: Id848249e6b4a3de612d298d434c59889ba93b300
2022-02-08ripple/minitrace: log openat pathsedef
Co-authored-by: V <v@unfathomable.blue> Change-Id: Idcb3c29c4761158be788511f5f4bdb3003edf909
2022-02-08ripple/minitrace: ensure openat calls use AT_FDCWD onlyedef
Co-authored-by: V <v@unfathomable.blue> Change-Id: I32ca1947fc9278bdee1b0a8acdc8d5d66b61d736
2022-02-07ripple/minitrace: use anyhow::Result unqualifiededef
Result<T, E> keeps the same meaning, so there's no need to qualify it. Change-Id: I22872860ff18e75c01be01e0d4c8030bfc4133bb
2022-02-03ripple/minitrace: don't permit tracee escape if the tracer diesedef
Change-Id: If2c0262b82e072a600f9b8dfe7efdf3556f0e16a
2022-02-03ripple/minitrace: only disable ASLR in traceeedef
Change-Id: I6df0596ecc0ba9514c04339dbd80469880e30f4c
2022-02-03ripple/minitrace: take care of our own ptrace bringupedef
Change-Id: I2602d7bb751b6a7415832308843cb334b6f24aa2
2021-12-28ripple/minitrace: disable ASLRedef
Change-Id: I7e34fd965b46f33a38821bca196c8774206ee037
2021-12-28ripple: upgrade nix crate to 0.23.1edef
Change-Id: Ie477bbd96109b4ce9ddcee221addb49733259d5a
2021-12-28ripple/minitrace: enforce arguments for arch_prctl, prlimit64, ioctl, mmapedef
Change-Id: Ifb5939b9088de3096da7a1bdc6e0bc6e6a6ba94f
2021-12-27ripple/minitrace: enforce permitted syscall numbersedef
This doesn't discriminate between muxed syscalls yet, but at least bounds the available syscalls to the ones `cc1 hello.c` invokes. Change-Id: I1965f27746b509b32d5e86510e803038765c11dd
2021-12-27ripple/minitrace: initedef
Minimal PTRACE_SYSCALL tracer for further narrowing down the syscalls we need to support. Change-Id: I562ee6e88e52d7deeee6de588ef00dfc1c38a71a