summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-04-012-0/+634
|\
| * PR4105: support up to 9 (up from 5) array index dimensionsFrank Ch. Eigler2009-04-012-0/+634
| | | | | | | | | | | | | | | | * runtime/map-gen.c, pmap-gen.c: Hand-expand arity 6..9 cases throughout. * testsuite/buildok/thirty.stp: New test. * testsuite/buildko/two.stp: New test. An Alan Smithee patch.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-311-0/+5
|\|
| * PR9998: new config and test filesWenji Huang2009-03-301-0/+5
| | | | | | | | | | | | * runtime/autoconf-x86-gs.c : New file. * testsuite/systemtap.base/x86_gs.exp : New test case. * testsuite/systemtap.base/x86_gs.stp : Ditto.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-302-17/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: aclocal.m4 configure testsuite/aclocal.m4 Also: 2009-03-30 Dave Brolley <brolley@redhat.com> * nsscommon.c (nssError): Handle SEC_ERROR_BAD_SIGNATURE. 2009-03-30 Dave Brolley <brolley@redhat.com> * modverify.c (verify_it): Print a message if the module may have been tampered with.
| * PR10001: Use the kernel's strlcpy & strlcatJosh Stone2009-03-261-16/+5
| | | | | | | | | | | | We had our own implementations of these which were triggering gcc bug38480 in some particular cases. It's easier for us to use the kernel's strlcpy and strlcat anyway, which avoids the bug.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-253-18/+39
|\| | | | | | | | | | | Conflicts: Makefile.in
| * Fix for CVE-2009-0784: stapusr module-path checking raceFrank Ch. Eigler2009-03-251-0/+9
| | | | | | | | | | * runtime/staprun/staprun_funcs.c (check_path): Save fully canonicalized and checked module path for later loading.
| * Revert "PR9940: avoid duplicated calling of uprobes in shared libraries"Frank Ch. Eigler2009-03-241-4/+2
| | | | | | | | | | | | | | | | | | | | This fix caused a regression on fedora. stap -ve 'probe process("/bin/ls").function("main") { log(pp()); } probe process("/lib64/libc.so.6").function("*") { log(pp()); }' \ -c /bin/ls hung (with stapio & ls processes spinning) upon startup.
| * itrace: zap "usr_itrace_init: completed for tid = NNNN" debug messageFrank Ch. Eigler2009-03-241-1/+2
| |
| * PR 9989 fix.David Smith2009-03-241-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-24 David Smith <dsmith@redhat.com> PR 9989. * runtime/task_finder.c (stap_utrace_detach): Ignores -EINPROGRESS. (stap_utrace_detach_ops): Ignores errors from stap_utrace_detach(), so that other tasks will get detached from this utrace engine. (__stp_utrace_attach): Better error handling from utrace_barrier(). (__stp_utrace_task_finder_target_quiesce): Ditto.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-2310-37/+548
|\|
| * PR9974: adapt to utrace_connected_engine -> utrace_engineFrank Ch. Eigler2009-03-225-0/+28
| | | | | | | | | | | | Adjusted all headers that #include <linux/utrace.h> to follow with: /* PR9974: Adapt to struct renaming. */
| * PR9821: staprun supports subset of strftime.Masami Hiramatsu2009-03-204-32/+232
| | | | | | | | | | Add strftime subset format support for output file name to systemtap. This format will be evaluated when opening a new output file.
| * PR6930: stapio: support file switchingMasami Hiramatsu2009-03-205-17/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add file-switching option(-S size[,N]) to stapio. This option has two arguments, 'size' and 'N', and requires -o option. - When the size of output file exceeds specified 'size'MB, staprun switches output file to the next file. For this purpose, all output file has a serial number as a suffix only when user specifies this option. - Using this option in bulk mode, the output file name will be 'FILE_cpuX.SERIAL'. - When the number of files exceeds specified N, staprun removes the oldest file. This argument can be omitted.
| * PR6930: stapio: run in background as a daemonMasami Hiramatsu2009-03-203-4/+84
| | | | | | | | | | | | | | Add '-D'(daemon mode) option to staprun/stapio for daemon mode. In this mode, stapio shows just its pid and detachs from console. Since it has no stdio, this mode requires -o option. stapio will exit when it receives SIGTERM or detects some error.
| * PR6930: staprun: supports error message to syslogMasami Hiramatsu2009-03-203-8/+33
| | | | | | | | | | Add an interface (eprintf) to output error messages to syslogd, because staprun has no stderr after detaching from console.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-201-2/+4
|\|
| * PR9940: avoid duplicated calling of uprobes in shared librariesWenji Huang2009-03-191-2/+4
| | | | | | | | | | | | | | Add map_p argument to __stp_call_vm_callbacks_with_vma to well tune the vma callback. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-194-9/+57
|\|
| * start of rhel5 compatibility for itraceFrank Ch. Eigler2009-03-192-2/+49
| |
| * add runtime/autoconf magic for itrace on pre-find_task_by_vpid kernelsFrank Ch. Eigler2009-03-191-0/+6
| |
| * Fix for spinlock bad magic error with itrace probe pointMaynard Johnson2009-03-181-6/+2
| |
| * Don't mutex_unlock in __stp_tf_get_vma_map_entry_internal.Mark Wielaard2009-03-181-1/+0
| | | | | | | | | | | | | | | | | | All callers of __stp_tf_get_vma_map_entry_internal lock and unlock the mutex correctly themselves in all cases. This unlock would trigger a double unlock. * runtime/task_finder_vma.c (__stp_tf_get_vma_map_entry_internal): Don't mutex_unlock(&__stp_tf_vma_mutex).
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-173-7/+7
|\|
| * Get the canonical path of the main file for comparison at runtime.Mark Wielaard2009-03-172-1/+2
| | | | | | | | | | | | | | | | | | When given directly by the user through -d or in case of the kernel name and path might differ. path should be used for matching. * runtime/sym.h (_stp_module): Add path field. * runtime/task_finder.c (__stp_tf_vm_cb): Use module path to compare vm_path. * translate.cxx (dump_unwindsyms): Output canonical path.
| * PR9951: Prevent GCC warnings in deref()Josh Stone2009-03-161-6/+5
| | | | | | | | | | | | | | | | | | In some configurations, GCC was warning about a possible use of _v in the deref macros. I could not reproduce the error, but the only case where _v is not written is if lookup_bad_addr rejects the address, in which case we will hit DEREF_FAULT and _v won't be used. Now we're priming _v=0 anyway, so GCC has no right to complain...
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-167-23/+86
|\|
| * Move vma module tracking from pr6866 branch to master.Mark Wielaard2009-03-152-7/+45
| | | | | | | | | | | | | | | | | | | | | | | | * tapsets.cxx (utrace_derived_probe_group::emit_module_decls): Always emit vm callback probe for __stp_tf_vm_cb. * runtime/task_finder.c (__stp_tf_vm_cb): Always expose, move _stp_dbug statements under ifdef DEBUG_TASK_FINDER_VMA. Find and record corresponding module when vm_path not NULL. * runtime/task_finder_vma.c (struct __stp_tf_vma_entry): Add _stp_module. (stap_add_vma_map_info): Add _stp_module argument and assign. (__stp_tf_get_vma_entry_addr): New static function to get the __stp_tf_vma_entry given an address.
| * Move lookup_bad_addr call in STAPCONF_PROBE_KERNELJosh Stone2009-03-131-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With most of the implementations, kread/kwrite call deref/store_deref, and so it makes sense to have lookup_bad_addr in the latter as an underlying address check. However, in the STAPCONF_PROBE_KERNEL case that uses probe_kernel_read and probe_kernel_write, the roles are reversed, so lookup_bad_addr needs to be in kread/kwrite. Also note that __deref_bad and __store_deref_bad should only be used in cases that can be determined at compile time. These turn into invalid symbols which prevent the module from loading. (They might be better replaced with compile-time assertions.)
| * PR9947: move runtime cleanup out of the work queueJosh Stone2009-03-134-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | The kernel lockdep checking found a possible deadlock if a forced rmmod tried to destroy _stp_work_queue at the same time that the work queue was unregistering tracepoints. An unlikely scenario, but still possible. Now the work queue will just issue a STP_REQUEST_EXIT down to usermode, and usermode will echo back an STP_EXIT that triggers the actual probe cleanup. This way the unregistrations are happening in exactly the same context as the registrations were.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-03-168-118/+153
|\| | | | | | | | | | | | | | | | | Conflicts: Makefile.in main.cxx stap-find-servers stap-start-server
| * Adapt to linux-next commit changing __alloc_percpu API.Frank Ch. Eigler2009-03-082-22/+9
| | | | | | | | | | After linux-next commit f2a8205c, it takes two parameters again, so we autoconf for it rather than use KERNEL_VERSION ifdefs.
| * stap autoconf test for kernel stack trace supportTim Moore2009-03-044-6/+27
| | | | | | | | | | | | | | | | | | | | * buildrun.cxx (compile_pass): Add autoconf line for stack trace test, which defines STAPCONF_KERNEL_STACKTRACE. * runtime/autoconf-save-stack-trace.c: New file. * runtime/stack.c : Use STAPCONF_KERNEL_STACKTRACE instead of tests for kernel configuration and versions. * runtime/stack-i386.c : ditto * runtime/stack-x86_64.c : ditto
| * This patch updates the itrace code to support the new utrace interface.Maynard Johnson2009-03-031-29/+117
| | | | | | | | | | It also adds a private copy of access_process_vm to runtime/itrace.c since that function is not consistently exported by all distros.
| * PR9875: Remove sduprobesWenji Huang2009-03-031-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | Impact: cleanup Since sdt.h is in git tree, sduprobes is no longer needed. * Makefile.am: Remove sduprobes. * Makefile.in: Regenerated. * doc/Makefile.in: Ditto. * runtime/sduprobes.c: Removed. Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
* | 2009-03-12 Dave Brolley <brolley@redhat.com>Dave Brolley2009-03-124-55/+357
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * util.cxx (remove_file_or_dir): New function. * util.h (remove_file_or_dir): New function. * systemtap.spec (stap): Add stap-env, stap-gen-cert, stap-authorize-cert, and stap-authorize-signing-cert. (stap-client): Remove stap-find-or-start-server, stap-add-server-cert. Add stap-authorize-server-cert. (stap-server): Add stap-find-servers, stap-find-or-start-server, stap-authorize-server-cert. Remove stap-gen-server-cert. * stap-find-servers: Source stap-env. Use $stap_avahi_service_tag. (initialization): Set timeout to 10. (find_servers): Run avahi-browse in the background and wait for it. Use a temp file for the output of avahi-browse. Kill avahi-browse if the timeout expires. (match_server): Set read timeout. (fatal): New function. * stap-find-or-start-server: Source stap-env. Use $stap_exec_prefix. Always exit with 0. * stap-start-server: Source stap-env. Check for the server PID as a running process and for avahi-publish-service running as a child in order to verify that the server is ready. * stap-add-server-cert: Renamed to stap-authorize-server-cert. Source stap-env. Call stap-authorize-cert. * stap-client: Source stap-env. Use $stap_user_ssl_db and $stap_root_ssl_db. Use $stap_tmpdir_prefix_client, $stap_tmpdir_prefix_server. Use $stap_exec_prefix. (configuration): Removed. (staprun_running): Removed. (interrupt): Don't kill staprun. * stap-server: Source stap-env. Use $stap_user_ssl_db and $stap_root_ssl_db. Use $stap_tmpdir_prefix_client, $stap_tmpdir_prefix_server. Use $stap_exec_prefix. (configuration): Removed. * session.h (systemtap_session): Add cert_db_path. * runtime/staprun/staprun_funcs.c (config.h): #include it. (modverify.h): #include it. (check_signature): New function. (check_groups): New function extracted from check_permissions. (check_permissions): Call check_groups and check_signature. * runtime/staprun/mainloop.c (cleanup_and_exit): Pass modpath to staprun, not modname. * main.cxx (main): Initialize cert_db_path. Handle LONG_OPT_SIGN_MODULE. Save the module signature if the module was signed and is being saved. (LONG_OPT_SIGN_MODULE): #define it. (long_options): Add --sign-module. * cache.cxx (config.h): #include it. (add_to_cache): Add the module signature file to the cache if the module has been signed. * buildrun.cxx (modsign.h): #include it. (compile_pass): Call sign_module, if requested. * configure.ac: Define HAVE_NSS if NSS libraries are available. * Makefile.am (AM_CPPFLAGS): Add -DSYSCONFDIR. (bin_SCRIPTS): Add stap-env, stap-gen-cert, stap-authorize-cert, stap-authorize-signing-cert, stap-authorize-server-cert. Remove stap-gen-server-cert, stap-add-server-cert. (stap_SOURCES): Add nsscommon.c, modsign.cxx (stap_CPPFLAGS): Add $(nss_CFLAGS), $(nspr_CFLAGS). (stap_LDADD): Add -lnss3. (staprun_SOURCES): Add nsscommon.c. * modsign.cxx: New file. * modsign.h: New file. * nsscommon.c: New file. * nsscommon.h: New file. * runtime/staprun/modverify.c: New file. * runtime/staprun/modverify.h: New file. * stap-authorize-cert: New file. * stap-authorize-signing-cert: New file. * stap-env: New file. * Makefile.in: Regenerated. * aclocal.m4: Regenerated. * config.in: Regenerated. * configure: Regenerated. * doc/Makefile.in: Regenerated. * doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. * testsuite/aclocal.m4: Regenerated.
* Add selective use of _stp_time_init/kill (PR9822)Josh Stone2009-02-232-7/+7
| | | | | | | | Our gettimeofday runtime has frequent wakeups to stay in sync with kernel time, but this is wasted effort if gettimeofday is not used in the script. This patch moves the calls to _stp_time_init and _stp_time_kill into begin and end/error probes, which only get pulled in if one of the gettimeofday variants is called.
* Better <linux/debugfs.h> header file inclusion.David Smith2009-02-202-1/+2
| | | | | | | 2009-02-20 David Smith <dsmith@redhat.com> * debugfs.c: Added inclusion of linux/debugfs.h. * relayfs.h: Removed inclusion of linux/debugfs.h.
* Kill all ChangeLogsJosh Stone2009-02-193-4291/+0
| | | | | | Mark Wielaard, a dear friend of the departed, will be performing a song and dance at the funeral services to commemorate the joyous times that they had together.
* PR9866 band-aid: deactivate new CONFIG_STACKTRACE code for older kernelsFrank Ch. Eigler2009-02-184-5/+12
|
* Remove context argument from _stp_stack_print_fallback (PR 9860).William Cohen2009-02-182-4/+9
|
* Removed unused functions and variables.David Smith2009-02-1816-374/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-18 David Smith <dsmith@redhat.com> * io.c (_stp_log): Removed unused function. * map.c (_stp_cmp): Replace _stp_log() with dbug(). * mempool.c (_stp_mempool_resize): Removed unused function. * print.c (next_fmt): Removed unused function. * procfs.c: Removed unused variable '_stp_num_procfs_files'. * regs.c (_stp_ret_addr): Removed unused function. * string.c (_stp_text_str): Removed unused variable 'len'. * string.h: Removed unused variable '_stdout_' and function declaration for deleted function '_stp_vsprintf'. * sym.c: Removed unused variables. * unwind.c (_stp_create_unwind_hdr): Removed unused function. 2009-02-18 David Smith <dsmith@redhat.com> * control.c: Removed unused variable '_stp_current_buffers'. * procfs.c (_stp_set_buffers): Removed unused function. (_stp_register_ctl_channel_fs): Removed unused variables and label. * symbols.c (u32_swap): Removed unused function. (generic_swap): Ditto. (_stp_sort): Ditto. (_stp_section_is_interesting): Ditto. * transport.c (_stp_transport_init): Removed unused variable 'ret'.
* Move sdt.h to includes/sys and use in tests.Mark Wielaard2009-02-172-180/+4
|
* Reduced control channel code duplication.David Smith2009-02-176-270/+132
| | | | | | | | | | | | 2009-02-17 David Smith <dsmith@redhat.com> * control.c: Contains generic control channel functions. * procfs.c: Specific procfs control channel functions. All generic control channel functions moved to control.c. * debugfs.c: New file containing debugfs specific control channel functions. * control.h: New file. * transport.c: Updated file inclusion.
* sdt.h (STAP_PROBE): Take provider and probe as arguments.Mark Wielaard2009-02-162-1/+5
|
* Fix )( typo in sdt.h STAP_PROBE9 parm9.Mark Wielaard2009-02-162-1/+5
|
* Handle c++ static user probes via .probe, c via .label.Stan Cox2009-02-152-99/+51
|
* Fixed stack.c compile problems on systems with older kernels (like RHEL4).David Smith2009-02-132-0/+5
| | | | | | | 2009-02-13 David Smith <dsmith@redhat.com> * stack.c: Fixed compile problems on systems with older kernels (like RHEL4).
* Fixed transport/procfs.c for systems that use the old transport (RHEL4).David Smith2009-02-134-3/+19
| | | | | | | | | | | 2009-02-13 David Smith <dsmith@redhat.com> * procfs.c: Added macros to guard against multiple inclusion. 2009-02-13 David Smith <dsmith@redhat.com> * procfs.c: Added inclusion of ../procfs.c for _stp_mkdir_proc_module().