| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The former code allowed stapio to have two concurrent commands sent
toward the runtime at the same time: one from the main loop and
another one from the signal handling thread. This is suspected to
have caused occasional lockups. This new code switches to a deferred
signal handling model, where the signal handling thread merely
increments a counter, and the main loop monitors that count.
Unfortunately, this currently involves switching the main loop's
blocking /.ctl read into a nonblocking poll.
* runtime/staprun/mainloop.c (pending_interrupts): New variable.
(signal_thread): Increment it.
(stp_main_loop): Check it.
|
|
|
|
|
| |
* runtime/staprun/mainloop.c (stp_main_loop): When a read error happens,
quit instead of retrying (which can end up in an infinite loop).
|
|
|
|
| |
* modverify.c (verify_module): Print some messages for verbose > 1.
|
|\ |
|
| |
| |
| |
| |
| | |
* runtime/staprun/relay.c (reader_thread): Check switch_file thread flags
inside inner read-write loop. And clear the flags after switching file.
|
|/ |
|
|
|
|
| |
changes.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Currently staprun fails at send_relocation_kernel(), this is because
ppc32 doesn't have ".__start" symbol. I think we should use _stext,
just as other arches.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
|
|/ |
|
|
|
|
|
| |
* runtime/staprun/staprun_funcs.c (assert_stap_module_permissions): Mark
parameters unused.
|
|
|
|
| |
canonicalizing /lib/modules/KVER/systemtap.
|
|\ |
|
| | |
|
|/ |
|
|
|
|
| |
limited to members of stapusr.
|
|
|
|
| |
database.
|
|
|
|
| |
Update comments to clearly explain the security issues involved.
|
|
|
|
|
|
|
|
| |
messages within verify_it with the use of a 'module_name'
parameter passed in.
Add a comment in insert_module explaining why it's ok to
overwrite the 'path' parameter with the canonicalized path.
|
|
|
|
|
|
|
|
|
|
|
| |
This allows insert_module to to be used for loading the signed uprobes.ko
module.
Allow the use of $$parms and $$return in uprobes based probes for
unprivileged users.
Re-add management of module signatures in the cache. Don't know why
it was removed.
|
| |
|
|
|
|
| |
Create home directory manually for stap-server.
|
|
|
|
|
| |
* runtime/staprun/mainloop.c (stp_main_loop): Switched to unbuffered
output (instead of line buffered output).
|
|
|
|
|
|
| |
This patch just make the RC=1 when any output line starts with ERROR:.
Also some minors error that was returning 0 instead of 1 were fixed.
|
|
|
|
|
|
|
|
| |
* transport/control.c (*_cmd): Return -Ecodes rather than "-1" from
file_operations callbacks.
* staprun/ctl.c (init_ctl_channel): Return distinct error codes.
* staprun/staprun.c (remove_module): Skip connection attempt to .ctl
file; just do delete_module() with O_NONBLOCK.
|
|
|
|
|
| |
* mainloop.c (cleanup_and_exit): Remove non-BUG9788_WORKAROUND
branch. Remove execlp branch. Pass -v to staprun-d if verbose.
|
|
|
|
|
|
|
| |
* runtime/staprun/mainloop.c (signal_usr1): Renamed from signal_dontcare.
Sets a new variable, usr1_interrupt.
(start_cmd): Avoids pause() race condition by switching to blocking
SIGUSR1, then waiting on SIGUSR1 with sigsuspend().
|
|
|
|
|
| |
* staprun_funcs.c (assert_permissions): Move "check_signature_rc"
variable inside #if HAVE_NSS.
|
|
|
|
|
|
| |
Pending advice from Frank and Dave, changed check_permission to return void and
renamed it to assert_permission. assert_permission simply returns if
permissions are okay, and calls exit(-1) if there are any permissions errors.
|
|
|
|
|
|
|
| |
* runtime/staprun/staprun.h: Put ppoll() declaration here (so that
relay_old.c can use it).
* runtime/staprun/relay.c (ppoll): Made ppoll() non-static so that
relay_old.c can use it.
|
|
|
|
|
|
|
|
|
|
|
| |
* runtime/staprun/relay_old.c (switch_oldoutfile): New function for file
switching.
(process_subbufs): Use switch_oldoutfile.
(reader_thread): Use ppoll() instead of poll() for receiving SIGUSR2
and switch output file when receiving a signal(SIGUSR2).
(switchfile_handler): Send SIGUSR2 signal to reader threads for file
switching.
(init_oldrelayfs): Assign switchfile_handler to SIGUSR2.
|
|
|
|
|
|
|
|
|
|
| |
* runtime/staprun/relay.c (switch_outfile): New function for file switching.
(reader_thread): Don't assign empty_handler to SIGUSR2, and switch output
file when receiving signal(SIGUSR2) on ppoll.
(switchfile_handler): Send SIGUSR2 signal to reader threads for file
switching.
(init_relayfs): Assign switchfile_handler to SIGUSR2.
* staprun.1.in: Add FILE SWITCHING BY SIGNAL section.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With old relayfs, out_fd is used only when non-bulk mode. However,
open_oldoutfile and open_relayfs_files open files with fopen and
set only percpu_tmpfile. This will cause a problem with -S option,
that out_fd will be closed when the file size reaches fsize_max
and new fd will be opened only on percpu_tmpfile.
So, out_fd should be synchronized with percpu_tmpfile.
* runtime/staprun/relay_old.c (open_oldoutfile): Set fd of output file
to out_fd[cpu].
(open_relayfs_files): Ditto.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-09-03 Dave Brolley <brolley@redhat.com>
* tapsets.cxx (visit_cast_op): Don't disallow unprivileged users.
Annotate synthesized function with /* unprivileged */.
* tapset-utrace.cxx (register_tapset_utrace): Call allow_unprivileged
for process begin and end probes.
* translate.cxx (translate_pass): Generate '#define STP_PRIVILEGED 1'
unless --unprivileged was specified.
* runtime/transport/transport.c: Don't define _stp_unprivileged_user.
* runtime/task_finder.c (__stp_utrace_attach_match_filename): Check
that _stp_uid equals the task euid when STP_PRIVILEGED is not defined.
(stap_start_task_finder): Likewise.
* runtime/staprun/staprun.c (insert_stap_module): Don't generate
module option _stp_unprivileged_user.
|
|
|
|
| |
check_permissions.
|
|
|
|
| |
* runtime/staprun/staprun.c (enable_uprobes): insmod, not insert_module().
|
|
|
|
| |
certificates does not exist. It just means that the signed module is untrusted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* modverify.c (staprun.h): #include it.
(verify_it): Now accepts module data and signature data as arguments.
Don't open and read the signature here. Don't read the module here.
(verify_module): Now accepts module data as argument. Read the signature
once here.
* modverify.h (verify_module): Now accepts module data as argument.
* staprun.c (main): Don't call check_permissions here.
* staprun.h (check_permissions): Prototype removed.
* staprun_funcs.c (check_permissions): Now static. Accepts module data
as argument. Pass module data to check_signature.
(insert_module): Canonicalize the module path early here. Call
check_permissions here, passing it the mapped module data.
(check_signature): Now accepts module data as argument. Pass the module
data to verify_module.
(check_path): Use the already-canonicalized module path.
|
|
|
|
|
|
|
| |
* runtime/staprun/staprun_funcs.c (check_permissions): Declare
check_signature_rc outside HAVE_NSS block.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
|
|\
| |
| |
| |
| |
| | |
Conflicts:
cache.cxx
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* cache.cxx (add_to_cache,clean_cache): add static markers
* main.cxx (main): likewise
* runtime/staprun/common.c (send_request): likewise
* runtime/staprun/mainloop.c (stp_main_loop): likewise
* runtime/staprun/staprun.c (remove_module): likewise
* runtime/staprun/staprun.h: include sdt.h
* runtime/staprun/staprun_funcs.c (insert_module): likewise
* util.cxx (stap_system): likewise
* tapset/stap_staticmarkers.stp: new file
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* runtime/staprun/common.c (make_outfile_name): Moved from relay.c, fix not to
open /dev/null.XXX output files, and add 'bulk' argument for bulkmode.
* runtime/staprun/relay.c (make_outfile_name): Moved to common.c.
* runtime/staprun/relay_old.c (open_oldoutfile): Fix to use fopen() and store
FILE * to percpu_tmpfile[cpu].
|
| |\ |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
runtime/print.c
runtime/transport/transport.c
runtime/transport/transport_msgs.h
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
2009-04-02 David Smith <dsmith@redhat.com>
* runtime.h: Defines STP_TRANSPORT_VERSION instead of STP_OLD_TRANSPORT.
* staprun/staprun.h (STP_OLD_TRANSPORT): Ditto.
* print.c: Changed STP_OLD_TRANSPORT to STP_TRANSPORT_VERSION.
* staprun/mainloop.c (stp_main_loop): Ditto.
* transport/transport.c: Ditto.
* transport/transport.h: Ditto.
* transport/transport_msgs.h: Ditto.
* transport/utt.h: Ditto.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't generate an error message for unsigned modules.
Make sure module signature exists before attempting to copy to the cache.
Allow timer p[robes for unprivileged users.
|
|\ \ \ \
| | |_|/
| |/| | |
|
| | |/
| |/|
| | |
| | |
| | | |
This is needed for run-stap so that stapio and all child processes can
run as the originally invoking user instead of root.
|