summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* 2007-09-21 Martin Hunt <hunt@redhat.com>hunt2007-09-212-1/+5
| | | | | From Alan Brunelle * control.c (_stp_ctl_read_cmd): Cast count to an int before printing.
* 2007-09-20 Martin Hunt <hunt@redhat.com>hunt2007-09-203-5/+9
| | | | | * transport.h: Increase default buffer size. * control.c (_stp_ctl_read_cmd): Check buffer size.
* 2007-09-19 Martin Hunt <hunt@redhat.com>hunt2007-09-192-3/+28
| | | | | | | | | | PR 5042 * procfs.c (_stp_rmdir_proc_module): Warn if removal of /proc/systemtap/module is deferred. Do not defer removal of /proc/systemtap. (_stp_mkdir_proc_module): Call path_release(). Set ownership of /proc/systemtap/module to force deletion to be deferred. (_stp_create_procfs): Set owner of all path components.
* Remove debug.hunt2007-09-141-1/+0
|
* 2007-09-14 Martin Hunt <hunt@redhat.com>hunt2007-09-142-6/+16
| | | | | * procfs.c (_stp_create_procfs): Be sure that directories in the path are really directories and not files.
* 2007-09-14 Martin Hunt <hunt@redhat.com>hunt2007-09-143-38/+14
| | | | | | | | | * ctl.c (init_ctl_channel): Return 1 if the ctl file opened was for the old relayfs transport. * mainloop.c (init_stapio): Don't call using_old_transport(). Use the return of init_ctl_channel() instead. (using_old_transport): Deleted.
* 2007-09-13 David Smith <dsmith@redhat.com>dsmith2007-09-132-10/+15
| | | | | | | | * procfs.c (_stp_procfs_dir_lookup): Added 'const' qualifier to 'dir' parameter. (_stp_create_procfs): Added 'const' qualifier to 'path' parameter. Removed debug prints. (_stp_close_procfs): Removed debug prints.
* 2007-09-12 Martin Hunt <hunt@redhat.com>hunt2007-09-128-144/+193
| | | | | | | | | | | | | | | | | | | | | | | * map-stat.c (_stp_map_new_hstat_log): Set buckets to HIST_LOG_BUCKETS. (_stp_pmap_new_hstat_log): Ditto. (_stp_map_new_hstat_linear): Call _stp_stat_calc_buckets(). (_stp_pmap_new_hstat_linear): Ditto. * stat.h (STP_MAX_BUCKETS): Define.. (HIST_LOG_BUCKETS): Define. * stat.c (_stp_stat_init): Call _stp_stat_calc_buckets(). * stat-common.c (_stp_stat_calc_buckets): New function. Common bucket calculation and error reporting code. (_stp_bucket_to_val): New function. (_stp_val_to_bucket): Renamed and now handles negative numbers. (_stp_stat_print_histogram): Handle negative values in log histograms. (__stp_stat_add): Cleanup.. * map-gen.c (_stp_map_new): Remove buckets param for HIST_LOG. * pmap-gen.c (_stp_pmap_new): Ditto.
* 2007-09-10 Martin Hunt <hunt@redhat.com>hunt2007-09-103-1/+185
| | | | * procfs.c: New file. Common runtime procfs functions.
* 2007-09-10 Martin Hunt <hunt@redhat.com>hunt2007-09-103-40/+22
| | | | | | | * procfs.c (_stp_register_ctl_channel): Call _stp_mkdir_proc_module(). (_stp_unregister_ctl_channel): Call _stp_rmdir_proc_module(). * transport.c: Include ../procfs.c runtime procfs functions.
* 2007-08-31 Martin Hunt <hunt@redhat.com>hunt2007-08-312-0/+2
| | | | | | * mainloop.c (start_cmd): Set the priority to forked processes back to normal. (system_cmd): Ditto.
* 2007-08-31 Martin Hunt <hunt@redhat.com>hunt2007-08-312-0/+8
| | | | | * mainloop.c (start_cmd): Set the priority to forked processes back to normal.
* 2007-08-24 Frank Ch. Eigler <fche@elastic.org>fche2007-08-251-0/+1
| | | | | | | * configure.ac: Check for proper $PROCFLAGS-dependent -lcap. * Makefile.am (staprun_LDADD): Use autoconf variable rather than -lcap literal. * configure, aclocal.m4, Makefile.in, config.in: Regenerated.
* 2007-08-21 Martin Hunt <hunt@redhat.com>hunt2007-08-212-3/+19
| | | | | * mainloop.c (start_cmd): Send SIGINT to target_cmd, not stapio.
* 2007-08-20 Martin Hunt <hunt@redhat.com>hunt2007-08-202-25/+4
| | | | * stack.c (_stp_kta): Removed.
* 2007-08-20 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2007-08-202-1/+6
| | | | | | | * ioblock.stp: Fix __bio_ino() not to access i_ino if the page is not assigned to any inode. * stack-x86_64.c: Fix backtrace to use the value of stack register instead of its address.
* 2007-08-20 David Smith <dsmith@redhat.com>dsmith2007-08-202-0/+11
| | | | | | From Lai Jiangshan <laijs@cn.fujitsu.com> * common.c (parse_args): Make sure the '-c' and '-x' options can't be specified together.
* *** empty log message ***hunt2007-08-191-0/+7
|
* 2007-08-17 Martin Hunt <hunt@redhat.com>hunt2007-08-173-1/+8
| | | | | | | | PR3857 From Masami Hiramatsu * utt.c (utt_subbuf_start_callback): Use overwrite flag. * control.c (_stp_ctl_open_cmd): Set overwrite_flag off. (_stp_ctl_close_cmd): Set overwrite flag on.
* 2007-08-17 Martin Hunt <hunt@redhat.com>hunt2007-08-172-4/+8
| | | | * bench2/bench.rb: Send HUP to stapio, instead of staprun.
* 2007-08-15 David Smith <dsmith@redhat.com>dsmith2007-08-152-1/+11
| | | | * staprun.c (main): Quit if effective uid is not root.
* 2007-08-15 Martin Hunt <hunt@redhat.com>hunt2007-08-153-2/+9
| | | | | | PR4736 * staprun.c (cleanup): Set priority back to normal before removing module.
* 2007-08-15 Martin Hunt <hunt@redhat.com>hunt2007-08-152-0/+106
| | | | * stap_merge.tcl: New.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-141-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * staprun.c (init_staprun): Drop CAP_SYS_ADMIN when we're done with it. (main): Calls parse_modpath instead of path_parse_modname. Just call parse_modpath with argv[optind]. Let it allocate and set modpath and modname. If no modulename was given, display usage and exit. Drop CAP_SYS_NICE when we're done with it. Set atexit(exit_cleanup) so cleanup always gets called and modules get removed. Call handle_symbols. (run_stapio): Set argv[0] to stapio so that it executes as itself instead of staprun. (cleanup): Only do cleanups once and only try to remove module when appropriate. (exit_cleanup): New. Calls cleanup(). (mountfs): Sets uid to root before making directory and then restores uid. (setup_ctl_channel): Uses DEBUGFS define and improved error message. (setup_relayfs): Ditto. (setup_oldrelayfs): Uses DEBUGFS and RELAYFS defines. (run_stp_check): Replaced by mountfs(). (mountfs): New function. Replaces an external script with C code. (init_staprun): Calls mountfs() instead of run_stp_check(). * staprun.h: Renamed path_parse_modname to parse_modpath. Added MODULE_NAME_LEN define. Added [_][p]err macros. Removed VERSION_CMD. * mainloop.c (cleanup_and_exit): Make sure initialized is 2 before exiting with code 2. (stp_main_loop): Set initialized to 2 when STP_TRANSPORT is received. Call cleanup_and_exit() with proper status. (start_cmd): exit 1 instead of -1. (system_cmd): Ditto. (init_staprun): Renamed init_stapio. (cleanup_and_exit): Set exit status. * cap.c: New file. * common.c: New file. * stapio.c: New file. * staprun_funcs.c: New file. * Makefile: Removed. * symbols.c (get_sections): Move the filter code up so that uninteresting section names are filtered out before attempting to open them. (do_kernel_symbols): Better detect overfow conditions and realloc new space. (do_module): After sending all modules, send a null message to indicate we are finished. * ctl.c (init_ctl_channel): When attempting to attach, if the control channel doesn't exist, print a better error message. * relay_old.c (init_oldrelayfs): Errors out if open_relayfs_files() couldn't open any files. PR 4795 * mainloop.c (send_request): Fixed buffer overflow check. * staprun.h: Added buffer overflow checking versions of strcpy/sprintf/snprintf. * common.c (path_parse_modname): Checks for overflows on strcpy/sprintf/snprintf. (read_buffer_info): Ditto. * ctl.c (init_ctl_channel): Ditto. * relay.c (init_relayfs): Ditto. * relay_old.c (open_relayfs_files): Ditto. (init_oldrelayfs): Ditto. * staprun_funcs.c (insert_module): Ditto. (check_path): Ditto. * symbols.c (get_sections): Ditto.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-148-57/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * control.c (_stp_ctl_write): Make sure we don't overflow. (_stp_ctl_open_cmd): Do not allow multiple opens of the control file. (_stp_ctl_write_cmd): Once STP_START is received, ignore everything except STP_EXIT. Create another state variable "initialized". Don't respond to STP_SYMBOLS or STP_MODULES unless initialized is 0. Also check that current pid is the same as the pid that did insmod. (_stp_register_ctl_channel): Bug fix - sets owner/group after checking for NULL. * procfs.c (_stp_ctl_write): Make sure we don't overflow. (_stp_ctl_open_cmd): Do not allow multiple opens of the control file. (_stp_ctl_write_cmd): Once STP_START is received, ignore everything except STP_EXIT. Create another state variable "initialized". Don't respond to STP_SYMBOLS or STP_MODULES unless initialized is 0. Also check that current pid is the same as the pid that did insmod. (_stp_register_ctl_channel): Set ownership of cmd file and percpu files for bulkmode. * relayfs.c (utt_trace_setup): Set ownership of percpu files. Improved error handling. (utt_trace_remove): Improved error checking. * utt.c (utt_remove_tree): Improved error checking. (utt_trace_cleanup): Ditto. (utt_create_buf_file_callback): Set file ownership. (utt_create_global_buf_file_callback): Set file ownership. * transport.h: Delcare _stp_uid, _stp_gid, and _stp_init_pid. * transport.c (_stp_transport_init): Set _stp_uid, _stp_gid, and _stp_init_pid.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-1412-483/+1596
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * staprun.c (init_staprun): Drop CAP_SYS_ADMIN when we're done with it. (main): Calls parse_modpath instead of path_parse_modname. Just call parse_modpath with argv[optind]. Let it allocate and set modpath and modname. If no modulename was given, display usage and exit. Drop CAP_SYS_NICE when we're done with it. Set atexit(exit_cleanup) so cleanup always gets called and modules get removed. Call handle_symbols. (run_stapio): Set argv[0] to stapio so that it executes as itself instead of staprun. (cleanup): Only do cleanups once and only try to remove module when appropriate. (exit_cleanup): New. Calls cleanup(). (mountfs): Sets uid to root before making directory and then restores uid. (setup_ctl_channel): Uses DEBUGFS define and improved error message. (setup_relayfs): Ditto. (setup_oldrelayfs): Uses DEBUGFS and RELAYFS defines. (run_stp_check): Replaced by mountfs(). (mountfs): New function. Replaces an external script with C code. (init_staprun): Calls mountfs() instead of run_stp_check(). * staprun.h: Renamed path_parse_modname to parse_modpath. Added MODULE_NAME_LEN define. Added [_][p]err macros. Removed VERSION_CMD. * mainloop.c (cleanup_and_exit): Make sure initialized is 2 before exiting with code 2. (stp_main_loop): Set initialized to 2 when STP_TRANSPORT is received. Call cleanup_and_exit() with proper status. (start_cmd): exit 1 instead of -1. (system_cmd): Ditto. (init_staprun): Renamed init_stapio. (cleanup_and_exit): Set exit status. * cap.c: New file. * common.c: New file. * stapio.c: New file. * staprun_funcs.c: New file. * Makefile: Removed. * symbols.c (get_sections): Move the filter code up so that uninteresting section names are filtered out before attempting to open them. (do_kernel_symbols): Better detect overfow conditions and realloc new space. (do_module): After sending all modules, send a null message to indicate we are finished. * ctl.c (init_ctl_channel): When attempting to attach, if the control channel doesn't exist, print a better error message. * relay_old.c (init_oldrelayfs): Errors out if open_relayfs_files() couldn't open any files. PR 4795 * mainloop.c (send_request): Fixed buffer overflow check. * staprun.h: Added buffer overflow checking versions of strcpy/sprintf/snprintf. * common.c (path_parse_modname): Checks for overflows on strcpy/sprintf/snprintf. (read_buffer_info): Ditto. * ctl.c (init_ctl_channel): Ditto. * relay.c (init_relayfs): Ditto. * relay_old.c (open_relayfs_files): Ditto. (init_oldrelayfs): Ditto. * staprun_funcs.c (insert_module): Ditto. (check_path): Ditto. * symbols.c (get_sections): Ditto.
* 2007-08-10 Josh Stone <joshua.i.stone@intel.com>jistone2007-08-112-14/+35
| | | | | | | | | | | | | | | | | | | PR 4593 * translate.cxx (c_unparser::emit_common_header): Add an error_buffer to the context to allow dynamic error messages. * tapsets.cxx (dwflpp::express_as_string): Let deref / store_deref fill in last_error with a detailed message. runtime/ * loc2c-runtime.h (deref, store_deref): Set an error message with the pointer value and name into last_error, since it's hard to determine the details once you've already jumped to deref_fault. tapset/ * conversions.stp (kernel_string, kernel_long, kernel_int, kernel_short, kernel_char, user_string_warn): Use the CONTEXT->error_buffer to create an error message instead of a static local array.
* 2007-07-26 Martin Hunt <hunt@redhat.com>hunt2007-07-262-1/+13
| | | | | | Spotted by Ming Chang. * procfs.c (_stp_register_ctl_channel): Fix iterator when removing proc entries when an error occurs.
* 2007-07-09 David Smith <dsmith@redhat.com>dsmith2007-07-092-1/+7
| | | | | * relay.c (init_relayfs): Fixed a buffer size bug introduced by the last change.
* 2007-07-09 David Smith <dsmith@redhat.com>dsmith2007-07-093-2/+8
| | | | | | * relay.c (init_relayfs): Make sure buffers are big enough to hold a full path. * relay_old.c (init_oldrelayfs): Ditto.
* 2007-07-09 David Smith <dsmith@redhat.com>dsmith2007-07-092-2/+8
| | | | | | * ctl.c (read_buffer_info): Make sure buffer is big enough to hold a full path. (init_ctl_channel): Ditto.
* 2007-07-09 Martin Hunt <hunt@redhat.com>hunt2007-07-092-1/+5
| | | | * sym.h (STP_MAX_MODULES): Raise limit to 256.
* 2007-07-09 Martin Hunt <hunt@redhat.com>hunt2007-07-092-3/+19
| | | | | | * symbols.c (_stp_ins_module): Check for overflow of modules array. (_stp_do_module): If _stp_ins_module() fails, return an error.
* 2007-07-06 Martin Hunt <hunt@redhat.com>hunt2007-07-063-5/+19
| | | | | | | | * stat-common.c (__stp_stat_add): Fix calculations for linear histogram buckets. * stat.c (_stp_stat_init): Check for interval too small.
* 2007-07-05 Eugene Teo <eteo@redhat.com>eteo2007-07-042-1/+5
| | | | * regs.c (_stp_print_regs): #ifdef CONFIG_CPU_CP15 instead.
* 2007-07-02 Frank Ch. Eigler <fche@rechat.com>fche2007-07-021-1/+1
| | | | | | | | | * staplog.c: New file from Satoru MORIYA <satoru.moriya.br@hitachi.com>, prototype crash(8) extension module. * configure.ac: Look for crash/defs.h. * Makefile.am: Build/install staplog.so shared library if found. * configure, Makefile, config.in, runtime/lket/b2a/Makefile.in: Regenerated.
* 2007-07-02 Martin Hunt <hunt@redhat.com>hunt2007-07-022-2/+9
| | | | | * symbols.c (get_sections): Set data pointer to the lowest address of any data section.
* 2007-07-02 Martin Hunt <hunt@redhat.com>hunt2007-07-024-115/+45
| | | | | | | | * sym.c (_stp_kallsyms_lookup): Improve heuristic for determining when a pointer is in a function. (_stp_func_print): New function. * stack-i386.c, stack-x86_64.c: Remove obsolete unwind code. Use _stp_func_print().
* 2007-07-02 Martin Hunt <hunt@redhat.com>hunt2007-07-022-2/+80
| | | | | | * symbols.c (_stp_do_symbols): Set "data" pointer for kernel to _etext. (_stp_sort): New. sort function from the kernel. (_stp_load_module_symbols): Use _stp_sort().
* 2007-06-22 Frank Ch. Eigler <fche@elastic.org>fche2007-06-222-5/+19
| | | | | * string.c (_stp_text_str): Fix handling of embedded " and \ characters.
* 2007-06-21 David Smith <dsmith@redhat.com>dsmith2007-06-212-55/+67
| | | | * lket/b2a/Makefile.in: Regenerated with automake 1.10.
* *** empty log message ***hunt2007-06-211-1/+1
|
* 2007-06-21 Martin Hunt <hunt@redhat.com>hunt2007-06-213-0/+12
| | | | | * control.c (_stp_ctl_write_cmd): Add support for STP_BULK. * transport_msgs.h (enum): Add STP_BULK.
* 2007-06-21 Martin Hunt <hunt@redhat.com>hunt2007-06-212-3/+12
| | | | * relay.c (init_relayfs): Send message to check for bulkmode.
* 2007-06-20 Martin Hunt <hunt@redhat.com>hunt2007-06-202-9/+42
| | | | | | * stap_merge.c (main): Add verbose option. Will realloc buffer if current size is too small. Check return codes from writes so gcc won't complain.
* Fix mode in procfs cmd file.hunt2007-06-182-2/+2
|
* 2007-06-18 Martin Hunt <hunt@redhat.com>hunt2007-06-182-1/+5
| | | | * control.c (_stp_register_ctl_channel): Fix mode of cmd file.
* 2007-06-15 Martin Hunt <hunt@redhat.com>hunt2007-06-154-8/+151
| | | | | | | From Quentin Barnes. * loc2c-runtime.h: Latest arm marcos. * stack-arm.c (__stp_stack_print): Add a cast. * regs.c (_stp_ret_addr): Define for arm.
* Fix minor issue with change for bz4075. The initial fix caused a lot ofananth2007-06-111-1/+1
| | | | | | test failures on powerpc. Thanks to Srinivasa for tracking the problem down.
* 2007-06-07 Martin Hunt <hunt@redhat.com>hunt2007-06-072-2/+14
| | | | | * relay_old.c (open_relayfs_files): Add support for output file names (-o) with bulk (relayfs) mode.