]> sourceware.org Git - systemtap.git/log
systemtap.git
13 years agoImprove 386 precision op handling.
Stan Cox [Tue, 14 Dec 2010 19:57:07 +0000 (14:57 -0500)]
Improve 386 precision op handling.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor): Add probe_type.
(visit_target_symbol): Make default precision signed, unless asm probe.

* sdt_misc.exp (sdt_types):  Allow v1/v2 i386 unsigned test xfail

* sdt_types.c (unsigned_short_int_var, unsigned_int_var): Simplify

* sdt_types.stp: Likewise.

13 years agoAdd information about user-space stack backtrace to Beginners Guide.
William Cohen [Mon, 13 Dec 2010 22:14:55 +0000 (17:14 -0500)]
Add information about user-space stack backtrace to Beginners Guide.

13 years agoFix RHEL5 (older gcc) compile problem.
David Smith [Mon, 13 Dec 2010 19:56:04 +0000 (13:56 -0600)]
Fix RHEL5 (older gcc) compile problem.

* tapsets.cxx (visit_target_symbol): Fix RHEL5 (older gcc) compile
  problem by changing '__SIZEOF_LONG__' to 'sizeof(long)'.

13 years agoFixed PR 12314 by correctly including linux/inotify.h.
David Smith [Mon, 13 Dec 2010 19:41:07 +0000 (13:41 -0600)]
Fixed PR 12314 by correctly including linux/inotify.h.

* tapset/aux_syscalls.stp: Look for CONFIG_INOTIFY_USER (along with
  CONFIG_INOTIFY) when including linux/inotify.h.

13 years agoDon't use /tmp as an arbitrary argument for -I or -R when testing.
Dave Brolley [Mon, 13 Dec 2010 19:23:36 +0000 (14:23 -0500)]
Don't use /tmp as an arbitrary argument for -I or -R when testing.

It could contain .stp files which affect the test outcome.

13 years agoCompare sdt probe args as is.
Stan Cox [Fri, 10 Dec 2010 22:55:49 +0000 (17:55 -0500)]
Compare sdt probe args as is.

sdt_types.stp:  Don't mask negative probe args

13 years agoFix sdt probe arg qi/si fetching on 386
Stan Cox [Fri, 10 Dec 2010 15:48:20 +0000 (10:48 -0500)]
Fix sdt probe arg qi/si fetching on 386

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
Use long for default precision if "N@" is missing.

* sdt_misc.exp (pbtype_flags):  Don't use -g for STAP_SDT_V{2,3}
(V3 asm test): Fix arch detection

* sdt_types.stp: Mask negative arg values.

13 years agoUpdate copyright information in Tapset Reference Manual.
William Cohen [Thu, 9 Dec 2010 15:28:17 +0000 (10:28 -0500)]
Update copyright information in Tapset Reference Manual.

13 years agoEdit tapset documentation comments
William Cohen [Thu, 9 Dec 2010 01:40:24 +0000 (20:40 -0500)]
Edit tapset documentation comments

Made the following changes to the documentation comments:
   - Remove the "General Syntax:" lines.
   - Remove trailing '.' for the summaries.
   - Make parameter information phrases rather than sentences

13 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
William Cohen [Thu, 9 Dec 2010 01:39:48 +0000 (20:39 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

13 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
rho@redhat.com [Wed, 8 Dec 2010 23:24:47 +0000 (18:24 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

13 years agoBug 12099 - resolve script interpreters
rho@redhat.com [Wed, 8 Dec 2010 23:22:35 +0000 (18:22 -0500)]
Bug 12099 - resolve script interpreters

13 years agotestcase for 12099 - test script interpreter resolution
rho@redhat.com [Wed, 8 Dec 2010 23:18:56 +0000 (18:18 -0500)]
testcase for 12099 - test script interpreter resolution

13 years agoEdit the tapset documentation for conversions.stp
William Cohen [Wed, 8 Dec 2010 22:23:08 +0000 (17:23 -0500)]
Edit the tapset documentation for conversions.stp

Made the following changes to the documentation comments:
  - Remove the "General Syntax:" lines.
  - Remove trailing '.' for the summaries.

13 years agoEdit the tapset documentation for conversions-guru.stp
William Cohen [Wed, 8 Dec 2010 22:19:56 +0000 (17:19 -0500)]
Edit the tapset documentation for conversions-guru.stp

Made the following changes to the documentation comments:
  - Remove the "General Syntax:" lines.
  - Remove trailing '.' for the summaries.

13 years agoEdit the tapset documentation for context-unwind.stp
William Cohen [Wed, 8 Dec 2010 22:16:12 +0000 (17:16 -0500)]
Edit the tapset documentation for context-unwind.stp

Made the following changes to the documentation comments:
  - Remove the "General Syntax:" lines.
  - Remove trailing '.' for the summaries.

13 years agoEdit the tapset documentation for context-symbols.stp
William Cohen [Wed, 8 Dec 2010 22:12:14 +0000 (17:12 -0500)]
Edit the tapset documentation for context-symbols.stp

Made the following changes to the documentation comments:
  - Remove the "General Syntax:" lines.
  - Remove trailing '.' for the summaries and argumentation information.
  - Fix a few typos.

13 years agoEdit the tapset documentation for context.stp
William Cohen [Wed, 8 Dec 2010 22:06:21 +0000 (17:06 -0500)]
Edit the tapset documentation for context.stp

Made the following changes to the documentation comments:
  - Remove the "General Syntax:" lines.
  - Remove trailing '.' for the summaries.
  - Add title and description for cpuid function

13 years agoRemove the "General Syntax:" lines from ansi.stp
William Cohen [Wed, 8 Dec 2010 21:51:43 +0000 (16:51 -0500)]
Remove the "General Syntax:" lines from ansi.stp

13 years agoAdd the queue_stat.stp tapset to the Tapset reference manual.
William Cohen [Wed, 8 Dec 2010 21:42:15 +0000 (16:42 -0500)]
Add the queue_stat.stp tapset to the Tapset reference manual.

13 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
rho@redhat.com [Wed, 8 Dec 2010 19:31:41 +0000 (14:31 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

13 years agoAdd the *mib.stp tapsets to the SystemTap Tapset reference manual
William Cohen [Wed, 8 Dec 2010 19:00:46 +0000 (14:00 -0500)]
Add the *mib.stp tapsets to the SystemTap Tapset reference manual

Went through the comments in ipmib.stp, linuxmib.stp, and tcpmib.stp to
make them format properly. Then added a chapter in the SystemTap Tapset
reference manual for them.

13 years agotask_backtrace should return addresses separated by spaces.
Mark Wielaard [Wed, 8 Dec 2010 12:03:13 +0000 (13:03 +0100)]
task_backtrace should return addresses separated by spaces.

* tapset/context-unwind.stp (task_backtrace): Call _stp_stack_snprint_tsk
  with _STP_SYM_NONE.

13 years agoAdd stap_staticmarkers.stp to SystemTap tapset reference manual.
William Cohen [Tue, 7 Dec 2010 22:51:54 +0000 (17:51 -0500)]
Add stap_staticmarkers.stp to SystemTap tapset reference manual.

13 years agoIncrease environment limits to allow Tapset Reference manual to build.
William Cohen [Tue, 7 Dec 2010 22:50:24 +0000 (17:50 -0500)]
Increase environment limits to allow Tapset Reference manual to build.

13 years agoAdd the scheduler.stp to the Tapset Reference manual.
William Cohen [Tue, 7 Dec 2010 21:37:28 +0000 (16:37 -0500)]
Add the scheduler.stp to the Tapset Reference manual.

13 years agoAdd the indent.stp to the Tapset reference manual.
William Cohen [Tue, 7 Dec 2010 20:58:13 +0000 (15:58 -0500)]
Add the indent.stp to the Tapset reference manual.

13 years agoMinor edits to ucontext.stp documentation comment.
William Cohen [Tue, 7 Dec 2010 20:38:07 +0000 (15:38 -0500)]
Minor edits to ucontext.stp documentation comment.

13 years agoAdd irq.stp to Tapset Reference manual
William Cohen [Tue, 7 Dec 2010 20:27:20 +0000 (15:27 -0500)]
Add irq.stp to Tapset Reference manual

13 years agoAdd ucontext.stp to the tapset reference manual
William Cohen [Tue, 7 Dec 2010 17:19:05 +0000 (12:19 -0500)]
Add ucontext.stp to the tapset reference manual

13 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
William Cohen [Tue, 7 Dec 2010 17:06:56 +0000 (12:06 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

13 years agoAdd conversions-guru.stp to tapset manual
William Cohen [Tue, 7 Dec 2010 17:05:08 +0000 (12:05 -0500)]
Add conversions-guru.stp to tapset manual

13 years agoFixed 11794 by replacing returnstr() calls with return_str() when possible.
David Smith [Tue, 7 Dec 2010 16:38:46 +0000 (10:38 -0600)]
Fixed 11794 by replacing returnstr() calls with return_str() when possible.

* tapset/errno.stp (returnstr): Updated documentation comment to note that
  this function should only be used in dwarfless probes.  Renamed
  'returnp' argument to 'format'.
  (return_str): Added documentation comment.
* tapset/aux_syscalls.stp: Replaced returnstr() function calls with
  return_str() function calls.
* tapset/i386/syscalls.stp: Ditto.
* tapset/ia64/syscalls.stp: Ditto.
* tapset/powerpc/syscalls.stp: Ditto.
* tapset/rpc.stp: Ditto.
* tapset/s390/syscalls.stp: Ditto.
* tapset/signal.stp: Ditto.
* tapset/syscalls.stp: Ditto.
* tapset/syscalls2.stp: Ditto.
* tapset/x86_64/syscalls.stp: Ditto.

13 years agoAdd errno.stp to the tapset documentation
William Cohen [Mon, 6 Dec 2010 22:15:32 +0000 (17:15 -0500)]
Add errno.stp to the tapset documentation

13 years agoFix 'retstr' in sunrpc.clnt.shutdown_client.return.
David Smith [Mon, 6 Dec 2010 19:57:48 +0000 (13:57 -0600)]
Fix 'retstr' in sunrpc.clnt.shutdown_client.return.

* tapset/rpc.stp: In newer kernels, rpc_shutdown_client() has been changed
  to a void function.  Handle 'retstr' properly.

13 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
rho@redhat.com [Mon, 6 Dec 2010 15:33:04 +0000 (10:33 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

13 years agoSupport x86 1 byte and 2 byte registers.
Stan Cox [Fri, 3 Dec 2010 20:53:56 +0000 (15:53 -0500)]
Support x86 1 byte and 2 byte registers.

* tapsets.cxx (sdt_uprobe_var_expanding_visitor): Add all register variants.
(get_register_width): New.
(visit_target_symbol): Use it for register case to extract register part.

* sdt_misc.exp: Add sdt asm test.
* sdt_asm.S: New.
* sdt_asm.stp: New.

13 years agoAudit possible string buffer overruns.
David Smith [Fri, 3 Dec 2010 18:52:41 +0000 (12:52 -0600)]
Audit possible string buffer overruns.

* runtime/transport/procfs.c (_stp_register_ctl_channel_fs): Change
  sprintf() call to snprintf() call.
  (_stp_unregister_ctl_channel_fs): Ditto.
* runtime/transport/ring_buffer.c (_stp_transport_data_fs_init): Ditto.
* runtime/unwind.c (_stp_eh_enc_name): Ditto.
* runtime/io.c: Make sure STP_LOG_BUF_LEN isn't too short.
* runtime/staprun/staprun_funcs.c: Add comments about strcpy/strcat/sprintf
  appropriateness.
  (check_signature): Fix string length calculation.
* runtime/staprun/common.c: Add comments about strcpy/strcat/sprintf
  appropriateness.
* runtime/staprun/modverify.c: Ditto.
* runtime/staprun/relay.c: Ditto.
* runtime/staprun/relay_old.c: Ditto.
* runtime/staprun/staprun_funcs.c: Ditto.

13 years agoRedistribute the Target Variable information
William Cohen [Fri, 3 Dec 2010 16:27:46 +0000 (11:27 -0500)]
Redistribute the Target Variable information

Redistribute the information about target variables in the manual. Also
added index entries for the information and edited the text.

13 years agoFixed possible string buffer overruns in several embedded-C functions.
David Smith [Thu, 2 Dec 2010 20:05:39 +0000 (14:05 -0600)]
Fixed possible string buffer overruns in several embedded-C functions.

* tapset/socket.stp (sock_flags_num2str): Use strlcat() instead of
  strcat() to guard against buffer overruns.  Instead of creating the
  string in a temporary variable and then copying it to THIS->__retvalue,
  just create the string in THIS->__retvalue.
  (msg_flags_num2str): Ditto.
* tapset/inet_sock.stp (daddr_to_string): Use snprintf() instead of
  sprintf() to guard against buffer overruns.
* tapset/signal.stp (sigset_mask_str): Ditto.
* tapset/s390/nd_syscalls.stp (get_32mmap_args): Use strlcat()/snprintf()
  instead of strcat()/sprintf() to guard against buffer overruns.
* tapset/s390/syscalls.stp: Removed unused function get_32mmap_args().
* tapset/aux_syscalls.stp: Minor string-related fixes.
* tapset/string.stp: Ditto.

13 years agoPR 11906: stap-server prints more info about each server acted upon.
Dave Brolley [Wed, 1 Dec 2010 18:51:23 +0000 (13:51 -0500)]
PR 11906: stap-server prints more info about each server acted upon.

13 years agoPR 11906: Include the user running each server in the status output.
Dave Brolley [Wed, 1 Dec 2010 17:06:40 +0000 (12:06 -0500)]
PR 11906: Include the user running each server in the status output.

13 years agoPR 11197: Elaborate on security prophylactic settings for stap-server.
Dave Brolley [Wed, 1 Dec 2010 16:29:49 +0000 (11:29 -0500)]
PR 11197: Elaborate on security prophylactic settings for stap-server.

stap-server.8.in now elaborates on how to achieve the recommended
security settings and points out which ones are the default.

13 years agoFixed BZ624657 by fixing timing issues in the initscript.
David Smith [Tue, 30 Nov 2010 20:18:22 +0000 (14:18 -0600)]
Fixed BZ624657 by fixing timing issues in the initscript.

* initscript/systemtap.in (start_script): Make sure we wait until the pid
  file has been written before trying to use it.
  (stop_script): Check to see if the module has been really unloaded
  before declaring success.

13 years agoPR 10922: Client/Server Testsuite problems when avahi (mDNS) is bkocked by the firewall.
Dave Brolley [Tue, 30 Nov 2010 18:07:15 +0000 (13:07 -0500)]
PR 10922: Client/Server Testsuite problems when avahi (mDNS) is bkocked by the firewall.

The test suite now communicates with the server directly using
--use-serber=$HOSTNAME:PORT when avahi is blocked or not working.

13 years agoPR12141: mention in README the elfutils release that fixes problem
Frank Ch. Eigler [Sun, 28 Nov 2010 00:06:50 +0000 (19:06 -0500)]
PR12141: mention in README the elfutils release that fixes problem

13 years agoAdd configure --disable-sdt-probes
Josh Stone [Tue, 30 Nov 2010 00:16:22 +0000 (16:16 -0800)]
Add configure --disable-sdt-probes

This new option turns off SDT markers in our own binaries.  This doesn't
change the ability to probe SDT in other applications.

* configure.ac: Add --disable-sdt-probes.
* runtime/staprun/configure.ac: Ditto.
* includes/stap-probe.h: Define PROBE[N] depending on ENABLE_SDT_PROBES.
* *.cxx, runtime/staprun/*.[ch]: Use the indirect PROBE macros instead
  of STAP_PROBE, so SDT can be disabled.
* (everything else): Regenerated with autoreconf.
  (The change is bigger due to my newer autotools on F14 -- sorry...)

13 years agoAdapt to old kernels lacking asm/tsc.h
Josh Stone [Mon, 29 Nov 2010 23:36:50 +0000 (15:36 -0800)]
Adapt to old kernels lacking asm/tsc.h

Some old x86_64 kernels do have an export for tsc_khz, but don't need
(or even have) asm/tsc.h to define it.

13 years agoAdd user_{int8,int16,uint16,int32,uint32,int64}.
Stan Cox [Mon, 29 Nov 2010 19:33:14 +0000 (14:33 -0500)]
Add user_{int8,int16,uint16,int32,uint32,int64}.

* sdt.exp (extra_flags): Expand list of tested options.  Use instead
of having a separate c++ section.
(type_pedantics): New.

* sdt_misc.exp (extra_type_flags): Expand list of tested options.
(has_long_long, type_xfail, type_pedantics): New.

* sdt_types.c (NO_LONG_LONG): New.

13 years agoUpdated news regarding uprobes.ko and the compile-server/client.
Dave Brolley [Mon, 29 Nov 2010 17:52:51 +0000 (12:52 -0500)]
Updated news regarding uprobes.ko and the compile-server/client.

13 years agoPR10651 / RHBZ653286: mod_timer vs. del_timer_sync races
Frank Ch. Eigler [Sat, 27 Nov 2010 23:48:52 +0000 (18:48 -0500)]
PR10651 / RHBZ653286: mod_timer vs. del_timer_sync races

It appears possible for del_timer_sync (from outside) and mod_timer
(from within a timer callback) to race.  Defeat this race by ensuring
that the timer callback checks an atomic_t flag before rescheduling
itself with mod_timer.

* runtime/transport/relay_v2.c (transport_state): Turn into an atomic_t.
  Update users.
  (__stp_relay_wakeup_timer): Observe flag.
  (_stp_transport_data_fs_{start,stop}): Update flag before timer manipulations.
* runtime/transport/ring_buffer.c: Ditto for corresponding functions.

13 years agorhbz656699: use %ghost for /var/run/{systemtap,stap-server}
Frank Ch. Eigler [Thu, 25 Nov 2010 17:50:20 +0000 (12:50 -0500)]
rhbz656699: use %ghost for /var/run/{systemtap,stap-server}

13 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Thu, 25 Nov 2010 18:16:22 +0000 (13:16 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

13 years agotestsuite: fragment buildid.exp test driver, fixing objdir!=srcdir case
Frank Ch. Eigler [Thu, 25 Nov 2010 17:35:43 +0000 (12:35 -0500)]
testsuite: fragment buildid.exp test driver, fixing objdir!=srcdir case

* testsuite/systemtap.base/buildid.exp: Evict embedded files into ...
* testsuite/systemtap.base/buildid.{c,hex,stp}: ... these new files.

13 years agobuild: don't include a <linux/version.h> in userspace builds
Frank Ch. Eigler [Wed, 24 Nov 2010 19:00:02 +0000 (14:00 -0500)]
build: don't include a <linux/version.h> in userspace builds

13 years agoMerge branch 'master' of ssh://sources.redhat.com/git/systemtap
Dave Brolley [Thu, 25 Nov 2010 16:20:46 +0000 (11:20 -0500)]
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap

Conflicts:
runtime/staprun/common.c
session.cxx
session.h

13 years agoImproved handling of uprobes.ko by compile-server and client.
Dave Brolley [Thu, 25 Nov 2010 16:11:36 +0000 (11:11 -0500)]
Improved handling of uprobes.ko by compile-server and client.

- Server now returns uprobes.ko to client when required.
- New optional argument to staprun's -u option to specify the location
  of uprobes module.
- Client uses new argument of -u to specify uprobes.ko returned by
  the server.
- staprun still prefers already-loaded uprobes, built-in uprobes and
  kernel-built uprobes over the one returned by the server.
- staprun verifies the signature of the uprobes module for unprivileged
  users.

13 years agoRejigger sdt.h macros for more nit cases.
Roland McGrath [Wed, 24 Nov 2010 19:51:58 +0000 (11:51 -0800)]
Rejigger sdt.h macros for more nit cases.

13 years agoPR12138: Convert the user_int functions to kread
Josh Stone [Wed, 24 Nov 2010 00:13:55 +0000 (16:13 -0800)]
PR12138: Convert the user_int functions to kread

This uses our more-centralized mechanism for reading uncertain memory,
which also has the ability to read 8-byte values on i386 (not atomically).

* tapset/uconversions.stp: New, move the user_* functions here.  The new
  STP_GET_USER[_WARN] standardize all integer accesses through kread.
* tapset/conversions.stp: This is only for kernel functions now.
* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Include uconversions.
* testsuite/buildok/conversions.stp: Build the user_intNN too.
* testsuite/buildok/conversions-embedded.stp: Ditto.

13 years agoif we say sdt_types is untested, then don't test it...
Josh Stone [Wed, 24 Nov 2010 00:12:31 +0000 (16:12 -0800)]
if we say sdt_types is untested, then don't test it...

13 years agoPR12139: revamp sys/sdt.h macros' argument handling
Roland McGrath [Mon, 22 Nov 2010 23:53:36 +0000 (15:53 -0800)]
PR12139: revamp sys/sdt.h macros' argument handling

* includes/sys/sdt.h: Revamp size and signedness calculations on probe
arguments for C and C++.

13 years agoPR12139: test case for pointer to an incomplete type in probe argument
Roland McGrath [Tue, 23 Nov 2010 02:33:35 +0000 (18:33 -0800)]
PR12139: test case for pointer to an incomplete type in probe argument

* testsuite/systemtap.base/sdt_types.c: Test a pointer to an incomplete type.
* testsuite/systemtap.base/sdt_types.stp: Use that new probe.
* testsuite/systemtap.base/sdt_misc.exp: Expect that.

13 years agoFix last commit.
Roland McGrath [Tue, 23 Nov 2010 01:07:13 +0000 (17:07 -0800)]
Fix last commit.

13 years agoFix runcheck for dtrace cases
Roland McGrath [Tue, 23 Nov 2010 00:50:48 +0000 (16:50 -0800)]
Fix runcheck for dtrace cases

* Makefile.am (runcheck): Depend on ...
(testsuite/dtrace): ... this new target.
* Makefile.in: Regenerated.

13 years agoFix runcheck for dtrace cases
Roland McGrath [Tue, 23 Nov 2010 00:50:48 +0000 (16:50 -0800)]
Fix runcheck for dtrace cases

* Makefile.am (runcheck): Depend on ...
(testsuite/dtrace): ... this new target.
* Makefile.in: Regenerated.

13 years agoTest sdt_types.c with c++.
Stan Cox [Mon, 22 Nov 2010 22:34:01 +0000 (17:34 -0500)]
Test sdt_types.c with c++.

sdt_misc.exp (type_language,type_language_mssgs,extra_type_mssgs) New.
Loop over for c++ testing.  Improve error messages.
sdt_types.stp:  Improve error messages.

13 years agoRevert "PR12254: make ioblock.* probes tolerate 0-byte I/O (e.g. blkdev_issue_flush)"
Frank Ch. Eigler [Mon, 22 Nov 2010 21:07:11 +0000 (16:07 -0500)]
Revert "PR12254: make ioblock.* probes tolerate 0-byte I/O (e.g. blkdev_issue_flush)"

This reverts commit d213fd5908edce8c730f08524eae15bc26d62187.
It's not necessary, as commit 3963dacdfe handles this already.

13 years agoPR12254: make ioblock.* probes tolerate 0-byte I/O (e.g. blkdev_issue_flush)
Frank Ch. Eigler [Mon, 22 Nov 2010 21:03:42 +0000 (16:03 -0500)]
PR12254: make ioblock.* probes tolerate 0-byte I/O (e.g. blkdev_issue_flush)

* ioblock.stp (__bio_ino): Make all callers conditional on
  bi_vcnt != 0.

13 years agoTest sdt_types.c with various gcc options.
Stan Cox [Mon, 22 Nov 2010 17:13:44 +0000 (12:13 -0500)]
Test sdt_types.c with various gcc options.

sdt_misc.c (extra_type_flags): New. Test sdt_types.c with misc compile options.
Move sdt_misc.c, sdt_misc.stp, sdt_misc_.d to separate files.
sdt_types.c:  Make -pedantic friendly.  Add constants probe.
sdt_types.stp (constants): New.

13 years agowork around rhel6 module signing nits in this builder script too
Frank Ch. Eigler [Mon, 22 Nov 2010 16:59:09 +0000 (11:59 -0500)]
work around rhel6 module signing nits in this builder script too

13 years agotesting: add new script to generate kernel.function("*") equivalent module
Frank Ch. Eigler [Mon, 22 Nov 2010 16:11:58 +0000 (11:11 -0500)]
testing: add new script to generate   kernel.function("*")  equivalent module

13 years agoreleng: workaround for more rhel6 module-signing nits
Frank Ch. Eigler [Sat, 20 Nov 2010 03:04:40 +0000 (22:04 -0500)]
releng: workaround for more rhel6 module-signing nits

* buildrun.cxx (make_typequery_kmod, make_tracequery): Also
  set CONFIG_MODULE_SIG=n in the destination makefile, on
  account of RHBZ 655231.

13 years agoMake lex_cast work numerically with [u]int8_t
Josh Stone [Fri, 19 Nov 2010 22:00:38 +0000 (14:00 -0800)]
Make lex_cast work numerically with [u]int8_t

These were getting treated by istream like char types, which would
always fail our generic template since eof isn't reached.  There's not
much point to using lex_cast<char> anyway, since str[0] will do the
same, so I've specialized lex_cast with [u]int8_t to read numerically.

The only place we use this so far is in SDT V3 parsing constants.  SDT
doesn't yet emit 1-byte arguments, but it may in the future.

* util.h (lex_cast<int8_t>): Read via int16_t to stay numeric.
  (lex_cast<uint8_t>): Same, with uint16_t.

13 years agocompat: adapt to old kernels' dislike of 'bool' type in runtime code
Frank Ch. Eigler [Fri, 19 Nov 2010 21:28:29 +0000 (16:28 -0500)]
compat: adapt to old kernels' dislike of 'bool' type in runtime code

* runtime/sym.c (_stp_build_id_check): Take int instead of bool.  Update
  callers.

13 years agotestsuite: unembed test sources
Frank Ch. Eigler [Fri, 19 Nov 2010 20:43:01 +0000 (15:43 -0500)]
testsuite: unembed test sources

Pleading guilty to
* youthful indiscretions
* providing unadmirable examples

Paying penance by
* separating teeny little non-tcl sources from tcl code
* swearing to do better in the future

13 years agoUpdated stapusr/stapdev requirements in stap.1.
David Smith [Fri, 19 Nov 2010 20:16:53 +0000 (14:16 -0600)]
Updated stapusr/stapdev requirements in stap.1.

13 years agosdt_types: remove manual type-casting
Josh Stone [Fri, 19 Nov 2010 04:42:33 +0000 (20:42 -0800)]
sdt_types: remove manual type-casting

For now, remove the int() and short() typecasting, as it seems to be
working without.  We should try as much as possible to fix these issues
in the translator and/or sdt.h before masking it in the test.

13 years agoCast the proper sign and size of SDT constant args
Josh Stone [Fri, 19 Nov 2010 04:06:52 +0000 (20:06 -0800)]
Cast the proper sign and size of SDT constant args

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
  For the constant case, we still need to do some typecasting, as gcc
  doesn't necessarily match the sign of the constant to the type.

13 years agoCast the proper sign and size of SDT register args
Josh Stone [Fri, 19 Nov 2010 03:32:56 +0000 (19:32 -0800)]
Cast the proper sign and size of SDT register args

* tapsets.cxx (sdt_uprobe_var_expanding_visitor::visit_target_symbol):
  For the REGISTER case, insert a typecast to deal with truncation and
  sign-extension of the argument as needed.

13 years agosdt_types: Use direct array args rather than &array when possible
Josh Stone [Fri, 19 Nov 2010 03:16:57 +0000 (19:16 -0800)]
sdt_types: Use direct array args rather than &array when possible

13 years agosdt_types: add a PASS statement for bitfields_small_var
Josh Stone [Fri, 19 Nov 2010 00:20:48 +0000 (16:20 -0800)]
sdt_types: add a PASS statement for bitfields_small_var

13 years agoDon't autoconf systemtap_session::NSPR_Initialized
Josh Stone [Thu, 18 Nov 2010 00:31:47 +0000 (16:31 -0800)]
Don't autoconf systemtap_session::NSPR_Initialized

The 1-byte saving of an autoconfed bool isn't worth the headache of
mismatched definitions, even if we've resolved that.

13 years agoRemove dead code from systemtap_session
Josh Stone [Wed, 17 Nov 2010 23:05:07 +0000 (15:05 -0800)]
Remove dead code from systemtap_session

These two functions are dupes of code in main.cxx.

* session.cxx (parse_kernel_config): Removed.
  (parse_kernel_exports): Removed.

13 years agoMake sure we all use the same systemtap_session
Josh Stone [Wed, 17 Nov 2010 22:55:24 +0000 (14:55 -0800)]
Make sure we all use the same systemtap_session

In particular, if some sources don't include config.h, then they'll be
missing HAVE_NSS, which changes the layout of systemtap_session.

* session.h: #include "config.h", so everyone gets HAVE_NSS.

13 years agoAdd user_{int8,int16,uint16,int32,uint32,int64}.
Stan Cox [Wed, 17 Nov 2010 16:57:04 +0000 (11:57 -0500)]
Add user_{int8,int16,uint16,int32,uint32,int64}.

* conversions.stp (STP_GET_USER): New.  Use it to define...
(user_{int{8,16,32,64},uint{16,32}}) New. Names derive from types.h.
(user_char,user_short,user_int): Use STP_GET_USER.

* tapsets.cxx (uprobe_var_expanding_visitor::visit_target_symbol):
Use user_intN tapsets.

* sdt_types.c (unsigned_short_int_var,unsigned_int_var): New

* sdt_types.stp (unsigned_short_int_var,unsigned_int_var): New

13 years agoCVE-2010-4170, CVE-2010-4171: staprun module loading/unloading security fixes
Frank Ch. Eigler [Wed, 17 Nov 2010 14:57:23 +0000 (09:57 -0500)]
CVE-2010-4170, CVE-2010-4171: staprun module loading/unloading security fixes

We would like to thank Tavis Ormandy for reporting this issue.

* runtime/staprun/staprun.c (enable_uprobes): Don't run /sbin/modprobe
  directly, since it takes more inputs than we have tried to sanitize.
  (remove_module): Call init_ctl_channel on putative stap module name,
  to check that it's our own stap module.
  (init_staprun): Do remove/retry via remove_module rather than
  underchecked delete_module(2).
* runtime/staprun/ctl.c (init_ctl_channel): Check ownership of
  .ctl files, to preclude manipulation of some other stapusr member's modules.
* runtime/staprun/Makefile.am, systemtap.spec: Install staprun as
  mode 04110, group stapusr.
* README.security, runtime/staprun/staprun.8: Note new stapdev/stapusr
  joint requirements.

13 years agoUse output_exportconf for finding tsc_khz
Josh Stone [Tue, 16 Nov 2010 21:42:25 +0000 (13:42 -0800)]
Use output_exportconf for finding tsc_khz

* buildrun.cxx (compile_pass): Switch tsc_khz to output_exportconf.
* runtime/autoconf-tsc-khz.c: Delete this version-based check.

13 years agoAdd a fallback for kernels not exporting add_timer_on
Josh Stone [Tue, 16 Nov 2010 21:20:53 +0000 (13:20 -0800)]
Add a fallback for kernels not exporting add_timer_on

Commit 3fd1c49 regressed for kernels which don't EXPORT add_timer_on.

* buildrun.cxx (compile_pass): Test for add_timer_on's export.
* runtime/time.c (_stp_init_time, __stp_init_time): Restore the
  IPI-add_timer as a fallback.

13 years agoPR11735: Hash ldd/vdso unwindsym_modules too
Josh Stone [Tue, 16 Nov 2010 02:08:58 +0000 (18:08 -0800)]
PR11735: Hash ldd/vdso unwindsym_modules too

* translate.cxx (prepare_symbol_data): Do add_unwindsym_ldd/vdso here.
  (prepare_translate_pass): Call above, and placeholder for the future.
* main.cxx (passes_0_4): Call prepare_translate_pass before checking the
  cache, so we have more complete unwindsym_modules.

13 years agoPR11735: Hash unwindsym_modules as full paths
Josh Stone [Tue, 16 Nov 2010 01:53:22 +0000 (17:53 -0800)]
PR11735: Hash unwindsym_modules as full paths

* hash.cxx (find_script_hash): Use hash::add_path instead of plain add.

13 years agouprobes: Clean up after vfork-exec
Josh Stone [Sat, 13 Nov 2010 01:14:52 +0000 (17:14 -0800)]
uprobes: Clean up after vfork-exec

When a vfork'ed thread execs, we don't want to remove the probes from
the vfork parent, but we still need to clean up the thread associations.
Otherwise, the newly-execed process won't have the right accounting for
its SSOL area.

* runtime/uprobes2/uprobes.c (uprobe_report_exec): Clean up thread info
  when a vfork'ed task execs.
* runtime/uprobes/uprobes.c (uprobe_report_exec): Ditto.

13 years agotapset: add buildok test for inode_name()
Frank Ch. Eigler [Fri, 12 Nov 2010 21:33:43 +0000 (16:33 -0500)]
tapset: add buildok test for inode_name()

13 years agotapset: new inode_name tapset function
Jeff Moyer [Fri, 12 Nov 2010 21:29:20 +0000 (16:29 -0500)]
tapset: new inode_name tapset function

13 years agoRemove unfinished sentence from stap.1
Adrien Kunysz [Fri, 12 Nov 2010 19:26:24 +0000 (14:26 -0500)]
Remove unfinished sentence from stap.1

The problem was introduced in commit 98aab489.

13 years agoPR12164: Emit kprobes-sdt goo only when needed
Josh Stone [Thu, 11 Nov 2010 21:11:50 +0000 (13:11 -0800)]
PR12164: Emit kprobes-sdt goo only when needed

This stuff is only used for apps compiled with EXPERIMENTAL_KPROBE_SDT,
so we don't need it most of the time.

* runtime/kprobes-common.c (stap_kprobe_process_found,
  stap_kprobe_mmap_found): Only create #ifdef KPROBES_TASK_FINDER.
* tapsets.cxx (dwarf_derived_probe::join_group): Only enable_task_finder
  in the session if a semaphore is present.
  (dwarf_derived_probe_group::enroll): Remember if any has_semaphores.
  (dwarf_derived_probe_group::emit_module_decls): Predicate sdt and
  task_finder code on has_semaphores.
  (dwarf_derived_probe_group::emit_module_init): Ditto.
  (dwarf_derived_probe_group::emit_module_exit): Ditto.

13 years agoruntime: tolerate overlong section/symbol names better
Frank Ch. Eigler [Wed, 10 Nov 2010 16:57:43 +0000 (11:57 -0500)]
runtime: tolerate overlong section/symbol names better

* runtime/staprun/staprun.c (send_a_relocation): Don't
  complain about overlong names, except if very verbose.
  Triple-check null termination of surviving strings.

13 years agoreleng: tweak build ordering to get code first, docs last
Frank Ch. Eigler [Wed, 10 Nov 2010 16:22:18 +0000 (11:22 -0500)]
releng: tweak build ordering to get code first, docs last

* Makefile.am (SUBDIRS): Build . and runtime/staprun first.
* Makefile.in: Regenerated.

13 years agoregen misc. Makefile.in's due to earlier addition of support_section_question
Frank Ch. Eigler [Wed, 10 Nov 2010 16:21:38 +0000 (11:21 -0500)]
regen misc. Makefile.in's due to earlier addition of support_section_question

13 years agoruntime: bump up module/symbol name length limits
Frank Ch. Eigler [Wed, 10 Nov 2010 16:13:26 +0000 (11:13 -0500)]
runtime: bump up module/symbol name length limits

Due to a report that kernel modules written with C++ inside sometimes
grow extra-long sections:

* runtime/transport/transport_msgs.h: Double
  STP_MODULE_NAME_LEN and STP_SYMBOL_NAME_LEN to 128.

13 years agoKeep running buildid.exp if a test fails.
Stan Cox [Wed, 10 Nov 2010 15:49:08 +0000 (10:49 -0500)]
Keep running buildid.exp if a test fails.

* buildid.exp:  Only quit if a compile or link fails.

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