summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-11-241-1/+1
| |\
| * | PR 10976, 10984. Loading of signed modules (script module and uprobes) ↵Dave Brolley2009-11-241-61/+121
| | | | | | | | | | | | limited to members of stapusr.
* | | Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-11-233-3/+21
|\ \ \ | | |/ | |/| | | | | | | | | | Conflicts: configure
| * | cleanup: explain -5 magic value used in map-sorting codeFrank Ch. Eigler2009-11-201-1/+1
| |/
| * Explain "cheat" comment in sym.c (_stp_tf_mmap_cb).Mark Wielaard2009-11-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * PR10010 Support $globals in shared libraries.Mark Wielaard2009-11-161-2/+5
| | | | | | | | | | | | | | | | * 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.
| * Allow modules to trigger task_finder vma_tracker.Mark Wielaard2009-11-161-0/+4
| | | | | | | | | | | | | | * 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/Makefile never returns failure due to setting permissions.Dave Brolley2009-11-231-11/+17
| | | | | | | | | | Ensure uprobes install directory has group 'stap-server'. Rename igid_in to in_group.
* | Rework setting of group and permissions on generated files and directories.Dave Brolley2009-11-231-8/+21
| |
* | Make built files and directories writeable by the stap-server group ↵Dave Brolley2009-11-231-4/+6
| | | | | | | | individually.
* | Only attempt to change the group permissions of built items if we are root.Dave Brolley2009-11-201-3/+6
| |
* | Allow members of the group stap-server to build the uprobes module.Dave Brolley2009-11-201-3/+9
|/
* Sign uprobes.ko with the builder's certificate.Dave Brolley2009-11-121-1/+1
| | | | Delete ownership & permissions tests from modsign.cxx and stap-serverd.
* Relax restrictions on ownership and access permissions of signer's cert ↵Dave Brolley2009-11-121-0/+1
| | | | database.
* Use 'module_realpath' instead of overwriting 'path' in insert_module.Dave Brolley2009-11-101-18/+14
| | | | Update comments to clearly explain the security issues involved.
* Replace the use of the global variable 'modpath' in diagnosticDave Brolley2009-11-103-10/+14
| | | | | | | | 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.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-11-091-0/+11
|\
| * PR10849: Support MAXSKIPPED handling on RHEL4 through implementation of ↵Roland Grunberg2009-11-061-0/+11
| | | | | | | | atomic_cmpxchg
* | Don't reference global variable modpath in insert_module and its helpers.Dave Brolley2009-11-093-36/+81
|/ | | | | | | | | | | 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.
* Revert change which loads uprobes.ko using insert_module.Dave Brolley2009-11-051-3/+5
|
* PR 9973: Sign uprobes.ko when it is created and load it using insert_module.Dave Brolley2009-11-052-6/+11
| | | | Create home directory manually for stap-server.
* PR 10706 fixed by switching to unbuffered output.David Smith2009-11-031-1/+1
| | | | | * runtime/staprun/mainloop.c (stp_main_loop): Switched to unbuffered output (instead of line buffered output).
* Fix for bug 10866 (exit with rc != 0 on script ERRORs).Breno Leitao2009-11-032-11/+15
| | | | | | 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.
* Removed extra declarations.David Smith2009-10-291-3/+0
| | | | | * runtime/transport/transport.h: Removed extra declarations of _stp_transport_init() and _stp_transport_close().
* PR10854: Use a mutex around transport startup/shutdownJosh Stone2009-10-271-15/+23
| | | | | | | | | | | | | | | 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.
* Refactor probe locking into shared functionsJosh Stone2009-10-211-0/+68
| | | | | | | | | | | | 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.
* Limit the number of call frame instructions we process in the unwinder.Mark Wielaard2009-10-201-0/+7
| | | | | * runtime/unwind.c (processCFI): Fail if the number of instructions is larger than MAX_CFI (currently 512).
* Make sure cie and fde end point to sane values in while doing unwind_frame.Mark Wielaard2009-10-201-0/+11
| | | | | * runtime/unwind.c (unwind_frame): Check end read from cie or fde doesn't go passed end of unwind table.
* Be paranoid about table size resolving cie_for_fde and fde_pointer_type.Mark Wielaard2009-10-202-9/+22
| | | | | | * runtime/unwind.c (cie_for_fde): Take table and table_len into account. (fde_pointer_type): Likewise. * runtime/unwind/unwind.h: Adjust function prototypes.
* Improve some runtime struct layoutsJosh Stone2009-10-191-2/+2
| | | | | | | | | | | | | | 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)
* bemoan that _stp_*printf can't be protected with gcc attribute printfFrank Ch. Eigler2009-10-191-1/+5
|
* fix 32-bit compatibility for @hist_log printingWenji Huang2009-10-191-1/+1
| | | | | * stat-common.c (_stp_stat_print_histogram_buf): Fix HIST_PRINTF parameter passing.
* Avoid lockdep warnings.Srikar Dronamraju2009-10-192-14/+34
| | | | | | | | | | | | | | | | | | | | 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> ---
* Merge branch 'master' of sourceware.org:/git/systemtapJosh Stone2009-10-133-19/+18
|\
| * runtime shutdown errors: simplify, improve error specificityFrank Ch. Eigler2009-10-133-19/+18
| | | | | | | | | | | | | | | | * 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.
* | Refactor some of the histogram printingJosh Stone2009-10-131-56/+29
| | | | | | | | | | | | | | * 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.
* | PR10257: Add support for sprint[ln](@hist_*).Przemyslaw Pawelczyk2009-10-131-32/+42
|/ | | | | | | | * 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.
* PR10761: pass -v's to final "staprun -d" if appropriateFrank Ch. Eigler2009-10-131-60/+54
| | | | | * mainloop.c (cleanup_and_exit): Remove non-BUG9788_WORKAROUND branch. Remove execlp branch. Pass -v to staprun-d if verbose.
* PR 10575. Improves running target commands.David Smith2009-10-131-18/+43
| | | | | | | * 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().
* build: fix !HAVE_NSS caseFrank Ch. Eigler2009-10-071-2/+1
| | | | | * staprun_funcs.c (assert_permissions): Move "check_signature_rc" variable inside #if HAVE_NSS.
* PR10724: staprun: simplify permissions checking logicCharley Wang2009-10-062-19/+19
| | | | | | 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.
* No longer need buffer iterators.David Smith2009-09-251-2/+0
| | | | * runtime/tranport/ring_buffer.c: Removed 'USE_ITERS' definition.
* PR10632: simplify randint() implementationFrank Ch. Eigler2009-09-231-24/+10
| | | | | | | | | * 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.
* PR1062: runtime functionCharley Wang2009-09-231-0/+22
| | | | * arith.c (_stp_random_pm_u): New function.
* Forward-ported staplog.c crash support (PR 10644).David Smith2009-09-232-3/+7
| | | | | | | | | | | | | | * staplog.c (get_rchan): Separated original relayfs code and current relayfs code. (get_rchan_buf): Ditto. (output_cpu_logs): Ditto. (get_rchan_addr): Handles original relayfs code detection. (setup_global_data): Looks for '_stp_relay_data' structure instead of '_stp_utt' structure. (open_output_file): Improved error message. * runtime/transport/relay_v2.c: Rearranged struct _stp_relay_data_type to make things a bit easier for staplog.c. * runtime/transport/relayfs.c: Ditto
* PR10390: ftrace() tapset functionFrank Ch. Eigler2009-09-231-0/+8
| | | | | | | | | | | * tapset/logging.stp (ftrace): New function. (*): Add kerneldoc to other functions. * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Process logging.stp. * stapfuncs.3stap.in: Remove "LOGGING" section, now redundant. * runtime/autoconf-trace-printk.c: New autoconf test. * buildrun.cxx (compile_pass): Build it. * NEWS: Mention it. * testsuite/buildok/logging.stp: Test it.
* PR10655 part 1: uprobes: track sdt semaphores properlyFrank Ch. Eigler2009-09-181-0/+1
| | | | | | | | | | | | | | | | | | | commit 6846cfc8 introduced an unintended side-effect where semaphore tracking was identified with stap_uprobe_specs[] elements, which are normally static/const. This kernel patch <http://article.gmane.org/gmane.linux.kernel/854187> catches and panics on this. The cure is to move the variable over to the stap_uprobes[] array. * tapsets.cxx (uprobe emit_module_decls): Add sdt_sem_address to stap_uprobe{} struct, to contain per-process relocated semaphore address. (emit_module_decls,_init): Remove tsk field, restore constness of appropriate locals. Activate uprobe semaphore right around uprobe activation time. Remove semaphore clearing upon process exit, since by then it's gone. (emit_module_exit): Use remembered relocated semaphore address to clean up. Fix "-uprobe" DEBUG_UPROBES message. * runtime.h: #include <linux/sched.h>. * dtrace.in (*_semaphore): Make it an unsigned short - intended 16 bits on all common architectures/multilibs.
* Fixed relay_old.c by providing ppoll().David Smith2009-09-182-9/+12
| | | | | | | * runtime/staprun/staprun.h: Put ppoll() declaration here (so that relay_old.c can use it). * runtime/staprun/relay.c (ppoll): Made ppoll() non-static so that relay_old.c can use it.
* Uprobes not currently supported on ia64.William Cohen2009-09-181-1/+0
|
* PR10595 Work around uprobe2 causing selinux failures for kernel 2.6.28+.Mark Wielaard2009-09-171-3/+32
| | | | | | | | | | We allocate a "fake" unlinked shmem file because anonymous memory might not be granted execute permission when the selinux security hooks have their way. Only do this for 2.6.28 or higher since shmem_file_setup() isn't exported before that. * runtime/uprobes2/uprobes.c (uprobe_setup_ssol_vma): Use shmem_file_setup to setup the ssol vma area when using 2.6.28+.