summaryrefslogtreecommitdiffstats
path: root/runtime/staprun/common.c
Commit message (Collapse)AuthorAgeFilesLines
* transport/symbol rework: kernel-only probes workingFrank Ch. Eigler2008-06-291-2/+7
|
* STP_RELOCATE message for kernel relocatability (re)adaption, starting ↵Frank Ch. Eigler2008-06-291-0/+25
| | | | implementation
* PR6008: Increase the limitation of the buffer size to 4095MB.Masami Hiramatsu2008-04-301-3/+3
|
* PR6451: avoid one class of staprun shutdown deadlock (module/.ctl filehandle ↵Frank Ch. Eigler2008-04-241-1/+1
| | | | = 0)
* Allow staprun to run on kernels without capabilities configured.Martin Hunt2008-04-221-1/+1
|
* Move send_request out of common.c because staprun no longer sends anything.Martin Hunt2008-04-221-22/+0
|
* Add documentation for staprun -d option.Martin Hunt2008-04-221-0/+3
|
* Change staprun to exec stapio. Add "-d" option to staprun.Martin Hunt2008-04-211-7/+6
|
* 2007-10-09 Martin Hunt <hunt@redhat.com>hunt2007-10-091-0/+19
| | | | | | | * common.c (set_clexec): New. * staprun.h: Add prototype for set_clexec. * relay*.c, ctl.c: Call set_clexec after file opens.
* PR 5709kenistoj2007-10-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | * main.cxx: Add pass 4.5: make uprobes.ko in runtime/uprobes * buildrun.cxx: Add uprobes_enabled() and make_uprobes(). Factor run_make_cmd() out of compile_pass(). * buildrun.h: Add uprobes_enabled and make_uprobes decls. * tapsets.cxx: Do correct #include for modprobed uprobes.ko; set need_uprobes in pass 2. * session.h: Add need_uprobes * runtime/staprun/common.c: Add -u option -> need_uprobes * runtime/staprun/staprun_funcs.c: Generalize insert_module() to support inserting uprobes.ko. * runtime/staprun/staprun.c: Add enable_uprobes(). insert_module call becomes insert_stap_module(). * runtime/staprun/staprun.h: Reflect insert_module() and need_uprobes changes * runtime/uprobes/*.[c,h]: uprobes is built as a module, rather than included into the source of the stap-generated module. * runtime/uprobes/Makefile: Added
* 2007-08-20 David Smith <dsmith@redhat.com>dsmith2007-08-201-0/+5
| | | | | | From Lai Jiangshan <laijs@cn.fujitsu.com> * common.c (parse_args): Make sure the '-c' and '-x' options can't be specified together.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-141-0/+307
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.