| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
canonicalizing /lib/modules/KVER/systemtap.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
* runtime/sym.c (_stp_tf_mmap_cb): Only look for first load of whole module
that is executable. Add check for detecting reloading of module.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
group owner of the uprobes buld directory to build uprobes.ko.
- When building uprobes.ko, make all generated files writable by the group
owner of the uprobes build directory.
- Don't change the group owner of the uprobes build directory during
'make install'
|
|\| |
|
| |\ |
|
| | |
| | |
| | |
| | | |
limited to members of stapusr.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | | |
Conflicts:
configure
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are abusing the "first" section address here to indicate where the
module (actually first segment) is loaded (which is why we are ignoring
the offset). It would be good to redesign the stp_module/stp_section
data structures to better align with the actual memory mappings we are
interested in (especially the "section" naming is slightly confusing
since what we really seem to mean are elf segments (which can contain
multiple elf sections).
* runtime/sym.c (_stp_tf_mmap_cb): Add cheat comment.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* dwflpp.cxx (dwflpp::emit_address): Enable task finder and emit a
_stp_module_relocate for the ".dynamic" section when seeing a
user-space dso address.
* runtime/sym.c (_stp_mod_sec_lookup): Remove .dynamic section addr cheat.
(_stp_tf_mmap_cb): Add cheat here.
|
| |
| |
| |
| |
| |
| |
| | |
* runtime/sym.h: Define _stp_need_vma_tracker.
* translate.cxx (emit_symbol_data_done): Output _stp_need_vma_tracker value.
(c_unparser::emit_module_init): If STP_NEED_VMA_TRACKER isn't defined
check _stp_need_vma_tracker to call _stp_sym_init().
|
| |
| |
| |
| |
| | |
Ensure uprobes install directory has group 'stap-server'.
Rename igid_in to in_group.
|
| | |
|
| |
| |
| |
| | |
individually.
|
| | |
|
|/ |
|
|
|
|
| |
Delete ownership & permissions tests from modsign.cxx and stap-serverd.
|
|
|
|
| |
database.
|
|
|
|
| |
Update comments to clearly explain the security issues involved.
|
|
|
|
|
|
|
|
| |
messages within verify_it with the use of a 'module_name'
parameter passed in.
Add a comment in insert_module explaining why it's ok to
overwrite the 'path' parameter with the canonicalized path.
|
|\ |
|
| |
| |
| |
| | |
atomic_cmpxchg
|
|/
|
|
|
|
|
|
|
|
|
| |
This allows insert_module to to be used for loading the signed uprobes.ko
module.
Allow the use of $$parms and $$return in uprobes based probes for
unprivileged users.
Re-add management of module signatures in the cache. Don't know why
it was removed.
|
| |
|
|
|
|
| |
Create home directory manually for stap-server.
|
|
|
|
|
| |
* runtime/staprun/mainloop.c (stp_main_loop): Switched to unbuffered
output (instead of line buffered output).
|
|
|
|
|
|
| |
This patch just make the RC=1 when any output line starts with ERROR:.
Also some minors error that was returning 0 instead of 1 were fixed.
|
|
|
|
|
| |
* runtime/transport/transport.h: Removed extra declarations of
_stp_transport_init() and _stp_transport_close().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had a race where the probe setup could be called during/after the
probe shutdown in abnormal circumstances, which leads to kernel
callbacks still registered after module unload. (BOOM)
Now the setup/shutdown activities and related flags are guarded by a
mutex, so we should have strict ordering.
* runtime/transport/transport.c (_stp_transport_mutex): New.
(_stp_handle_start): Grab the mutex, and make sure we're not exiting.
(_stp_cleanup_and_exit): Grab the mutex.
(_stp_lock_inode, _stp_unlock_inode): Use kernel version for checking
inode locking type.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For scripts with thousands of probes, we save a fair amount of code-gen
time in pass-4 by having the common locking code extracted into shared
functions.
* runtime/probe_lock.h (stp_lock_probe, stp_unlock_probe): New.
* translate.cxx (c_unparser::emit_lock_decls): New, emits a static
const array of locks needed for each probe.
(c_unparser::emit_locks): Just call stp_lock_probe.
(c_unparser::emit_unlocks): Just call stp_unlock_probe.
|
|
|
|
|
| |
* runtime/unwind.c (processCFI): Fail if the number of instructions is
larger than MAX_CFI (currently 512).
|
|
|
|
|
| |
* runtime/unwind.c (unwind_frame): Check end read from cie or fde doesn't
go passed end of unwind table.
|
|
|
|
|
|
| |
* runtime/unwind.c (cie_for_fde): Take table and table_len into account.
(fde_pointer_type): Likewise.
* runtime/unwind/unwind.h: Adjust function prototypes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Guided by pahole, I've shaved off a few padding bytes here and there.
New sizes on x86_64:
stap_task_finder_target 192 -> 184
stap_itrace_probe 216 -> 208
stap_utrace_probe 328 -> 312
stap_uprobe_tf 200 -> 192
stap_uprobe_spec 48 -> 40
I only changed field layouts, not types or names, so this should be
perfectly safe. (FLW)
|
| |
|
|
|
|
|
| |
* stat-common.c (_stp_stat_print_histogram_buf): Fix HIST_PRINTF
parameter passing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uprobe_fork_uproc() runs with parent_uproc->rwsem locked.
However uprobe_mk_process() that gets called within uprobe_fork_uproc()
also locks child_uproc->rwsem after initializing it.
Lockdep report confuses this to acquiring a lock that already has been
acquired and suggests using sub-classes.
The alternatives we have are:
1. use classes level to distinguish different uproc structures.
2. unlock parent_uproc->rwsem before we call uprobe_fork_uproc().
3. dont try locking child_uproc->rwsem; since we are protected by
uproc_mutex as well as parent_uproc->rwsem;
We use the last approach.
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
---
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* transport/control.c (*_cmd): Return -Ecodes rather than "-1" from
file_operations callbacks.
* staprun/ctl.c (init_ctl_channel): Return distinct error codes.
* staprun/staprun.c (remove_module): Skip connection attempt to .ctl
file; just do delete_module() with O_NONBLOCK.
|
| |
| |
| |
| |
| |
| |
| | |
* runtime/stat-common.c (reprint_buf): Removed.
(_stp_stat_print_histogram_buf): Use a local HIST_PRINTF macro to
abstract the buffer management. Also convert reprint_buf calls to
either %* formats or simple for-loops.
|
|/
|
|
|
|
|
|
| |
* parse.cxx (parser::parse_symbol): Add sprint[ln] to @hist_* hack.
* runtime/stat-common.c: Replace reprint with new reprint_buf, add more
generic _stp_stat_print_histogram_buf and call it from the older one.
Also correct some formatting issues.
* translate.cxx (c_unparser::visit_print_format): Add sprint case.
|
|
|
|
|
| |
* mainloop.c (cleanup_and_exit): Remove non-BUG9788_WORKAROUND
branch. Remove execlp branch. Pass -v to staprun-d if verbose.
|
|
|
|
|
|
|
| |
* runtime/staprun/mainloop.c (signal_usr1): Renamed from signal_dontcare.
Sets a new variable, usr1_interrupt.
(start_cmd): Avoids pause() race condition by switching to blocking
SIGUSR1, then waiting on SIGUSR1 with sigsuspend().
|
|
|
|
|
| |
* staprun_funcs.c (assert_permissions): Move "check_signature_rc"
variable inside #if HAVE_NSS.
|
|
|
|
|
|
| |
Pending advice from Frank and Dave, changed check_permission to return void and
renamed it to assert_permission. assert_permission simply returns if
permissions are okay, and calls exit(-1) if there are any permissions errors.
|
|
|
|
| |
* runtime/tranport/ring_buffer.c: Removed 'USE_ITERS' definition.
|
|
|
|
|
|
|
|
|
| |
* tapset/random.stp (randint): Make it 1-arity (imply min=0).
Document with kerneldoc.
* doc/Systemtap_Tapset_Reference/tapsets.tmpl: Extract the docs.
* runtime/arith.c (_stp_random_pm_u): Rename without _pm.
(_stp_random_pm): Rewrite in terms of ..._u.
* testsuite/random.stp: Adapt & simplify.
|