fche changed the topic of #systemtap to: http://sourceware.org/systemtap; email systemtap@sourceware.org if answers here not timely, conversations may be logged
scox has joined #systemtap
<modem>
fche, hey
<fche>
hi
<modem>
i am willing to implement something
<modem>
hey
<fche>
a volunteer!
<fche>
looking for a PR?
<modem>
i think i am gonna contribute a probe pagecache.library ("path.so:offset")
<fche>
a function to traverse pagecache contents? or to do a lookup ?
<modem>
so you could put probe on userland library (from shared pagecache)
<modem>
no to put a breakpoint on a shared library
<modem>
so you could for instance hijack some function and do system-wide statistic
<fche>
as distinct from probe process("/lib64/libfoo.so") ?
<modem>
i think probe process will actually put a breakpoint for a given process, no ?
<modem>
i am asking in fact before working on anything
<fche>
nope, into the shared library (all users thereof)
<modem>
did you achieved it already ?
<modem>
oh amazing
<modem>
so it exist
<modem>
amazing
<modem>
how does it work ? :-)
<fche>
maybe we should give it an alias like probe library("...").function(...) etc.
<modem>
you don't use the rmap to find every instance of loaded library and add a bp ?
<modem>
no no
<fche>
how it works ... by hooking into the mmap system call, tracking when libraries are mapped;
<modem>
i had an idee from something you already achieved, that's it
<modem>
oh!
<modem>
wait
<fche>
when an expected library name is found, a uprobe is inserted
<modem>
so it will hook *futur process using it*
<modem>
not *actual process*
<fche>
and present ones
<fche>
it also does a search through existing processes
<fche>
see the task-finder facility in the runtime
<fche>
stap -DDEBUG_TASK_FINDER_VMA or somesuch
<modem>
ah ok
<modem>
amazing
<modem>
i didn't imagined you would have implemented that
<fche>
quite some time ago! :)
<modem>
so i am erasing it from my todo
<fche>
that's how some of the userspace CVE band-aids work - by tweaking libc.so in memory
<modem>
to add ficx ?
<modem>
to add fix ?
<fche>
sort of
<fche>
modem, hey, if you happen to have time, PR19906 would be helpful and not too hard
<modem>
mmm
<modem>
something using d_path () ?
<modem>
yeah i can do that, sure
<modem>
glad to help
<modem>
that's mostly a wrapper to d_path (file->f_path, buf, buflen)
<fche>
yup
<fche>
the tapset function already exists
<fche>
it just needs to be called from all the probe-point-aliases that could benefit from it - that have a $file value
<modem>
so the rule is : always return full path
<modem>
ok i will let you know if i start on that and ask you for precisions
<modem>
is PR13864 still to day ?
<modem>
I could defer in a workqueue
<fche>
hm
<fche>
yeah some deferral widgetry would be needed for that
<fche>
(and the worst part of that is guaranteeing its cleanup/shutdown as a script exits)