]> sourceware.org Git - systemtap.git/log
systemtap.git
10 years agoNEWS: add blurb about .callees probes
Jonathan Lebon [Tue, 18 Feb 2014 21:19:18 +0000 (16:19 -0500)]
NEWS: add blurb about .callees probes

10 years agocallee.exp: new testcase for callee probes
Jonathan Lebon [Fri, 7 Feb 2014 15:49:02 +0000 (10:49 -0500)]
callee.exp: new testcase for callee probes

This testcase tests all the aspects callee probes have to handle, such
as inlined functions, exported functions, nested [inlined] functions,
and relocation.

10 years agocolor_parsing.exp: adjust installtest check
Jonathan Lebon [Fri, 7 Feb 2014 15:46:59 +0000 (10:46 -0500)]
color_parsing.exp: adjust installtest check

10 years agoman/stapprobes.3stap: re-structure and add .callee[s]
Jonathan Lebon [Wed, 5 Feb 2014 19:54:40 +0000 (14:54 -0500)]
man/stapprobes.3stap: re-structure and add .callee[s]

Information about .callee[s] probes was added.

The paragraph containing variants and modifiers was getting heavy, so it
was made into a list instead.

10 years agomake .callee[s] probes only trigger when called from target callers
Jonathan Lebon [Tue, 18 Feb 2014 22:13:52 +0000 (17:13 -0500)]
make .callee[s] probes only trigger when called from target callers

Here, we prefix a block to the callee's probe handler to only pass
through if all the callers up the chain match with the current stack.
For .callee("func") probes, we simply add a check for [u]stack(1) ==
"func". For .callees(N) probes, we add a check that the N callers up the
callstack match those iterate_over_callees() found during static
analysis.

These checks are done at runtime by the caller_match() tapset function,
which calls _stp_[uk]module_relocate() to get the relocated address of
the expected caller and _stp_stack_[user|kernel]_get() to get the
unwinding address in the wanted stack frame.

10 years agoimplement iterate_over_callees()
Jonathan Lebon [Tue, 28 Jan 2014 19:51:07 +0000 (14:51 -0500)]
implement iterate_over_callees()

In this patch, we actually implement iterate_over_callees(). This
function looks for inlined subroutines or GNU_call_sites and calls the
callback for each found. The query_callee() callback for now simply does
a query_statement on the callee found. Logic is added in the next patch
to limit probing to calls from caller only.

10 years agoregister .callee[s[(N)]] variants
Jonathan Lebon [Tue, 28 Jan 2014 19:43:42 +0000 (14:43 -0500)]
register .callee[s[(N)]] variants

Here, we register three variants:

- function.callee(STR)
- function.callees
- function.callees(NUM), where NUM >= 1

10 years agoallow arbitrary callback arg for iterate_over_functions()
Jonathan Lebon [Tue, 28 Jan 2014 19:41:40 +0000 (14:41 -0500)]
allow arbitrary callback arg for iterate_over_functions()

This type-unsafe transformation will be corrected (along with all others
of this kind) in an upcoming patch.

10 years agonfsd-recent.stp: New sample script
Frank Ch. Eigler [Wed, 19 Feb 2014 15:22:41 +0000 (10:22 -0500)]
nfsd-recent.stp: New sample script

10 years agoAdd a rpm require on 'mokutil' when needed.
David Smith [Tue, 18 Feb 2014 21:19:13 +0000 (15:19 -0600)]
Add a rpm require on 'mokutil' when needed.

* systemtap.spec: Make the client subpackage require 'mokutil' when
  needed.
* session.cxx (get_mok_info): Remove 'FIXME' comment about needing to
  require 'mokutil'.

10 years agoPR16603: correct time drift on fluctuating-cpufreq unsync-tsc boxes
Frank Ch. Eigler [Tue, 18 Feb 2014 20:03:21 +0000 (15:03 -0500)]
PR16603: correct time drift on fluctuating-cpufreq unsync-tsc boxes

* runtime/time.c: Restructure the per-cpu base_ns/base_cycles logic so
  a common function is used during initialization, the regular timer
  callback, and the irregular cpufreq callback (via an IPI there).

10 years agoBetter fix for improved key security while generating new MOKs.
David Smith [Mon, 17 Feb 2014 16:47:02 +0000 (10:47 -0600)]
Better fix for improved key security while generating new MOKs.

* stap-serverd.cxx (generate_mok): Instead of manually changing
  permissions on the newly generated private key, just set the umask.

10 years agoMerge branch 'dsmith/secure-boot' into master.
David Smith [Mon, 17 Feb 2014 16:32:36 +0000 (10:32 -0600)]
Merge branch 'dsmith/secure-boot' into master.

Add the capability of module signing for secure boot purposes into the
stap compile server.

10 years agostapdyn: Print dynprobe flags as hex in debug messages
Josh Stone [Sat, 15 Feb 2014 01:25:55 +0000 (17:25 -0800)]
stapdyn: Print dynprobe flags as hex in debug messages

10 years agostapdyn: Reorganize utrace probing, and get end-by-exec working
Josh Stone [Sat, 15 Feb 2014 01:25:12 +0000 (17:25 -0800)]
stapdyn: Reorganize utrace probing, and get end-by-exec working

* mutatee.cxx (mutatee::exec_reset_instrumentation): Save process.end
  probes into exec_proc_end_probes, and clear the rest of attached_probes.
  (mutatee::call_utrace_dynprobes): Take a whole vector of probes, and do
  the lookup for utrace_enter_function here.
  (mutatee::find_attached_probes): Return the vector directly.
  (mutatee::thread_callback): Use find_attached_probes, and pass that to
  call_utrace_dynprobes as is.
  (mutatee::begin_callback): Ditto.
  (mutatee::exit_callback): Ditto, except treat exec specially.
  (mutatee::instrument_dynprobes): Don't try to deal with exec here,
  because the stap module probably isn't ready yet.
* mutator.cxx (mutator::exec_callback): Call mutatee::exit_callback.
  (mutator::exit_callback): Align the fake-local probe hits to work more
  similarly to mutatee::exit_callback.

10 years agostapdyn: Enable following exec with Dyninst 8.2
Josh Stone [Fri, 14 Feb 2014 22:52:48 +0000 (14:52 -0800)]
stapdyn: Enable following exec with Dyninst 8.2

10 years agostapdyn: Report PIDs in mutatee debug messages
Josh Stone [Fri, 14 Feb 2014 22:46:45 +0000 (14:46 -0800)]
stapdyn: Report PIDs in mutatee debug messages

10 years agopstree: Apply DOT escapes to all strings
Josh Stone [Fri, 14 Feb 2014 18:28:53 +0000 (10:28 -0800)]
pstree: Apply DOT escapes to all strings

10 years agoImprove key security while generating new MOKs.
David Smith [Fri, 14 Feb 2014 16:23:45 +0000 (10:23 -0600)]
Improve key security while generating new MOKs.

* stap-serverd.cxx (generate_mok): Manage temporary directory permissions
  so that no one can read the private key until we fix its permissions.

10 years agoAdd an additional PR16570 fix for ia64.
David Smith [Fri, 14 Feb 2014 14:57:12 +0000 (08:57 -0600)]
Add an additional PR16570 fix for ia64.

* testsuite/systemtap.syscall/nd_syscall.exp (test_procedure): Kfail the
  module compliation on ia64 since ia64 doesn't have kprobe.function
  support.

10 years agoRegenerate examples index
Josh Stone [Thu, 13 Feb 2014 20:16:41 +0000 (12:16 -0800)]
Regenerate examples index

10 years agoAdd process/pstree.stp example
Josh Stone [Thu, 13 Feb 2014 20:14:44 +0000 (12:14 -0800)]
Add process/pstree.stp example

This generates a process diagram in DOT form.  For instance, it may be
useful on a 'make' command to see all the processes that are started.

10 years agoFix PR16580 by decoding the 'protocol' argument of 'syscall.socket{pair}'.
David Smith [Thu, 13 Feb 2014 19:54:35 +0000 (13:54 -0600)]
Fix PR16580 by decoding the 'protocol' argument of 'syscall.socket{pair}'.

* tapset/linux/aux_syscalls.stp (_sock_protocol_str): New function.
* tapset/linux/syscalls2.stp: Decode the 'protocol' argument in
  syscall.socket and syscall.socketpair with _sock_protocol_str().
* tapset/linux/nd_syscalls2.stp: Ditto.
* testsuite/systemtap.syscall/socket.c: New test.
* testsuite/systemtap.syscall/socketpair.c: Updated test to expect decoded
  'protocol' arguments.
* testsuite/systemtap.syscall/net1.c: Ditto.

10 years agoCheck directories exist before sym linking runtime-java helpers
Lukas Berk [Thu, 13 Feb 2014 16:18:18 +0000 (11:18 -0500)]
Check directories exist before sym linking runtime-java helpers

* systemtap.spec - When we're linking libHelperSDT_*.so and
    HelperSDT.jar we need to make sure that the openjdk
 dirs we're linking to actually exist if yum/openjdk
 failed to remove the base dir on an openjdk upgrade.

10 years agoman error::reporting: highlight stap-report
Frank Ch. Eigler [Thu, 13 Feb 2014 15:13:18 +0000 (10:13 -0500)]
man error::reporting: highlight stap-report

10 years agoman error::buildid: expand blurbage
Frank Ch. Eigler [Thu, 13 Feb 2014 15:09:35 +0000 (10:09 -0500)]
man error::buildid: expand blurbage

10 years agofind_and_build: set from_glob for globby functors
Jonathan Lebon [Wed, 12 Feb 2014 21:43:47 +0000 (16:43 -0500)]
find_and_build: set from_glob for globby functors

We don't want to create suggestions for probe points created from globby
functors (e.g. syscall.*). Otherwise, we'll be creating a lot of
overhead calculating levenshtein distances for no reason.

10 years agoRHBZ 847285: Don't allow 'systemctl reload'.
Dave Brolley [Wed, 12 Feb 2014 21:03:51 +0000 (16:03 -0500)]
RHBZ 847285: Don't allow 'systemctl reload'.

'reload' is not supported by the stap-server script. The
ExecReload line in stap-server.service was calling
'stap-server restart' which stops the server and starts a
new one. This behavior is not expected or tolerated by systemd
which promptly sends SIGKILL to the new server.

We cannot supported 'reload' in systemctl. Note that 'restart'
is supported and works properly.

10 years agoAdded rename()/renameat() testcase and prevent more syscall nesting.
David Smith [Wed, 12 Feb 2014 20:53:21 +0000 (14:53 -0600)]
Added rename()/renameat() testcase and prevent more syscall nesting.

* testsuite/systemtap.syscall/rename.c: New testcase for rename() and
  renameat().
* tapset/linux/syscalls2.stp: Prevent syscall nesting in syscall.open,
  and syscall.renameat.
* tapset/linux/nd_syscalls2.stp: Ditto.
* tapset/linux/syscalls.stp: Prevent syscall nesting in syscall.mkdirat.
* tapset/linux/nd_syscalls.stp: Ditto.
* runtime/linux/compat_unistd.h: Add __NR_compat defines.

10 years agoFix PR16570 by speeding up the syscall.exp/nd_syscall.exp testcases.
David Smith [Wed, 12 Feb 2014 18:58:41 +0000 (12:58 -0600)]
Fix PR16570 by speeding up the syscall.exp/nd_syscall.exp testcases.

* testsuite/systemtap.syscall/syscall.exp: Compile the module once.
* testsuite/systemtap.syscall/nd_syscall.exp: Ditto.
* testsuite/systemtap.syscall/test.tcl (run_one_test): Use staprun to load
  the previously compiled module.

10 years agoloc2c.c (translate): Add unhandled error case for DW_OP_GNU_entry_value.
Mark Wielaard [Wed, 12 Feb 2014 16:59:15 +0000 (17:59 +0100)]
loc2c.c (translate): Add unhandled error case for DW_OP_GNU_entry_value.

We don't handle DW_OP_GNU_entry_value in location expressions. This gives
a nicer error message when we encounter it in an expression.

10 years agoFix syscall.rt_sigreturn{.return} for ia64.
David Smith [Tue, 11 Feb 2014 20:59:30 +0000 (14:59 -0600)]
Fix syscall.rt_sigreturn{.return} for ia64.

10 years agoFix permissions on testsuite/buildok/scheduler-cpu_on.stp.
David Smith [Tue, 11 Feb 2014 18:59:13 +0000 (12:59 -0600)]
Fix permissions on testsuite/buildok/scheduler-cpu_on.stp.

10 years agoUpdate the list of kfailed tests in buildok.exp.
David Smith [Tue, 11 Feb 2014 18:12:06 +0000 (12:12 -0600)]
Update the list of kfailed tests in buildok.exp.

10 years agoSmall scheduler tapset testsuite fixes.
David Smith [Tue, 11 Feb 2014 18:07:57 +0000 (12:07 -0600)]
Small scheduler tapset testsuite fixes.

* testsuite/buildok/scheduler-cpu_on.stp: New file.
* testsuite/buildok/scheduler-detailed.stp: Moved 'scheduler.cpu_on' test
  to scheduler-cpu_on.stp.
* testsuite/buildok/scheduler-migrate.stp: Removed unneeded
  '__scheduler.migrate.kp' test.

10 years agoMake 'signal.checkperm.return' optional, since it can be inlined.
David Smith [Tue, 11 Feb 2014 18:03:58 +0000 (12:03 -0600)]
Make 'signal.checkperm.return' optional, since it can be inlined.

* tapset/linux/signal.stp: On some kernels, check_kill_permission() can be
  only inlined, so make 'signal.checkperm.return' optional.
* testsuite/buildok/signal-detailed.stp: Make the
  'signal.checkperm.return' test optional

10 years agoFix PR16557 by improving the vm.mmap probe alias.
David Smith [Tue, 11 Feb 2014 17:38:03 +0000 (11:38 -0600)]
Fix PR16557 by improving the vm.mmap probe alias.

* tapset/linux/memory.stp (vm.mmap): Improve probe alias by probing
  do_mmap_pgoff() (when available) instead of do_mmap(), which can be
  always inlined.

10 years agoFix PR16555 by fixing task.stp on rawhide.
David Smith [Tue, 11 Feb 2014 15:13:37 +0000 (09:13 -0600)]
Fix PR16555 by fixing task.stp on rawhide.

* tapset/linux/task.stp: Add CONFIG_USER_NS support to task_gid(),
  task_egid(), task_uid(), task_euid().

10 years agoAdditional PR16540 fix. Fix using @cast when scsi support is in a module.
David Smith [Mon, 10 Feb 2014 23:11:31 +0000 (17:11 -0600)]
Additional PR16540 fix. Fix using @cast when scsi support is in a module.

* tapset/linux/scsi.stp: For kernels where scsi support is in a module,
  like on RHEL5, fix @cast() in the 'scsi.iodone' probe alias.

10 years agoFix kernels that have CONFIG_USER_NS, but uid/gids are still simple values.
David Smith [Mon, 10 Feb 2014 23:08:13 +0000 (17:08 -0600)]
Fix kernels that have CONFIG_USER_NS, but uid/gids are still simple values.

* buildrun.cxx (compile_pass): Add an export test for "from_kuid_munged".
* runtime/linux/runtime.h: If we don't have "from_kuid_munged", define our
  own from_kgid_munged()/from_kgid_munged() that do nothing.

10 years agoAdditional PR16541 fix. Fix using @cast when nfsd is in a module.
David Smith [Mon, 10 Feb 2014 21:20:58 +0000 (15:20 -0600)]
Additional PR16541 fix. Fix using @cast when nfsd is in a module.

* tapset/linux/nfsd.stp: For kernels where nfsd is in a module (like on
  RHEL5), fix @cast() in new __rqstp_uid() and __rqstp_gid() functions.

10 years agodelete initscript/README.stap-server
Jonathan Lebon [Mon, 10 Feb 2014 20:47:25 +0000 (15:47 -0500)]
delete initscript/README.stap-server

The large majority of information in README.stap-server was already part
of the stap-server(8) man page. A few examples and clarifications were
transferred over.

- initscript/README.stap-server: delete it
- man/stap-server.8: incorporate some of the examples from the README
  and some clarifications
- systemtap.spec: remove README.stap-server from $files list
- NEWS: add blurb about removal

10 years agoFix PR16541 by updating the nfsd.stp tapset.
David Smith [Mon, 10 Feb 2014 19:07:09 +0000 (13:07 -0600)]
Fix PR16541 by updating the nfsd.stp tapset.

* tapset/linux/nfsd.stp: Two fixes. Handle kernels with CONFIG_USER_NS,
  whose uids/gids aren't simple types. In nfsd.close, handle the inlined
  case were we can't find the argument.

10 years agodoc/langref.tex: drop some 'experimental' qualifiers
Frank Ch. Eigler [Mon, 10 Feb 2014 17:54:42 +0000 (12:54 -0500)]
doc/langref.tex: drop some 'experimental' qualifiers

Regex-matching and macros are not experimental any more.

10 years agoFix PR16542 by updating the rpc tapset.
David Smith [Mon, 10 Feb 2014 16:18:34 +0000 (10:18 -0600)]
Fix PR16542 by updating the rpc tapset.

* tapset/linux/rpc.stp: Handle the removal of the rpc_clnt 'cl_protname' field.

10 years agoFix PR16540 by adding scsi tracepoint support to the scsi.iodone probe alias.
David Smith [Mon, 10 Feb 2014 15:59:21 +0000 (09:59 -0600)]
Fix PR16540 by adding scsi tracepoint support to the scsi.iodone probe alias.

* tapset/linux/scsi.stp (scsi.iodone): Use the "scsi_dispatch_cmd_done"
  tracepoint when available.

10 years agoNEWS: blurb about README change
Jonathan Lebon [Mon, 10 Feb 2014 15:21:19 +0000 (10:21 -0500)]
NEWS: blurb about README change

10 years agoautoreconf
Jonathan Lebon [Mon, 10 Feb 2014 15:21:26 +0000 (10:21 -0500)]
autoreconf

10 years agoman/systemtap.8.in: new man page to replace README
Jonathan Lebon [Mon, 10 Feb 2014 15:20:56 +0000 (10:20 -0500)]
man/systemtap.8.in: new man page to replace README

This man page replaces the README.systemtap text file. The content is
almost the same. A lot of rephrasing, some restructuring, and some
clarifications that weren't present in the original document.

- man/systemtap.8.in: new man page
- initscript/README.systemtap: remove it
- initscript/systemtap.in: add hint to man page

- configure.ac: add man/systemtap.8.in in AC_CONFIG_FILES macro
- man/Makefile.am: add systemtap.8 to man_MANS
- systemtap.spec: replace README by man page in systemtap-initscript pkg
  $files list

10 years agoruntime: linux 3.14 porting: preempt_enable_no_resched
Frank Ch. Eigler [Sat, 8 Feb 2014 03:07:46 +0000 (22:07 -0500)]
runtime: linux 3.14 porting: preempt_enable_no_resched

Kludge for linux commit 62b94a08da1bae9d187d49dfcd6665af393750f8:
sched/preempt: Take away preempt_enable_no_resched() from modules

We may well not need to use the _no_resched variant in modern kernels,
and reasons for using it at all are not well documented.  TODO rethink.

10 years agoruntime: linux 3.14 porting: userns: Remove UIDGID_STRICT_TYPE_CHECKS
Frank Ch. Eigler [Sat, 8 Feb 2014 02:50:59 +0000 (21:50 -0500)]
runtime: linux 3.14 porting: userns: Remove UIDGID_STRICT_TYPE_CHECKS

Adapt to linux commit 261000a56b6382f597bcb12000f55c9ff26a1efb
by using CONFIG_USER_NS as trigger for our *id*munged treatment
instead of CONFIG_UIDGID_STRICT_TYPE_CHECKS.

10 years agoRemove the transport's unused "dropped" file.
David Smith [Fri, 7 Feb 2014 16:27:14 +0000 (10:27 -0600)]
Remove the transport's unused "dropped" file.

* runtime/transport/relay_v2.c: Unless _STP_USE_DROPPED_FILE is defined,
  don't bother creating the unused "dropped" file.

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Mon, 3 Feb 2014 19:11:13 +0000 (13:11 -0600)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

10 years agoCompile fix for runtime/vma.c.
David Smith [Mon, 3 Feb 2014 19:09:38 +0000 (13:09 -0600)]
Compile fix for runtime/vma.c.

* runtime/vma.c (_stp_vma_exec_cb): Add cast to avoid compiler error.

10 years agoNEWS: clarify kprocess.exec change
Jonathan Lebon [Fri, 31 Jan 2014 16:06:40 +0000 (11:06 -0500)]
NEWS: clarify kprocess.exec change

10 years agoAdd the ability for the server to generate MOKs.
David Smith [Thu, 30 Jan 2014 22:35:49 +0000 (16:35 -0600)]
Add the ability for the server to generate MOKs.

* stap-serverd.cxx (generate_mok): New function.
  (handleRequest): Call generate_mok() when needed.

10 years agoVarious server cleanups related to MOK handling.
David Smith [Wed, 29 Jan 2014 19:27:40 +0000 (13:27 -0600)]
Various server cleanups related to MOK handling.

* stap-serverd.cxx (inotify_callback): Simplified.
  (avahi_publish_service): Open the inotify file in non-blocking
  mode. Create the server mok directory if needed.
  (mok_sign_file): Return a bool to let callers know if it worked.
  (handleRequest): If MOK signing failed, tell the client to not load the
  resulting module.

10 years agoRemove global list of server MOK fingerprints.
David Smith [Wed, 29 Jan 2014 16:04:33 +0000 (10:04 -0600)]
Remove global list of server MOK fingerprints.

* stap-serverd.cxx (mok_dir_valid_p): Extract code from
  initialize_server_moks().
  (get_server_mok_fingerprints): The remains of initialize_server_moks().
  (create_services): Call get_server_mok_fingerprints() instead of
  initialize_server_moks().
  (initialize_server_moks): Removed.
  (handleRequest): Don't use global list of server MOKs. Instead, check
  presence of client fingerprints on the fly.

10 years agoWatch the server MOK directory for changes.
David Smith [Wed, 29 Jan 2014 14:21:59 +0000 (08:21 -0600)]
Watch the server MOK directory for changes.

* stap-serverd.cxx (create_services): Refresh the server MOK info.
  (inotify_callback): New function.
  (avahi_cleanup): Cleanup the inotify watch.
  (avahi_publish_service): Watch the server MOK directory for any
  changes.
  (initialize_server_moks): Clear out the old MOK info. Don't bother
  initializing NSS (since it will already be initialzied from the new call
  site).
  (initialize): Let create_services() find the list of MOKs.

10 years agoSimplify server MOK handling.
David Smith [Tue, 28 Jan 2014 16:56:23 +0000 (10:56 -0600)]
Simplify server MOK handling.

* stap-serverd.cxx: Convert the server MOK map into a vector of
  fingerprints. Calculate the full directory name as needed.

10 years agoMake the server send a MOK public cert to the client when needed.
David Smith [Tue, 28 Jan 2014 16:32:22 +0000 (10:32 -0600)]
Make the server send a MOK public cert to the client when needed.

* csclient.cxx (compile_server_client::process_response): If the server
  returns a MOK public certificate, copy it to the user's current
  directory.
* stap-serverd.cxx (handleRequest): If the server has no MOK in common
  with the client, send it one for the client to install.

10 years agodoc/SystemTap_Beginners_Guide/en-US/Installation.xml: update for rhel7
Martin Cermak [Mon, 27 Jan 2014 09:07:11 +0000 (10:07 +0100)]
doc/SystemTap_Beginners_Guide/en-US/Installation.xml: update for rhel7

10 years agoman/stapprobes.3stap: mention nd_syscall.* family
Frank Ch. Eigler [Sat, 25 Jan 2014 15:01:26 +0000 (10:01 -0500)]
man/stapprobes.3stap: mention nd_syscall.* family

10 years agosystemtap.syscall/signal.c doesn't test getpid(), so don't claim that it does.
David Smith [Fri, 24 Jan 2014 21:01:52 +0000 (15:01 -0600)]
systemtap.syscall/signal.c doesn't test getpid(), so don't claim that it does.

10 years agoImprove 'syscall.rt_sigpending' and 'nd_syscall.rt_sigpending' probe aliases.
David Smith [Fri, 24 Jan 2014 21:01:04 +0000 (15:01 -0600)]
Improve 'syscall.rt_sigpending' and 'nd_syscall.rt_sigpending' probe aliases.

* tapset/linux/syscalls2.stp (syscall.rt_sigpending): Add better 32-bit on
  64-bit support.
* tapset/linux/nd_syscalls.stp: Ditto.
* testsuite/systemtap.syscall/rt_signal.c: Added rt_sigpending() tests.

10 years agoLimit systemd-tmpfiles --create to just our own
Josh Stone [Fri, 24 Jan 2014 19:38:31 +0000 (11:38 -0800)]
Limit systemd-tmpfiles --create to just our own

See also rhbz1043212.

10 years agoMake the server better handle client requests where there is no matching MOK.
David Smith [Fri, 24 Jan 2014 19:20:35 +0000 (13:20 -0600)]
Make the server better handle client requests where there is no matching MOK.

* stap-serverd.cxx (handleRequest): Don't error out too soon if the server
  doesn't have a MOK that matches the client.

10 years agoDon't enable stap-server.service by default
Josh Stone [Fri, 24 Jan 2014 17:53:53 +0000 (09:53 -0800)]
Don't enable stap-server.service by default

10 years agoUpdated testsuite/systemtap.syscall/coverage.tcl.
David Smith [Fri, 24 Jan 2014 15:59:43 +0000 (09:59 -0600)]
Updated testsuite/systemtap.syscall/coverage.tcl.

10 years agoSimplify MOK fingerprint advertisement.
David Smith [Thu, 23 Jan 2014 22:11:17 +0000 (16:11 -0600)]
Simplify MOK fingerprint advertisement.

* stap-serverd.cxx (create_services): Instead of "mok_infoN" keys, just
  use a single key ("mok_info") with multiple values.
* csclient.cxx (get_values_from_avahi_string_list): New function.
  (resolve_callback): Expect multiple values with the same "mok_info"
  key.

10 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Thu, 23 Jan 2014 20:46:38 +0000 (14:46 -0600)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

10 years agoFix syscall nesting in 'syscall.close' and add a socketpair testcase.
David Smith [Thu, 23 Jan 2014 20:30:49 +0000 (14:30 -0600)]
Fix syscall nesting in 'syscall.close' and add a socketpair testcase.

* tapset/linux/syscalls.stp: Fix syscall nesting in 'syscall.close'.
* tapset/linux/nd_syscalls.stp: Ditto.
* runtime/linux/compat_unistd.h: Added '__NR_compat_close.
* testsuite/systemtap.syscall/socketpair.c: New syscall.exp testcase.

10 years agoDon't bother keeping up with MOK issuers and serial numbers.
David Smith [Thu, 23 Jan 2014 17:14:03 +0000 (11:14 -0600)]
Don't bother keeping up with MOK issuers and serial numbers.

* csclient.cxx: Instead of keeping up with MOK issuer, serial number, and
  fingerprints, just handle fingerprints.
* stap-serverd.cxx: Ditto.
* nsscommon.cxx (read_cert_info_from_file): Only return the cert's
  fingerprint.
* nsscommon.h: Update read_cert_info_from_file() prototype.
* session.h: Rename 'mok_info' to 'mok_fingerprints'.
* session.cxx (systemtap_session): Ditto.
* buildrun.cxx (make_run_command): Ditto.

10 years agopplabel(): clarify usage and rename to pnlabel()
Jonathan Lebon [Wed, 22 Jan 2014 21:32:28 +0000 (16:32 -0500)]
pplabel(): clarify usage and rename to pnlabel()

10 years agoPR16478: add pplabel() tapset function
Jonathan Lebon [Wed, 22 Jan 2014 19:04:02 +0000 (14:04 -0500)]
PR16478: add pplabel() tapset function

The pplabel() tapset function simply parses the label for which the
event fired by parsing the probe name.

* tapset/pn.stp: add pplabel() function
* labels.exp: strengthen expect block and add test for pplabel()

10 years agoInitial MOK signed module support.
David Smith [Wed, 22 Jan 2014 20:56:12 +0000 (14:56 -0600)]
Initial MOK signed module support.

* buildrun.cxx (make_run_command): If we're using signed modules, we can't
  rename modules.
* csclient.cxx (compile_server_info::operator==): Compare MOK fingerprints.
  (compile_server_client::create_request): If needed, send a MOK
  fingerprint file of valid MOKs to the server.
  (operator <<): Output MOK info.
  (get_or_keep_compatible_server_info): If the client requires secure boot
  signing, make sure the server has the right MOK.
  (resolve_callback): Process MOK info in the avahi advertisement.
* nsscommon.cxx (read_cert_info_from_file): New function.
* nsscommon.h: Add read_cert_info_from_file() declaration.
* session.cxx (systemtap_session::check_options): If the kernel is using
  signed modules, enforce server use.
  (systemtap_session::modules_must_be_signed): New function.
  (systemtap_session::get_mok_info): Ditto.
* session.h: Add new function declarations.
* stap-serverd.cxx (process_r): Keep track of kernel build dir.
  (create_services): Advertise server MOK information.
  (initialize_server_moks): New function.
  (initialize): Call initialize_server_moks() to get list of MOKs the
  server knows about.
  (get_client_mok_fingerprints): New function.
  (mok_sign_file): Ditto.
  (handleRequest): Match up client and server MOKs. Sign module.

10 years agostring.stp: fix str_replace() return
Jonathan Lebon [Wed, 22 Jan 2014 14:01:57 +0000 (09:01 -0500)]
string.stp: fix str_replace() return

Unfortunately, we can't use STAP_RETURN() here because we've been
gradually building STAP_RETVALUE from multiple concatenations so using
STAP_RETURN() would overwrite the hard work.

10 years agotestsuite: adjust tests for new probing powers
Jonathan Lebon [Tue, 21 Jan 2014 21:21:31 +0000 (16:21 -0500)]
testsuite: adjust tests for new probing powers

Since we can now probe more functions (such as _start,
register_tm_clones), a few tests need to be adjusted.

* rep_ret.exp

  Get rid of 'bad' var and handle the case where main is not the first
  line printed out (which is now _start).

* process_by_cmd.exp

  Change wildcard probe (which now picks up too many functions) for
  multiple probe points targetting only the functions we want.

* exelib.exp

  Same as process_by_cmd.exp

10 years agoPR16478: always use dwarf for labels
Jonathan Lebon [Tue, 21 Jan 2014 21:14:21 +0000 (16:14 -0500)]
PR16478: always use dwarf for labels

Now that the symtab is queried more often for function probes, we need
to explicitly make .label queries use dwarf or they won't work properly.

10 years agoexecve.exp: quote expected result
Jonathan Lebon [Mon, 20 Jan 2014 15:46:52 +0000 (10:46 -0500)]
execve.exp: quote expected result

This is necessary since commit f631f56, which made [nd_]syscall.execve
use user_string_quoted() rather than user_string().

10 years agocmdline.cxx: don't use magic numbers
Jonathan Lebon [Fri, 17 Jan 2014 18:25:31 +0000 (13:25 -0500)]
cmdline.cxx: don't use magic numbers

And prettify the struct array.

10 years agostap[run/dyn]: disable colors when SYSTEMTAP_COLORS empty
Jonathan Lebon [Fri, 17 Jan 2014 17:11:20 +0000 (12:11 -0500)]
stap[run/dyn]: disable colors when SYSTEMTAP_COLORS empty

The current behaviour of SYSTEMTAP_COLORS is to turn on colors if it is
not set, or set but empty, and to turn off colors when set and invalid.
With this patch, rather than having users purposely make it invalid to
turn off colors, we interpret a set but empty SYSTEMTAP_COLORS to mean
turning colors off.

10 years agosuggest alternatives for unresolved kernel markers
Jonathan Lebon [Fri, 17 Jan 2014 16:48:38 +0000 (11:48 -0500)]
suggest alternatives for unresolved kernel markers

E.g.:
kernel.mark("ext4_sync_fa") --> ext4_sync_fs

10 years agosuggest alternatives for unresolved sdt markers
Jonathan Lebon [Fri, 17 Jan 2014 16:09:45 +0000 (11:09 -0500)]
suggest alternatives for unresolved sdt markers

E.g. process("stap").mark("benchmart") --> benchmark

And add blurb to NEWS

10 years agoMerge branch 'PR15781'
Jonathan Lebon [Wed, 22 Jan 2014 16:55:47 +0000 (11:55 -0500)]
Merge branch 'PR15781'

10 years agoPR15781: fix suggestion logic for optional probes
Jonathan Lebon [Thu, 16 Jan 2014 22:21:41 +0000 (17:21 -0500)]
PR15781: fix suggestion logic for optional probes

We previously used the heuristic of not suggesting functions for
optional probes to get around issues with recursive calls to
derive_probes from globby probes. This had the disadvantage that
suggestions could not be made for truly (script-level) optional probes.

We now add the new field 'from_glob' to probe_point which tracks whether
the probe_point was created out of a globby pp. We can thus now easily
determine when it is correct to suggest something, and when we should
suggest nothing but rather accumulate modules to suggest from.

10 years agotapsets.cxx: move verbose listings to suggest* funcs
Jonathan Lebon [Thu, 16 Jan 2014 22:30:01 +0000 (17:30 -0500)]
tapsets.cxx: move verbose listings to suggest* funcs

By moving the listings to the suggest_*() functions, we won't miss them
no matter from where they were called.

10 years agolevenshtein: skip empty strings
Jonathan Lebon [Thu, 16 Jan 2014 22:29:49 +0000 (17:29 -0500)]
levenshtein: skip empty strings

10 years agoelaborate.cxx: save up all errors from optional pps
Jonathan Lebon [Thu, 16 Jan 2014 22:13:36 +0000 (17:13 -0500)]
elaborate.cxx: save up all errors from optional pps

We remember all semantic_error objects caught even for optional probe
points so that if we get an error for a non-optional probe point, we
also print out the info of optional probe points that failed. This
gives users a clearer picture of why the whole probe failed.

10 years agosemantic_error: let it own its chain
Jonathan Lebon [Thu, 16 Jan 2014 22:07:03 +0000 (17:07 -0500)]
semantic_error: let it own its chain

This patch simplifies the way semantic_error chains are used by allowing
the parent object to own its chain. Upon setting the chain, the parent
creates a copy and keeps it secret, to be de-allocated upon destruction.

The patch also modifies the semantic_error constructor to allow the
chain to be also set at the same time.

10 years agoPR16448: adapt stap-prep for el7
Martin Cermak [Wed, 22 Jan 2014 16:01:36 +0000 (17:01 +0100)]
PR16448: adapt stap-prep for el7

* stap-prep: use yum to install needed kernel information RPMs
  should work across all yum-based rhel releases

10 years agoPR16476: adapt to netfilter API changes in linux 3.13
Frank Ch. Eigler [Tue, 21 Jan 2014 18:36:17 +0000 (13:36 -0500)]
PR16476: adapt to netfilter API changes in linux 3.13

* runtime/linux/autoconf-netfilter.c: Whoa, who goes there?

10 years agoPR16476: adapt to netfilter API changes in linux 3.13
Frank Ch. Eigler [Tue, 21 Jan 2014 18:36:17 +0000 (13:36 -0500)]
PR16476: adapt to netfilter API changes in linux 3.13

* buildrun.cxx (STAPCONF_NETFILTER_V313): New autoconf.
* tapset-netfilter.cxx (emit_module_decls): Adjust.
* man/stapprobes.3stap: Note preexisting $hooknum context variable.

10 years agoFix a client.exp tcl error on RHEL5 systems.
David Smith [Tue, 21 Jan 2014 17:45:42 +0000 (11:45 -0600)]
Fix a client.exp tcl error on RHEL5 systems.

* testsuite/systemtap.server/client.exp (array_equal): Make RHEL5's tcl
  happy by explictly using 'expr'.

10 years agoFix PR16471 by fixing the server_concurrency.exp testcase.
David Smith [Mon, 20 Jan 2014 22:56:54 +0000 (16:56 -0600)]
Fix PR16471 by fixing the server_concurrency.exp testcase.

* testsuite/systemtap.server/server_concurrency.exp: Fix timeout logic.
* testsuite/lib/systemtap.exp: When shutting down the server, catch
  errors.
* testsuite/systemtap.server/server_concurrency.exp:
  simplified.
* testsuite/systemtap.server/server_concurrency1.stp: Renamed and
  simplified.
* testsuite/systemtap.server/server_concurrency2.stp: Ditto.
* testsuite/systemtap.server/server_concurrency3.stp: Ditto.

10 years agoAdd java_backtrace testsuite script
Lukas Berk [Mon, 20 Jan 2014 20:54:50 +0000 (15:54 -0500)]
Add java_backtrace testsuite script

*java_backtrace.stp - add script for backtrace from singleparam.short
     method

10 years agoAdd java backtrace test
Lukas Berk [Mon, 20 Jan 2014 20:39:35 +0000 (15:39 -0500)]
Add java backtrace test

*java.exp - delay removal of singleparam.class so backtrace test can use
  it, also add the backtrace testcase
*singleparam.java - have method's call each other in the same order
   instead of having each called directly from main,
   this allows for a better backtrace
*java.stp - renamed to singleparam.stp for consistency with other tests

10 years agoUpdate/correct java testcase string
Lukas Berk [Mon, 20 Jan 2014 20:33:25 +0000 (15:33 -0500)]
Update/correct java testcase string

A remanent of when pn() originally passed the class.method name.  This was
changed before the 2.2.1 release due to the fact byteman can't (yet)
properly pass that, so the unique identifier was changed. We should
update what the testcase is looking for just the parameter that was
passed.

* testsuite/systemtap.apps/java.exp - update search strings in test

10 years agoFix how stapbm passes itself the methodname
Lukas Berk [Mon, 20 Jan 2014 20:30:54 +0000 (15:30 -0500)]
Fix how stapbm passes itself the methodname

*java/stapbm.in - we need to make sure stapbm passes the methodname with
the surrounding quotes in case there are multiple
parameters in the method call (otherwise stambm will
call itself with up to 17 parameters and error out)

10 years agoAdd java backtrace functionality
Lukas Berk [Fri, 17 Jan 2014 23:26:58 +0000 (18:26 -0500)]
Add java backtrace functionality

This commit adds two functions, sprint_java_backtrace() and
print_java_backtrace.  The former returns the java backtrace as one
string (may need to set the -DMAXSTRINGLEN var to read the entire
backtrace), and latter prints the java backtrace one line at a time.

*java/HelperSDT.c - Add METHOD_STAP_BT and _METHOD_BT_DELETE jni
 functions
*java/HelperSDT.h - ditto
*java/..../HelperSDT.java - ditto
*java/stapbm.in - add conditional calls to functions based on backtrace
 flag status
*tapset-method.cxx - add the probe points for METHOD_STAP_BT and
 METHOD_BT_DELETE to be handled
*tapset/java.stp - add sprint_java_backtrace and print_java_backtrace functions

This page took 0.06647 seconds and 5 git commands to generate.