summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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 Frank Ch. Eigler <fche@elastic.org>fche2007-08-152-3/+7
| | | | * context.stp (cpuid, cpu): Use smp_processor_id().
* 2007-08-15 Martin Hunt <hunt@redhat.com>hunt2007-08-153-33/+11
| | | | | * Makefile.am: Removed stap_merge. * Makefile.in: Rebuilt.
* 2007-08-15 Martin Hunt <hunt@redhat.com>hunt2007-08-152-0/+106
| | | | * stap_merge.tcl: New.
* 2007-08-15 Martin Hunt <hunt@redhat.com>hunt2007-08-155-5/+5
| | | | * systemtap.printf/*b.exp: Use stap_merge.tcl.
* 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-141-39/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * Makefile.am: Added staprun_funcs.c and cap.c to staprun_SOURCES. Added -lcap to staprun_LDADD. Removed stp_check reference. Added stapio program. Staprun is now setuid. * Makefile.in: Rebuilt. * configure.ac: Version increase to 0.6 and checks for libcap availability. Removed stp_check reference. * configure: Regenerated. * stp_check.in: Removed. * systemtap.spec.in: Version increase to 0.6-1 and added BuildReq for libcap-devl (and removed sudo requirement). Added %pre script to create new groups. Staprun is now setuid. * NEWS: Added info on new security model. * INTERNALS: Removed sudo reference. * README.security: New file. * main.cxx (main): Make sure module name isn't too long. * hash.cxx: Moved MODULE_NAME_LEN define to hash.h. * hash.h: Moved MODULE_NAME_LEN define here from hash.cxx. * buildrun.cxx (run_pass): No longer runs staprun with "sudo". * stap.1.in: Removed sudo references and added information about the stapdev/stapusr groups. * staprun.8.in: Added information about module detaching and attaching. Removed sudo references and added information about the stapdev/stapusr groups. Removed reference to staprun needing to be run as root. Removed reference to removed '-u USERNAME' option. * .cvsignore: Removed stp_check and added stapio and stap_merge.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-1417-526/+1061
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge from setuid-branch. Changes also by Martin Hunt <hunt@redhat.com>. * Makefile.am: Added staprun_funcs.c and cap.c to staprun_SOURCES. Added -lcap to staprun_LDADD. Removed stp_check reference. Added stapio program. Staprun is now setuid. * Makefile.in: Rebuilt. * configure.ac: Version increase to 0.6 and checks for libcap availability. Removed stp_check reference. * configure: Regenerated. * stp_check.in: Removed. * systemtap.spec.in: Version increase to 0.6-1 and added BuildReq for libcap-devl (and removed sudo requirement). Added %pre script to create new groups. Staprun is now setuid. * NEWS: Added info on new security model. * INTERNALS: Removed sudo reference. * README.security: New file. * main.cxx (main): Make sure module name isn't too long. * hash.cxx: Moved MODULE_NAME_LEN define to hash.h. * hash.h: Moved MODULE_NAME_LEN define here from hash.cxx. * buildrun.cxx (run_pass): No longer runs staprun with "sudo". * stap.1.in: Removed sudo references and added information about the stapdev/stapusr groups. * staprun.8.in: Added information about module detaching and attaching. Removed sudo references and added information about the stapdev/stapusr groups. Removed reference to staprun needing to be run as root. Removed reference to removed '-u USERNAME' option. * .cvsignore: Removed stp_check and added stapio and stap_merge.
* 2007-08-14 David Smith <dsmith@redhat.com>dsmith2007-08-1410-13/+82
| | | | | | | | | | | | | | | | | Merge from setuid-branch. * configure.ac: Version increase to 0.6. * configure: Regenerated. * parseko/cmdline09.stp: Added new test for staprun command line options. * parseko/cmdline10.stp: Ditto. * parseko/cmdline11.stp: Ditto. * parseko/cmdline12.stp: Ditto. * parseko/cmdline13.stp: Ditto. * parseko/cmdline14.stp: Ditto. * systemtap.samples/args.exp: No longer necessary to use "sudo" to run staprun.
* 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.
* add entries to _sched_policy_str,_nfsctl_cmd_strwenji2007-08-132-1/+9
|
* 2007-08-10 Josh Stone <joshua.i.stone@intel.com>jistone2007-08-117-73/+95
| | | | | | | | | | | | | | | | | | | 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-08-10 Frank Ch. Eigler <fche@elastic.org>fche2007-08-102-2/+7
| | | | | From "Zhaolei" zhaolei@cn.fujitsu.com: * syscalls.stp (msync.return): Correct name variable.
* 2007-08-10 Frank Ch. Eigler <fche@elastic.org>fche2007-08-102-0/+7
| | | | | From "Zhaolei" zhaolei@cn.fujitsu.com: * aux_syscalls.stp (_sockopt_optname_str): Add SO_SND/RCVBUFFORCE.
* 2007-08-09 Frank Ch. Eigler <fche@elastic.org>fche2007-08-092-0/+11
| | | | | From Cai Fei <caifei@cn.fujitsu.com>: * aux_syscalls.stp (__fork_flags): Decode CLONE_VM, NEWNS, DETACHED.
* 2007-08-09 Frank Ch. Eigler <fche@elastic.org>fche2007-08-0915-7/+24
| | | | | PR 4718, from Eugeniy Meshcheryakov <eugen@debian.org>: * *.stp: Make all shell scripts lead with #! /usr/bin/stap
* 2007-08-09 Frank Ch. Eigler <fche@elastic.org>fche2007-08-092-1/+6
| | | | | From Lai Jiangshan <laijs@cn.fujitsu.com>: * translate.cxx (emit_module_exit): Use stp_warn for warning.
* 2007-08-09 William Cohen <wcohen@redhat.com>wcohen2007-08-094-8/+15
| | | | | | | | | * tapset/syscalls.stp (syscall.compat_execve, syscall.compat_execve.return): * tapset/syscalls2.stp (syscall.compat_sys_semtimedop, syscall.compat_sys_semtimedop.return): * tapset/i686/syscalls.stp (syscall.set_zone_reclaim, syscall.set_zone_reclaim.return): Make optional.
* * change License: tags to GPLv2+ to match the codefche2007-08-081-2/+2
|
* 2007-08-08 Frank Ch. Eigler <fche@elastic.org>fche2007-08-082-1/+6
| | | | | From "Zhaolei" zhaolei@cn.fujitsu.com: * aux_syscalls.stp (_sockopt_level_str): Correct level=1 string.
* 2007-08-07 Frank Ch. Eigler <fche@redhat.com>fche2007-08-0810-92/+185
| | | | | | | | | | | | | | | | PR 4846 * parse.cxx (input_put): New function, sort of like stdio ungetc. (input_get): Skip cursor position changing for input_put strings. (scan): Rework $.../@... substitution into character pasting. * parse.h: Corresponding changes. * util.h (lex_cast_qstring): Octal-quote unprintable characters. * stap.1.in, NEWS: Document new behaviour. 2007-08-07 Frank Ch. Eigler <fche@redhat.com> PR 4846 * parseko/preprocess13.stp, parseok/nineteen.stp, semok/twentyfive.stp: New tests.
* 2007-08-07 David Smith <dsmith@redhat.com>dsmith2007-08-076-5/+15
| | | | | | | | | | PR 4736 (partial fix) * systemtap.printf/end1b.exp: Changed 'FAIL' to 'fail', so the rest of the testsuite will continue. * systemtap.printf/mixed_outb.exp: Ditto. * systemtap.printf/out1b.exp: Ditto. * systemtap.printf/out2b.exp: Ditto. * systemtap.printf/out3b.exp: Ditto.
* thread_info is renamed to stack since kernel 2.6.22wenji2007-08-041-1/+1
|
* 2007-08-03 Martin Hunt <hunt@redhat.com>hunt2007-08-032-1/+5
| | | | * aux_syscalls.stp (__get_compat_argv): Add cast.
* Changed limit check in foreach loop.mmason2007-08-022-4/+7
|
* Changed pid to tid throughout. Changed delete method in decumulate().mmason2007-08-012-14/+18
|
* 2007-07-31 Martin Hunt <hunt@redhat.com>hunt2007-07-316-21/+55
| | | | * syscalls*: Move sys32_sysctl to arch dirs.
* 2007-07-31 Martin Hunt <hunt@redhat.com>hunt2007-07-312-2/+6
| | | | * clock.c (main): Change flags to hex.
* 2007-07-31 Martin Hunt <hunt@redhat.com>hunt2007-07-313-3/+17
| | | | | | * syscalls.stp (clack_nanosleep): Fix flags string. * syscalls2.stp: Fix typo.
* 2007-07-31 Martin Hunt <hunt@redhat.com>hunt2007-07-319-543/+708
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * */syscalls.stp: Added mmap functions. Continued moving common compatibility functions to the main tapset. * aux_syscalls.stp (_shmat_flags_str): New. (__get_compat_argv): New. * syscalls.stp (adjtimex): Just print hex argument. (compat_adjtimex): New. (clock_getres): Also probe compat_clock_getres. (clock_gettime): Also probe compat funcs. (compat_clock_nanosleep): New. (compat_execve): New. (fstatat): New. (get[e][gu]id): Also probe sys32. (getsockopt): Make optional. Also probe compat. (mmap, mmap2): These are arch-specific, so move to individual architecture subdirs. (compat_sys_msgctl): New. (compat_sys_msgrcv): New. (compat_sys_msgsnd): New. * syscalls.stp (pread32): Remove. It calls pread64 . (quotactl): Make optional. (recv): Probe correct function. (recvfrom): Fix args. (compat_sys_recvmsg): New. (semctl): Make optional. (compat_sys_semctl): New. (semget): Make optional. (semop): Make optional. (semtimedop): Make optional. (compat_sys_semtimedop): New. (send): Make optional. (sendmsg): Make optional. (compat_sys_sendmsg): New. (sendto): Make optional. (setsockopt): Make optional. Add compat. (shmat): New. (compat_sys_shmat): New. (shmctl): New. (compat_sys_shmctl): New. (shmdt): New. (shmget): New. (shutdown): Make optional. (socket): Make optional. (socketpair): Make optional. (swapoff): Make optional. (swapon): Make optional. (sysctl): Add probe on sys32.
* * add PRfche2007-07-311-0/+2
|
* 2007-07-31 Frank Ch. Eigler <fche@elastic.org>fche2007-07-312-22/+5
| | | | | * ppc64/syscalls.stp: Remove duplicate sys_request_key{,.return} aliases.
* fixed support for pread and pwrite for s390x. Added tests for pread and pwrite.dwilder2007-07-304-2/+33
|
* 2007-07-26 David Smith <dsmith@redhat.com>dsmith2007-07-263-1/+20
| | | | | | | PR 4295 * systemtap.samples/args.exp: Tests to make sure the '-m' option leaves a module in the current directory. * systemtap.base/cache.exp (stap_compile): Added cleanup.
* 2007-07-26 David Smith <dsmith@redhat.com>dsmith2007-07-263-3/+28
| | | | | | | PR 4295 * main.cxx (main): If '-m MODNAME' is used, the generated module is saved in the current directory. * stap.1.in: Updated '-m' description.
* 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.
* Another fix for PR4836.mmason2007-07-252-5/+8
|
* Fixes for PR4836.mmason2007-07-256-13/+40
|
* 2007-07-17 Martin Hunt <hunt@redhat.com>hunt2007-07-182-2/+6
| | | | * poll.c (main): Don't hardcode fd.
* socket.stp: changed initialization of *num2str arrays to foreach loops.mmason2007-07-172-169/+13
|
* 2007-07-16 Martin Hunt <hunt@redhat.com>hunt2007-07-162-2/+4
| | | | (compat_sys_io_submit): Fix typo.
* 2007-07-16 Martin Hunt <hunt@redhat.com>hunt2007-07-163-0/+12
| | | | | * select.c (main): Ifdef SYS_pselect6. * poll.c (main): Ifdef SYS_ppoll.
* 2007-07-16 Martin Hunt <hunt@redhat.com>hunt2007-07-163-0/+73
| | | | * select.c, poll.c: New.
* 2007-07-16 Martin Hunt <hunt@redhat.com>hunt2007-07-165-316/+369
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * syscalls.stp (compat_sys_fcntl64, compat_sys_fcntl): Add. (compat_sys_fstatfs64): Add. (compat_sys_getdents, compat_sys_getdents64): Add. (compat_sys_ioctl): Add. (compat_sys_io_getevents): Add. (compat_sys_io_setup): Add. (compat_sys_io_submit): Add. * syscalls2.stp (compat_sys_nfsservctl): Add. (sys_openat): Add. (sys_ppoll): Add; (compat_sys_ppoll): Add. (sys32_pread64): Add. (sys32_pwrite32): Add. (sys_pwrite64): Print quoted string. (sys_pselect6, compat_sys_pselect6): Add. (sys_pselect7, compat_sys_pselect7): Add. (compat_sys_old_readdir): Add. (sys_select): Don't try to print fd_sets. (compat_sys_select): Add. (compat_sys_statfs64): Add. * ppc/syscalls.stp: Remove duplicated probes. * aux_syscalls.stp (_nfsctl_cmd_str): New. (_fd_set_u): Removed. Not used.
* 2007-07-12 David Smith <dsmith@redhat.com>dsmith2007-07-122-1/+10
| | | | | | * systemtap.maps/pmap_agg_overflow.exp: On single processor systems, this test reported an unsupported test and a test failure when it should have only reported an unsupported test. Fixed.
* 2007-07-11 William Cohen <wcohen@redhat.com>wcohen2007-07-112-3/+27
| | | | * systemtap.spec.in: Make sqlite support selectable.
* 2007-07-11 Frank Ch. Eigler <fche@elastic.org>fche2007-07-115-7/+18
| | | | | | | * configure.ac: Don't AC_MSG_ERROR if don't HAVE_LIBSQLITE3. * coveragedb.cxx: Compile to nothing unless HAVE_LIBSQLITE3. * main.cxx: Print no error message on -q if HAVE_LIBSQLITE3. * configure: Regenerated, looks rosier with HAVE_LIBSQLITE3.
* 2007-07-11 Eugene Teo <eteo@redhat.com>eteo2007-07-112-0/+72
| | | | | | * tcp.stp (tcp_sockstate_str, tcp_sockopt_str, tcp_setsockopt): New. Also added sockopt and sockstate lookup tables.
* 2007-07-10 Martin Hunt <hunt@localhost.localdomain>hunt2007-07-112-2/+7
| | | | | * systemtap.context/context.exp: Copy modules to /lib/modules/`uname -r`/kernel for debug info.