[DTrace-devel] [PATCH 0/6] allow passing alloca pointers to actions and subrs
Nick Alcock
nick.alcock at oracle.com
Thu Mar 24 00:45:05 UTC 2022
Most of the commits in this series are fixups that implement various review
suggestions, but two (the first and last) add bounds checking to every subr
that takes a char *, and to suitable places to allow actions that take
pointers, so that those pointers can come from alloca'ed space. (No subrs
yet appear to exist that take non-char *'s, but it'll be easy to support
them too using the same mechanism.)
All tests pass, including the new one, excepting only the two that need
NULL-string support and test/unittest/speculation/tst.SingleCPU.d, which is
quite delicate and which I'll analyze further tomorrow.
(At least one of the little tweaks in one of these patches, dropping a
spurious comment, will conflict with other stuff on dev, but then so will
*every single call to dt_cg_probe_error* so I guess I'll cross that bridge
when I come to it.)
Nick Alcock (6):
strings: improve bounds on strlen return value
fixup! alloca: track alloca()ed allocations
fixup! alloca: load and store
fixup! alloca: load and store
fixup! alloca: bcopy
alloca: allow passing alloca pointers to actions and subrs
bpf/strlen.c | 2 +-
include/bpf-lib.h | 15 +++
libdtrace/dt_cg.c | 108 +++++++++++----
libdtrace/dt_parser.c | 3 +-
test/unittest/funcs/alloca/tst.alloca-funcs.d | 125 ++++++++++++++++++
5 files changed, 223 insertions(+), 30 deletions(-)
create mode 100644 test/unittest/funcs/alloca/tst.alloca-funcs.d
--
2.35.1.261.g8402f930ba.dirty
More information about the DTrace-devel
mailing list