| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Spotted by Ming Chang.
* procfs.c (_stp_register_ctl_channel): Fix iterator when removing
proc entries when an error occurs.
|
|
|
|
|
| |
* relay.c (init_relayfs): Fixed a buffer size bug introduced by
the last change.
|
|
|
|
|
|
| |
* relay.c (init_relayfs): Make sure buffers are big enough to hold
a full path.
* relay_old.c (init_oldrelayfs): Ditto.
|
|
|
|
|
|
| |
* ctl.c (read_buffer_info): Make sure buffer is big enough to hold
a full path.
(init_ctl_channel): Ditto.
|
|
|
|
| |
* sym.h (STP_MAX_MODULES): Raise limit to 256.
|
|
|
|
|
|
| |
* symbols.c (_stp_ins_module): Check for overflow of
modules array.
(_stp_do_module): If _stp_ins_module() fails, return an error.
|
|
|
|
|
|
|
|
| |
* stat-common.c (__stp_stat_add): Fix calculations
for linear histogram buckets.
* stat.c (_stp_stat_init): Check for interval too
small.
|
|
|
|
| |
* regs.c (_stp_print_regs): #ifdef CONFIG_CPU_CP15 instead.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* symbols.c (get_sections): Set data pointer to the lowest address
of any data section.
|
|
|
|
|
|
|
|
| |
* 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().
|
|
|
|
|
|
| |
* 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().
|
|
|
|
|
| |
* string.c (_stp_text_str): Fix handling of embedded
" and \ characters.
|
|
|
|
| |
* lket/b2a/Makefile.in: Regenerated with automake 1.10.
|
| |
|
|
|
|
|
| |
* control.c (_stp_ctl_write_cmd): Add support for STP_BULK.
* transport_msgs.h (enum): Add STP_BULK.
|
|
|
|
| |
* relay.c (init_relayfs): Send message to check for bulkmode.
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
* control.c (_stp_register_ctl_channel): Fix mode of cmd file.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
test failures on powerpc.
Thanks to Srinivasa for tracking the problem down.
|
|
|
|
|
| |
* relay_old.c (open_relayfs_files): Add support for
output file names (-o) with bulk (relayfs) mode.
|
|
|
|
|
|
| |
PR 4075 fix from Ananth Mavinakayanahalli
* string.h (_stp_get_user): Define.
* string.c (_stp_text_str): Use _stp_get_user().
|
|
|
|
|
|
|
| |
* mainloop.c (cleanup_and_exit): Disable signals
while exiting.
(fatal_handler): Use return values from write() to
avoid warnings.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch from Quentin Barnes.
* arith.c: Add arm support for 64-bit division.
* copy.c: Enable arm support.
* loc2c-runtime.h: Ditto.
* regs.[ch]: Ditto.
* stack.c: Include stack-arm.c.
* stack-arm.c: New file.
* time.c (_stp_gettimeofday_ns): hack
for arm. See PR 4569.
|
|
|
|
|
|
| |
PR 4458
* print_new.c (_stp_print_flush): Use interrupt-disabling
spinlock variants.
|
|
|
|
|
|
|
|
| |
PR 2224
* map.h (NEED_MAP_LOCKS): New config macro, defaults to 0.
(MAP_GET_CPU, MAP_PUT_CPU): Wrappers, default to ~no-op.
* map.c (_stp_pmap_clear,agg): Use them.
* pmap-gen.c (_stp_pmap_new,set,add,get_cpu,get,del): Ditto.
|
|
|
|
| |
* mainloop.c (cleanup_and_exit): Fix typo.
|
|
|
|
| |
* mainloop.c (init_staprun): Change dbug() call.
|
|
|
|
|
| |
* relay.c: Fix ppoll() call and some race conditions involving
signals.
|
| |
|
|
|
|
|
| |
* vsprintf.c: Add comment about %p.
* regs.c, stack*.c, sym.c: Fix %p calls.
|
| |
|
|
|
|
|
|
| |
* control.c: Change default buffer number and size.
(_stp_ctl_write): Add debug statements. Check size of
message to avoid overwriting buffer.
|
|
|
|
|
| |
* relay.c (reader_thread): Set timeout for streaming to
200ms.
|
|
|
|
|
| |
* relay.c (reader_thread): For bulk mode, set timeout to NULL
so ppoll never times out.
|
|
|
|
|
| |
* relay.c (ppoll): Add a compatibility function for
glibc < 2.4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signal handler cleanup.
* mainloop.c (fatal_handler): New. Cleanly handle
unexpected fatal signals.
(setup_main_signals): New. Set signals once mainloop
is entered.
(setup_signals): New. Block certain signals during initialization.
Set handler for fatal signals.
* relay.c (reader_thread): Use ppoll(). Terminate on
SIGUSR2 after reading any remaining data.
(close_relayfs): Remove sleep hack. Send SIGUSR2 to all threads.
Runtime debug messages.
* staprun.h: Change dbug() to accept a debuglevel and
enable it.
* *.c: Modify dbug() calls.
|
|
|
|
|
|
| |
Patch from David Smith
* mainloop.c (stp_main_loop): Properly handle write()
return value. Fixes build problem with some compilers.
|
|
|
|
| |
* runtime.h: Improve check for debugfs in kernel.
|
|
|
|
| |
* utt.h (struct utt_trace): Remove sequence.
|
|
|
|
|
|
|
| |
* utt.c (utt_trace_cleanup): Remove free of utt->sequence.
(utt_dropped_open): PR 4415. Use STAPCONF_INODE_PRIVATE to detect
correct inode struct.
(utt_trace_setup): Do not allocate utt->sequence.
|
|
|
|
|
|
|
|
|
|
|
| |
PR 4432.
* buildrun.cxx (compile_pass): Tweak autoconf CFLAGS handling to
avoid macro recursion but still get the needed -I directives.
Add the inode-private autoconf test.
2007-04-27 Frank Ch. Eigler <fche@elastic.org>
* autoconf-inode-private.c: New file from hunt.
|
| |
|
| |
|
|
|
|
|
| |
* runtime/lket/b2a/lket_b2a.c: Fix percpu files parsing
for percpu_header transport changes.
|