]> sourceware.org Git - systemtap.git/commit
PR25568 / RHBZ1857749: buildid/uprobes/inode rework, task_finder etc. side
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 27 Jul 2020 11:58:30 +0000 (07:58 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 27 Jul 2020 16:56:15 +0000 (12:56 -0400)
commite90530877ee21cffa2a9d53567ba5b5de1dd9b32
tree8e273a9d9f0ec888f0c2c5b7b5b8a984cc2e1dec
parent40dbe72afa2b039131bc95b5f73f173e28deba29
PR25568 / RHBZ1857749: buildid/uprobes/inode rework, task_finder etc. side

During work on a new stress tests for build-id based probes (coming in
next commit), it was found that the task_finder2 logic for buildid
verification didn't, well, work, because it was never run (due to an
erroneous pathlen conditional), and couldn't be safely run where it
was (because it was under spinlock but would have done
access_process_vm).  Reworked the relevant bits of task_finder2 to
perform build-id verification for processes later - during the quiesce
callback periods.  (Buildid verification for solibs is already done
in the task_finder2 consumer uprobes-inode.c.)

Testing with sdt_misc indicated a case where a preexisting process
(with solib sdt.h semaphores) was being attached to by a new stap
binary.  task_finder2's enumeration of the preexising processes'
memory map segments violated assumptions by recent code related to
tracking in stapiu_process[] lists.  (It did not mirror the temporal
ld.so mmap sequence.)  Changed this tracking to use the inode* as the
key, and stop trying to track mapping lengths, to make positive
matches and eliminate duplicate stapiu_process[] entries for the same
(process,solib) permutation.  Reworked stapiu_process[] accumulation
generally to move to the two immediate task_finder callbacks, out of
stapiu_change_plus().

Added lots of commentary and diagnostics throughout.  stap
-DDEBUG_UPROBES give meaningful info about uprobes & sdt semaphores;
with -DDEBUG_TASK_FINDER, more but not overwhelming relevant info
appears.
runtime/linux/task_finder2.c
runtime/linux/uprobes-inode.c
runtime/sym.c
This page took 0.027586 seconds and 5 git commands to generate.