]> sourceware.org Git - systemtap.git/log
systemtap.git
7 years agoThe httpd server now support downloading the built module.
David Smith [Thu, 8 Jun 2017 16:34:15 +0000 (11:34 -0500)]
The httpd server now support downloading the built module.

* httpd/main.cxx (result_info::generate_file_response): New function.
  (class result_file_rh): New class.
  (main): Add result file request handler to the server.
* httpd/server.cxx (server::queue_response): Add code to handle file
  downloads.
* httpd/server.h (struct response): Add 'file' member variable.
* httpd/client.py: Add code to download module.

7 years agoThe httpd server now builds a kernel module and returns its information.
David Smith [Wed, 7 Jun 2017 17:28:51 +0000 (12:28 -0500)]
The httpd server now builds a kernel module and returns its information.

* httpd/main.cxx: Add code to actually build a kernel module. Add code to
  return information about the kernel module.
* httpd/client.py: Add code to expect the redirect from the build info to
  the build results.

7 years agoThe httpd server now produces valid JSON.
David Smith [Tue, 6 Jun 2017 13:55:18 +0000 (08:55 -0500)]
The httpd server now produces valid JSON.

* httpd/main.cxx (build_info::content): Output valid JSON.
* httpd/client.py: Expect a valid JSON response.

7 years agoUpdate the syscall tapset for the 4.11 kernel (s390x, powerpc, aarch64).
David Smith [Thu, 1 Jun 2017 20:29:50 +0000 (15:29 -0500)]
Update the syscall tapset for the 4.11 kernel (s390x, powerpc, aarch64).

* tapset/linux/s390/aux_syscalls.stp (_arch_ptrace_argstr): Add
  PTRACE_SINGLEBLOCK support.
* tapset/linux/sysc_pwrite.stp: Fix compat 64-bit offset logic. Use
  @__compat_ulong() on the appropriate values. Probe the
  "compat_sys_s390_SYSCALL" function for s390 compat support.
* tapset/linux/s390/sysc_compat_fadvise64.stp: Ditto.
* tapset/linux/s390/sysc_compat_ftruncate64.stp: Ditto.
* tapset/linux/s390/sysc_compat_readahead.stp: Ditto.
* tapset/linux/sysc_io_cancel.stp: Use @__compat_ulong() on the
  appropriate values.
* tapset/linux/sysc_io_destroy.stp: Ditto.
* tapset/linux/sysc_io_getevents.stp: Ditto.
* tapset/linux/sysc_io_submit.stp: Ditto.
* tapset/linux/sysc_ioctl.stp: Ditto.
* tapset/linux/sysc_kexec_load.stp: Ditto.
* tapset/linux/sysc_pread.stp: Ditto.
* tapset/linux/sysc_ptrace.stp: Ditto.
* tapset/linux/sysc_fstatat.stp: Probe the "compat_sys_s390_SYSCALL"
  function for s390 compat support.
* tapset/linux/sysc_getegid.stp: Ditto.
* tapset/linux/sysc_geteuid.stp: Ditto.
* tapset/linux/sysc_getgid.stp: Ditto.
* tapset/linux/sysc_getgroups.stp: Ditto.
* tapset/linux/sysc_getuid.stp: Ditto.
* tapset/linux/sysc_lstat.stp: Ditto.
* tapset/linux/sysc_read.stp: Ditto.
* tapset/linux/sysc_setgroups.stp: Ditto.
* tapset/linux/sysc_stat.stp: Ditto.
* tapset/linux/sysc_write.stp: Ditto.
* tapset/linux/s390/sysc_getresgid16.stp: Ditto.
* tapset/linux/s390/sysc_getresuid16.stp: Ditto.
* tapset/linux/s390/sysc_compat_truncate64.stp: Ditto.
* tapset/linux/sysc_clock_nanosleep.stp: Use @__pointer() on pointer
  values.
* tapset/linux/sysc_copy_file_range.stp: Ditto.
* tapset/linux/sysc_execve.stp: Ditto.
* tapset/linux/sysc_fcntl.stp: Ditto.
* tapset/linux/sysc_fstatfs64.stp: Ditto.
* tapset/linux/sysc_futex.stp: Ditto.
* tapset/linux/sysc_futimesat.stp: Ditto.
* tapset/linux/sysc_mount.stp: Ditto.
* tapset/linux/sysc_mq_getsetattr.stp: Ditto.
* tapset/linux/sysc_mq_notify.stp: Ditto.
* tapset/linux/sysc_mq_open.stp: Ditto.
* tapset/linux/sysc_mq_timedreceive.stp: Ditto.
* tapset/linux/sysc_mq_timedsend.stp: Ditto.
* tapset/linux/sysc_nanosleep.stp: Ditto.
* tapset/linux/sysc_ppoll.stp: Ditto.
* tapset/linux/sysc_process_vm_readv.stp: Ditto.
* tapset/linux/sysc_process_vm_writev.stp: Ditto.
* tapset/linux/sysc_pselect6.stp: Ditto.
* tapset/linux/sysc_pselect7.stp: Ditto.
* tapset/linux/sysc_sched_getaffinity.stp: Ditto.
* tapset/linux/sysc_sched_setaffinity.stp: Ditto.
* tapset/linux/sysc_select.stp: Ditto.
* tapset/linux/sysc_settimeofday.stp: Ditto.
* tapset/linux/sysc_statfs.stp: Ditto.
* tapset/linux/sysc_statfs64.stp: Ditto.
* tapset/linux/sysc_timer_create.stp: Ditto.
* tapset/linux/sysc_timer_settime.stp: Ditto.
* tapset/linux/sysc_times.stp: Ditto.
* tapset/linux/sysc_utime.stp: Ditto.
* tapset/linux/sysc_utimensat.stp: Ditto.
* tapset/linux/sysc_utimes.stp: Ditto.
* tapset/linux/sysc_accept.stp: Make sure the 'call' socketcall() argument
  is treated as an 32-bit int.
* tapset/linux/sysc_accept4.stp: Ditto.
* tapset/linux/sysc_bind.stp: Ditto.
* tapset/linux/sysc_connect.stp: Ditto.
* tapset/linux/sysc_getpeername.stp: Ditto.
* tapset/linux/sysc_getsockname.stp: Ditto.
* tapset/linux/sysc_getsockopt.stp: Ditto.
* tapset/linux/sysc_listen.stp: Ditto.
* tapset/linux/sysc_recv.stp: Ditto.
* tapset/linux/sysc_recvfrom.stp: Ditto.
* tapset/linux/sysc_recvmsg.stp: Ditto.
* tapset/linux/sysc_send.stp: Ditto.
* tapset/linux/sysc_sendmmsg.stp: Ditto.
* tapset/linux/sysc_sendmsg.stp: Ditto.
* tapset/linux/sysc_sendto.stp: Ditto.
* tapset/linux/sysc_setsockopt.stp: Ditto.
* tapset/linux/sysc_shutdown.stp: Ditto.
* tapset/linux/sysc_socket.stp: Ditto.
* tapset/linux/sysc_socketpair.stp: Ditto.
* tapset/linux/sysc_execveat.stp: Fix calling the nd_syscall 'int_arg()'
  function on '$flags' in dw_syscall.compat_execveat. Use @__pointer() on
  pointer values.
* tapset/linux/aux_syscalls.stp: Initialize structure to make gcc happy.
* tapset/linux/arm64/syscall_num.stp: Add "statx" syscall.
* tapset/linux/s390/syscall_num.stp: Ditto.
* tapset/linux/powerpc/syscall_num.stp: Add "copy_file_range" and
  "statx" syscalls.
* testsuite/systemtap.syscall/aio.c: Updated with syscall wrappers.
* testsuite/systemtap.syscall/ioperm.c: Ditto.
* testsuite/systemtap.syscall/clock.c: Add a return value to the regexp.
* testsuite/systemtap.syscall/copy_file_range.c: Corrected types from
  'off_t' to 'loff_t'.
* testsuite/systemtap.syscall/fadvise64.c: Add a "return 0" from main() so
  that systemtap doesn't complain about the target exiting with a non-zero
  exit code.
* testsuite/systemtap.syscall/getgroups.c: Ditto.
* testsuite/systemtap.syscall/memfd_create.c: Add s390 31-bit regex support.
* testsuite/systemtap.syscall/readdir.c: Ditto.
* testsuite/systemtap.syscall/sched_attr.c: Ditto.
* testsuite/systemtap.syscall/stat.c: Ditto.
* testsuite/systemtap.syscall/uselib.c: Ditto.
* testsuite/systemtap.syscall/seccomp.c: Add s390 31-bit support and allow
  for the syscall to be unimplemented.
* testsuite/systemtap.syscall/ptrace.c: For s390, undefine PTRACE_GETREGS
  if we've got PTRACE_SINGLEBLOCK (since they have the same value).
* testsuite/systemtap.syscall/userfaultfd.c: Handle userfaultfd() being
  unimplemented.
* testsuite/systemtap.syscall/tapset/syscall.stp: Updated.

7 years agoThe httpd server now expects the command line to be sent tokenized.
David Smith [Tue, 30 May 2017 21:56:58 +0000 (16:56 -0500)]
The httpd server now expects the command line to be sent tokenized.

* httpd/server.cxx (get_key_values): Expect each request parameter to
  possibly have multiple values.
* httpd/server.h (struct request): Ditto
* httpd/main.cxx (string build_info::content): Output the command line
  arguments as an JSON array instead of as a single value.
  (build_info::start_module_build): New function.
  (response build_collection::POST): Expect each request parameter to
  possibly have multiple values.
* httpd/client.py: Pass the command line arguments as an array of strings
  instead of as one string.

7 years agoAdd httpd signal handling.
David Smith [Tue, 23 May 2017 21:33:23 +0000 (16:33 -0500)]
Add httpd signal handling.

* httpd/server.cxx (server::stop): New function.
  (server::wait): Ditto.
* httpd/server.h: Add condition variable to wait on.
* httpd/main.cxx (build_info::content): Put the json object when we're
  done with it.
  (cleanup): New function.
  (signal_thread): Ditto.
  (setup_main_signals): Ditto.
  (main): Call signal handling functions.

7 years agoAdd httpd python test client.
David Smith [Mon, 22 May 2017 21:27:04 +0000 (16:27 -0500)]
Add httpd python test client.

7 years agoAdd the linux probe_lock.h contention change to dyninst
Stan Cox [Sat, 13 May 2017 11:01:03 +0000 (07:01 -0400)]
Add the linux probe_lock.h contention change to dyninst

* runtime/dyninst/probe_lock.h: Increment contention attempts.

7 years agoFix manpage typo
Stan Cox [Fri, 12 May 2017 19:33:49 +0000 (15:33 -0400)]
Fix manpage typo

7 years agostap-report: search out other vmlinu{x,z,id} files for buildid reporting
Frank Ch. Eigler [Fri, 12 May 2017 17:36:04 +0000 (13:36 -0400)]
stap-report: search out other vmlinu{x,z,id} files for buildid reporting

7 years agoAdd httpd server updates.
David Smith [Fri, 12 May 2017 16:36:24 +0000 (11:36 -0500)]
Add httpd server updates.

* httpd/server.cxx (server::access_handler): Save regexp matches.
  (server::queue_response): Add response headers.
* httpd/main.cxx: Add initial support for build info.
* httpd/Makefile.am: Link with the json-c library.
* httpd/server.h (struct request): Add 'matches' variable.
* configure.ac: Add the json-c library as a requirement of the httpd
  server.
* config.in: Regenerated.
* configure: Ditto.
* httpd/Makefile.in: Ditto.

7 years agostap-report: also include RELOC/RANDOMIZE kconfig lines
Frank Ch. Eigler [Fri, 12 May 2017 14:59:30 +0000 (10:59 -0400)]
stap-report: also include RELOC/RANDOMIZE kconfig lines

7 years agoUse @task() @cast-wrapper for task->mm in tapset, so that debuginfo not needed
Mikael Dubik [Fri, 12 May 2017 13:41:39 +0000 (09:41 -0400)]
Use @task() @cast-wrapper for task->mm in tapset, so that debuginfo not needed

7 years agoUpdated the list of tested kernel versions to include 4.11.
David Smith [Thu, 11 May 2017 13:35:33 +0000 (08:35 -0500)]
Updated the list of tested kernel versions to include 4.11.

7 years agoMark several tests as needing uprobes.
David Smith [Wed, 10 May 2017 16:36:47 +0000 (11:36 -0500)]
Mark several tests as needing uprobes.

* testsuite/systemtap.base/at_var_void_stmt.exp: Don't run the test if we
  don't have uprobes.
* testsuite/systemtap.base/auto_path.exp: Ditto.
* testsuite/systemtap.base/pr18649.exp: Ditto.
* testsuite/systemtap.base/set_user.exp: Ditto.
* testsuite/systemtap.context/usymfileline.exp: Ditto.
* testsuite/systemtap.exelib/pthreadprobes.exp: Ditto.

7 years agoAdd small testsuite fixes for 4.11 kernels.
David Smith [Tue, 9 May 2017 21:39:11 +0000 (16:39 -0500)]
Add small testsuite fixes for 4.11 kernels.

* testsuite/buildok/twentyseven.stp: Avoid missing inlined function
  arguments by probing 'kernel.function("do_execve").call'.
* testsuite/buildok/thirtyone.stp: On 4.11 kernels, handle the vfs_stat()
  function being renamed to vfs_statx().
* testsuite/systemtap.pass1-4/buildok.exp: Add kfails for
  buildok/fortyfour.stp and buildok/map_probe_cond.stp if we don't have
  uprobes.
* testsuite/systemtap.pass1-4/buildok-interactive.exp: Ditto.

7 years agoAdd missing @cast() calls for 4.11 kernels.
David Smith [Tue, 9 May 2017 21:32:25 +0000 (16:32 -0500)]
Add missing @cast() calls for 4.11 kernels.

* tapset/linux/task.stp: Add a "signal_struct" cast to
  _task_rlimit_cur().
* tapset/linux/task.stpm: Fix @mm() macro for kernels >= 2.6.34, where the
  mm_struct definition has moved to <linux/mm_types.h>
* tapset/linux/proc_mem.stp (proc_mem_size): Use the @mm() macro to cast
  values to a mm_struct.
  (proc_mem_txt): Ditto.
  (proc_mem_data): Ditto.
* tapset/linux/context.stp (cmdline_args): Ditto.
* tapset/linux/context-envvar.stp (env_var): Ditto.

7 years agoAvoid missing "task_stack()" definition on 4.11 kernels.
David Smith [Tue, 9 May 2017 21:20:41 +0000 (16:20 -0500)]
Avoid missing "task_stack()" definition on 4.11 kernels.

* runtime/compatdefs.h: If <linux/sched/task_stack.h> exists, include
  it. This avoids a missing task_stack() definition.
* buildrun.cxx (compile_pass): Add autoconf test for
  <linux/sched/task_stack.h>.
* runtime/linux/autoconf-sched-task_stack.c: New file.

7 years agoRevert all bpf patches
Richard Henderson [Thu, 4 May 2017 18:55:47 +0000 (11:55 -0700)]
Revert all bpf patches

This reverts commits:
02a3ce26f69233fce8d175fbf248a6b9b1f4a654
ceac2b1bcf5170848e0aca7595e6b8222e122e7b
24a49c47f3a76a8058cf6545de5968fe8a036d5b
7f1e56e9fe2f94ab181481396068d09ab8c42ce8
009ff1576c6990db63f48a57234f2d5454f63bf5
8e39930950bfd916971e1df132b6abf269fbe314
03629ed30d3334aebe0ebe2c57ae9b2fb90eab4d
7ca1ffe6e431e4818a9a479935d75a428d2aaf57
0603c3e9f86c47f3b5096a8060bed35f71d1d6e4
cbceaaecb14cfb81ae4d6e88e3495edc02e6efbf
567e36b73db7ce7c293d2e8f5378d3968f5838af
ee54f2bab5265d044955d1d29a8564b778c21416
51be46c30ade0a9b0dc1fe0b96f00922f9ae5a78
7e2cd9f56293f69718df015c96cab37960e0e032

7 years agoFix my typo in systemtap.spec.
David Smith [Thu, 4 May 2017 19:02:16 +0000 (14:02 -0500)]
Fix my typo in systemtap.spec.

7 years agoAdd support for the httpd code to systemtap.spec, defaulting to "off".
David Smith [Thu, 4 May 2017 18:51:08 +0000 (13:51 -0500)]
Add support for the httpd code to systemtap.spec, defaulting to "off".

7 years agoEmit deref_fault labels
Richard Henderson [Wed, 26 Apr 2017 18:47:12 +0000 (11:47 -0700)]
Emit deref_fault labels

We used to emit these during dwflpp::express_as_string, after we'd
generated the rest of the body of the embeddedcode node.  Emitting
these unconditionally is, for now at least, easier than walking the
tree to figure out if they're needed.

The __attribute__ syntax for labels dates from gcc 4.2.

7 years agoFix some errors in the loc2stap rewrite
Richard Henderson [Fri, 21 Apr 2017 21:12:33 +0000 (14:12 -0700)]
Fix some errors in the loc2stap rewrite

The old code had some hidden side effects within translate_location,
wherein we failed to save the result of the dereference.

7 years agoRemove duplication in deprecated tapset functions
Cody Santing [Wed, 3 May 2017 16:31:39 +0000 (12:31 -0400)]
Remove duplication in deprecated tapset functions

* Removed systemtap version compile conditions on
deprecated functions.  Deprecated functions now refer to their
replacements rather than being a direct copy.

7 years agoman stapprobes: mention that process.begin enumerates
Frank Ch. Eigler [Wed, 3 May 2017 14:58:43 +0000 (10:58 -0400)]
man stapprobes: mention that process.begin enumerates

7 years agoMake changes for RHEL6 in the http web service server code.
David Smith [Tue, 2 May 2017 17:11:29 +0000 (12:11 -0500)]
Make changes for RHEL6 in the http web service server code.

* configure.ac: Accept version 2.17.0 of the uuid library (for RHEL6).
* httpd/Makefile.am: Add ../util.cxx for regexp support that works on
  RHEL6.
* httpd/main.cxx: Ditto.
* httpd/server.cxx: Ditto.
* httpd/server.h: Ditto.
* configure: Regenerated.
* httpd/Makefile.in: Ditto.

7 years agoAdded initial http web service server code.
David Smith [Mon, 1 May 2017 20:55:51 +0000 (15:55 -0500)]
Added initial http web service server code.

* httpd/Makefile.am
* httpd/Makefile.in: Generated.
* httpd/main.cxx: httpd main program source.
* httpd/server.cxx: httpd server framework
* httpd/server.h: httpd server include file
* configure.ac: Make sure we have the microhttpd and uuid libraries before
  trying to build the httpd code.
* Makefile.am: Added 'httpd' subdirectory.
* Makefile.in: Regenerated.
* config.in: Ditto.
* configure: Ditto.

7 years agoPR20988: New strpos() tapset function
Martin Cermak [Thu, 27 Apr 2017 15:54:24 +0000 (17:54 +0200)]
PR20988: New strpos() tapset function

* tapset/string.stp: New strpos() tapset function
* testsuite/systemtap.string/strpos.{stp,exp}: New testcase

7 years agoPR21435: Convenience groupadd for the make install target
Martin Cermak [Thu, 27 Apr 2017 15:52:52 +0000 (17:52 +0200)]
PR21435: Convenience groupadd for the make install target

7 years agoAdd S390 DWARF register names
Richard Henderson [Tue, 25 Apr 2017 17:30:54 +0000 (19:30 +0200)]
Add S390 DWARF register names

Give bpf-translate.cxx mappings for the DWARF register names for S390.

7 years agoAdd PPC DWARF register names
Richard Henderson [Tue, 25 Apr 2017 17:23:58 +0000 (19:23 +0200)]
Add PPC DWARF register names

Give bpf-translate.cxx mappings for the DWARF register names for PPC.

7 years agoAvoid server test failures by fixing test server startup/shutdown.
David Smith [Tue, 25 Apr 2017 19:48:13 +0000 (14:48 -0500)]
Avoid server test failures by fixing test server startup/shutdown.

* testsuite/lib/systemtap.exp: Avoid 'output: can't read "logfile": no
  such variable' tcl errors when starting systemtap server by properly
  handling server logfile.

7 years agoMerge remaining compat and nd_compat syscalls per PR20333.
Martin Cermak [Tue, 25 Apr 2017 09:58:12 +0000 (11:58 +0200)]
Merge remaining compat and nd_compat syscalls per PR20333.

7 years agoGet loc2stap.cxx working with the gcc 4.4 compiler (RHEL6-era).
David Smith [Mon, 17 Apr 2017 16:12:04 +0000 (11:12 -0500)]
Get loc2stap.cxx working with the gcc 4.4 compiler (RHEL6-era).

* loc2stap.cxx: Change some std::to_string() calls to lex_cast() calls to
  make the RHEL6 compiler happy. Also adjust a structure initialization.

7 years agoAdd aarch64 DWARF register names
William Cohen [Mon, 17 Apr 2017 02:57:34 +0000 (22:57 -0400)]
Add aarch64 DWARF register names

To allow systemtap to compile on aarch64 machines with kernels that
supports BPF bpf-translate.cxx needs to have mappings for the DWARF
register names for aarch64.

7 years agoAdd ARM DWARF register names
William Cohen [Sun, 16 Apr 2017 19:44:27 +0000 (15:44 -0400)]
Add ARM DWARF register names

To allow systemtap to compile on 32-bit ARM machines with kernels that
supports BPF bpf-translate.cxx needs to have mappings for the DWARF
register names for ARM.

7 years agoconfigure: Check for linux/bpf.h header.
Mark Wielaard [Fri, 14 Apr 2017 11:52:39 +0000 (13:52 +0200)]
configure: Check for linux/bpf.h header.

Don't build bpf backend support if there is no bpf.h header.
Skip translate_bpf_pass if there is no bpf support.
Regenerate configure and Makefile.in.

7 years agostapbpf/libbpf.c: Define __NR_bpf and initialize anonymous bpf_attr union.
Mark Wielaard [Fri, 14 Apr 2017 10:44:36 +0000 (12:44 +0200)]
stapbpf/libbpf.c: Define __NR_bpf and initialize anonymous bpf_attr union.

__NR_bpf might not be defined in older headers, if so define it ourselves.
Older GCC have trouble initializing anonymous struct fields in a union
directly. Initialize them more explicitly.

7 years agostapbpf/stapbpf.cxx: Define PERF_EVENT_IOC_SET_BPF.
Mark Wielaard [Fri, 14 Apr 2017 10:43:38 +0000 (12:43 +0200)]
stapbpf/stapbpf.cxx: Define PERF_EVENT_IOC_SET_BPF.

PERF_EVENT_IOC_SET_BPF was introduced in 4.1, define it if unknown.

7 years agobpf-translate.cxx: Include elfutils/version.h and check Strent exists.
Mark Wielaard [Fri, 14 Apr 2017 10:40:57 +0000 (12:40 +0200)]
bpf-translate.cxx: Include elfutils/version.h and check Strent exists.

Before elfutils 0.167 the strtab functions were only available through
the unsupported libebl library.

7 years agoloc2stap.cxx (location_context::translate): Initialize implicit_value.
Mark Wielaard [Fri, 14 Apr 2017 10:12:44 +0000 (12:12 +0200)]
loc2stap.cxx (location_context::translate): Initialize implicit_value.

Prevent a error with GCC -Werror=missing-field-initializers.
Explicit set length and data.

7 years agoFix -Wimplicit-fallthrough build errors for bpf code
William Cohen [Wed, 12 Apr 2017 20:13:25 +0000 (16:13 -0400)]
Fix -Wimplicit-fallthrough build errors for bpf code

GCC7 will now error implicit fallthrough's as per sourceware.org/PR7652

7 years agoSquashed commit of the eBPF backend for stap
Richard Henderson [Wed, 5 Apr 2017 17:03:42 +0000 (10:03 -0700)]
Squashed commit of the eBPF backend for stap

7 years agostap-report: also collect kbuild gcc command lines
Frank Ch. Eigler [Mon, 10 Apr 2017 17:45:49 +0000 (13:45 -0400)]
stap-report: also collect kbuild gcc command lines

7 years agoFix PR21363 by getting _struct_sched_attr_u() working on rawhide.
David Smith [Fri, 7 Apr 2017 15:13:41 +0000 (10:13 -0500)]
Fix PR21363 by getting _struct_sched_attr_u() working on rawhide.

* buildrun.cxx (compile_pass): Add autoconf test to check for the
  existence of <uapi/linux/sched/types.h>
* tapset/linux/aux_syscalls.stp: Include <uapi/linux/sched/types.h> if
  STAPCONF_UAPI_LINUX_SCHED_TYPES is defined.
* runtime/linux/autoconf-uapi-linux-sched-types.c: New autoconf test.

7 years agoUpdate tracepoint finding logic for the 'swiotlb' tracepoint group.
David Smith [Wed, 5 Apr 2017 17:50:43 +0000 (12:50 -0500)]
Update tracepoint finding logic for the 'swiotlb' tracepoint group.

* tapsets.cxx (tracepoint_extra_decls): Add support for the 'swiotlb'
  tracepoint group.

7 years agoAdd a new tracepoint test to check compile requirements for each group.
David Smith [Wed, 5 Apr 2017 16:05:04 +0000 (11:05 -0500)]
Add a new tracepoint test to check compile requirements for each group.

* testsuite/systemtap.base/tracepoints_list.exp: Add a new test where we
  make sure that each tracepoint group's compile tweaks are sufficient in
  itself.

7 years agoFix several small items found by a coverty code scan.
David Smith [Wed, 5 Apr 2017 15:28:39 +0000 (10:28 -0500)]
Fix several small items found by a coverty code scan.

* tapsets.cxx (uprobe_derived_probe_group): Add constructor to initialize
  'max_perf_counters'.
* session.cxx (parse_cmdline): Be sure check 'optarg' is NULL before
  trying to use it.
* elaborate.cxx (stat_decl_collector::visit_stat_op): Make sure that if
  iterator is at the end, we don't try to access it anyway.

7 years agoFix PR21353 by correctly handling the compat arch fcntl syscall
Martin Cermak [Wed, 5 Apr 2017 12:45:16 +0000 (14:45 +0200)]
Fix PR21353 by correctly handling the compat arch fcntl syscall

7 years agoman: add a note about direct pointer dereferencing
Ruslan Kuprieiev [Tue, 4 Apr 2017 13:06:52 +0000 (16:06 +0300)]
man: add a note about direct pointer dereferencing

It is currently not very clear how to dereference a pointer to
a basic type, so lets add two notes about it to man pages.

Signed-off-by: Ruslan Kuprieiev <rkuprieiev@cloudlinux.com>
7 years agoPR21297 Add support for new statx syscall
Martin Cermak [Tue, 4 Apr 2017 08:25:22 +0000 (10:25 +0200)]
PR21297 Add support for new statx syscall

tapset/linux/aux_syscalls.stp: Add _statx_mask_str()
tapset/linux/i386/syscall_num.stp: Add statx syscall info
tapset/linux/x86_64/syscall_num.stp: Ditto
tapset/linux/sysc_statx.stp: New syscall tapset
testsuite/buildok/nd_syscalls2-detailed.stp: New buildok test
testsuite/buildok/syscalls2-detailed.stp: Ditto
testsuite/systemtap.syscall/stat.c: New statx syscall subtest

7 years agoAdd a minor tweak to syscall_consistency.exp.
David Smith [Mon, 3 Apr 2017 15:48:51 +0000 (10:48 -0500)]
Add a minor tweak to syscall_consistency.exp.

* testsuite/systemtap.syscall/syscall_consistency.exp (get_syscalls):
  Provide a default value for the 'scname' variable.

7 years agoTweak elfutils version discovery in the testsuite.
David Smith [Fri, 31 Mar 2017 19:36:40 +0000 (14:36 -0500)]
Tweak elfutils version discovery in the testsuite.

* testsuite/lib/systemtap.exp (get_system_info): If we're running a
  version of systemtap compiled with version X of elfutils, but running
  with version Y of elfutils (where Y > X), the elfutils version gets
  reported as 'Y/X'. Make sure to parse this correctly.

7 years agoComment in session.cxx to explain elfutils build/run version strings.
Frank Ch. Eigler [Fri, 31 Mar 2017 12:28:05 +0000 (08:28 -0400)]
Comment in session.cxx to explain elfutils build/run version strings.

7 years agoNo longer kfail semok/autocast14.stp.
David Smith [Wed, 29 Mar 2017 20:15:03 +0000 (15:15 -0500)]
No longer kfail semok/autocast14.stp.

* testsuite/systemtap.pass1-4/semok.exp: Since code to fix PR18079 has
  been committed, remove the kfail for semok/autocast14.stp.

7 years agoWorkaround parser issue in nfs_proc.stp.
David Smith [Tue, 28 Mar 2017 21:36:30 +0000 (16:36 -0500)]
Workaround parser issue in nfs_proc.stp.

* tapset/linux/nfs_proc.stp (nfs.proc3.read_done): To avoid parser issues,
  split up @choose_defined() code into two separate if statements. Note
  that this is a workaround until we can fix the parser issue.
  (nfs.proc4.read_done): Ditto.

7 years agoAdapt stapdyn to the dyninst 9.3.1 library search model.
Stan Cox [Tue, 28 Mar 2017 18:39:14 +0000 (14:39 -0400)]
Adapt stapdyn to the dyninst 9.3.1 library search model.

stapdyn/dynutil.cxx (check_dyninst_rt): Use DYNINST_REWRITER_PATHS
and appendenv

util.c, util.h:  New: appendenv.

7 years agoFix BZ1431263 commit by removing unused arg.
David Smith [Mon, 27 Mar 2017 16:36:42 +0000 (11:36 -0500)]
Fix BZ1431263 commit by removing unused arg.

* tapsets.cxx (enroll): Remove unused systemtap_session argument.

7 years agoBZ1431263: Remove "too many hardware breakpoint probes" warning.
David Smith [Mon, 27 Mar 2017 16:16:53 +0000 (11:16 -0500)]
BZ1431263: Remove "too many hardware breakpoint probes" warning.

* tapsets.cxx (hwbkpt_derived_probe_group::enroll): Remove warning about
  too many hardware breakpoint probes, since we can't really know how many
  this system supports until we try to register them.

7 years agoBZ1431263: Add hardware breakpoint functional test.
David Smith [Mon, 27 Mar 2017 15:33:14 +0000 (10:33 -0500)]
BZ1431263: Add hardware breakpoint functional test.

* testsuite/systemtap.base/hw_breakpoint.exp: New hardware breakpoint
  test.
* testsuite/systemtap.base/stap_hwbkpt_kmod.Makefile: Ditto.
* testsuite/systemtap.base/stap_hwbkpt_kmod.c: Ditto.

7 years agoBZ1431263: Always use HW_BREAKPOINT_LEN_* macros.
David Smith [Mon, 27 Mar 2017 15:32:50 +0000 (10:32 -0500)]
BZ1431263: Always use HW_BREAKPOINT_LEN_* macros.

* tapsets.cxx (hwbkpt_derived_probe_group::emit_module_init): Always use
  HW_BREAKPOINT_LEN_* macros, not just on x86_64.

7 years agoBZ1431263: Expect hardware breakpoint scripts compile failures.
David Smith [Mon, 27 Mar 2017 14:37:47 +0000 (09:37 -0500)]
BZ1431263: Expect hardware breakpoint scripts compile failures.

* testsuite/systemtap.pass1-4/buildok.exp: Expect hwbkpt.stp compilation
  to fail on systems (like arm64) where hwbkpt_probes_p returns false.
* testsuite/systemtap.pass1-4/buildok-interactive.exp: Ditto.

7 years agoBZ1431263: Disable kernel.data probes on arm64.
David Smith [Thu, 23 Mar 2017 21:21:37 +0000 (16:21 -0500)]
BZ1431263: Disable kernel.data probes on arm64.

* tapsets.cxx (hwbkpt_builder::build): On arm64, hardware breakpoint
  probes continually get triggered. So, disable them.

7 years agoFix PR21238 by printing better inode uprobes registration errors.
Vitaly Mayatskikh [Thu, 23 Mar 2017 19:06:37 +0000 (14:06 -0500)]
Fix PR21238 by printing better inode uprobes registration errors.

* runtime/linux/uprobes-inode.c (stapiu_target_reg): Print correct error
  code if registration fails.

7 years agoFixed BZ1430828 by replacing task_exe_file() with current_exe_file().
David Smith [Wed, 22 Mar 2017 20:51:56 +0000 (15:51 -0500)]
Fixed BZ1430828 by replacing task_exe_file() with current_exe_file().

* tapset/linux/task.stp (current_exe_file): New function.
  (task_exe_file): Deprecate and rewrite in terms of
  current_exe_file(). This keeps us from potentially accessing task->mm in
  an unsafe manner.
* testsuite/buildok/task-embedded.stp: Updated.
* testsuite/systemtap.base/task_paths.exp: Ditto.
* testsuite/systemtap.base/task_paths.stp: Ditto.
* NEWS: Add deprecation comment.
* doc/SystemTap_Tapset_Reference/man3/function::task_exe_file.3stap:
  Ditto.
* doc/SystemTap_Tapset_Reference/man3/function::current_exe_file.3stap:
  New file.

7 years agogcc PR80115: sys/sdt.h: tweak i386 argument passing
Jakub Jelinek [Tue, 21 Mar 2017 21:04:08 +0000 (17:04 -0400)]
gcc PR80115: sys/sdt.h: tweak i386 argument passing

Use %w[arg] to request that widened forms of register names be passed
to the sys/sdt.h macro operand strings, so as to avoid nominating
sub-registers such as %sil within -m32 code, which gcc <= 6 sometimes
buggily did.

7 years agoBZ1431263: Fix hardware breakpoint probe handler return types.
David Smith [Tue, 21 Mar 2017 20:49:11 +0000 (15:49 -0500)]
BZ1431263: Fix hardware breakpoint probe handler return types.

* tapsets.cxx (hwbkpt_derived_probe_group::emit_module_decls): Fix
  hardware breakpoint probe handler return type - changed from 'int' to
  'void' to match the kernel.
  (hwbkpt_derived_probe_group::emit_module_init): Ditto.

7 years agoPR21255: Fix missing __set_task_state() definition.
David Smith [Fri, 17 Mar 2017 15:44:12 +0000 (10:44 -0500)]
PR21255: Fix missing __set_task_state() definition.

* runtime/stp_utrace.c: Fix missing __set_task_state() definition. If we
  can't find a __set_task_state() definition, define our own.

7 years agoPR21255: Fix missing get_task_mm() declaration.
David Smith [Fri, 17 Mar 2017 14:36:42 +0000 (09:36 -0500)]
PR21255: Fix missing get_task_mm() declaration.

* buildrun.cxx (compile_pass): Add <linux/sched/mm.h> autoconf test. This
  was caused by the following kernel commit:

    commit 6e84f31522f931027bf695752087ece278c10d3f
    Author: Ingo Molnar <mingo@kernel.org>
    Date:   Wed Feb 8 18:51:29 2017 +0100

        sched/headers: Prepare for new header dependencies before moving
        code to <linux/sched/mm.h>
* runtime/linux/access_process_vm.h: Include <linux/sched.h> and, if it
  exists, <linux/sched/mm.h>.
* runtime/linux/autoconf-sched-mm.c: New file.

7 years agoFix BZ1425568 by updating task_dentry_path() to handle chroot().
David Smith [Fri, 10 Mar 2017 16:15:48 +0000 (10:15 -0600)]
Fix BZ1425568 by updating task_dentry_path() to handle chroot().

* tapset/linux/dentry.stp (task_dentry_path): Fix task_dentry_path when
  called on a target executable that has run chroot().
* testsuite/systemtap.base/task_dentry_path.exp: Add test for chroot'ed
  executable.
* testsuite/systemtap.base/task_dentry_path3.stp: New test.

7 years agoAdd PR19021 test case to task_dentry_path.exp.
David Smith [Thu, 9 Mar 2017 17:11:49 +0000 (11:11 -0600)]
Add PR19021 test case to task_dentry_path.exp.

7 years agoFor custom built upstream kernels on Debian, fix version detection
Ritesh Raj Sarraf [Thu, 2 Mar 2017 18:21:05 +0000 (23:51 +0530)]
For custom built upstream kernels on Debian, fix version detection

Debian Bug: 856461

rrs@learner:~$ stap-prep
dpkg: warning: version '(gcc' has bad syntax: version number does not start with digit
Package linux-image-4.10.1+ version 4.10.1+-20 does not match version of currently running kernel: (gcc
 Consider apt-get upgrade && reboot
dpkg: warning: version '(gcc' has bad syntax: version number does not start with digit
Package linux-headers-4.10.1+ version 4.10.1+-20 does not match version of currently running kernel: (gcc
 Consider apt-get upgrade && reboot
You need package linux-image-4.10.1+-dbgsym but it does not seem to be available
 Debian -dbgsym packages are typically in a separate repository
 Follow https://wiki.debian.org/AutomaticDebugPackages to add this repository
2017-03-02 / 23:32:37 ♒♒♒  ☺

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
7 years agoSet correct updated message for Debian
Ritesh Raj Sarraf [Thu, 2 Mar 2017 18:21:04 +0000 (23:51 +0530)]
Set correct updated message for Debian

Debian now provides debug symbol packages for all its packages,
including for the Linux kernel.
There is a separate repository for debug symbol packages.

This patch updates those details.
Thanks to Jack Henschel for reporting the bug and the fix

Signed-off-by: Ritesh Raj Sarraf <rrs@debian.org>
7 years agoImprove syscall test case results on newer powerpc kernels.
David Smith [Mon, 6 Mar 2017 22:31:12 +0000 (16:31 -0600)]
Improve syscall test case results on newer powerpc kernels.

* testsuite/systemtap.syscall/getrandom.c: Improved.
* testsuite/systemtap.syscall/kexec_load.c: Add support for
  kexec_file_load() to be unimplemented.
* testsuite/systemtap.syscall/tapset/syscall.stp: Mark kexec_file_load()
  as unimplemented on powerpc.

7 years agoRegenerated tapset/linux/ARCH/syscall_num.stp files.
David Smith [Mon, 6 Mar 2017 22:25:06 +0000 (16:25 -0600)]
Regenerated tapset/linux/ARCH/syscall_num.stp files.

* scripts/dump-syscalls.sh: Added comment about how to obtain strace
  source.
* tapset/linux/arm/syscall_num.stp: Regenerated from the v4.16-27-gdb316ec
  version of strace.
* tapset/linux/arm64/syscall_num.stp: Ditto.
* tapset/linux/i386/syscall_num.stp: Ditto.
* tapset/linux/mips/syscall_num.stp: Ditto.
* tapset/linux/powerpc/syscall_num.stp: Ditto.
* tapset/linux/x86_64/syscall_num.stp: Ditto.

7 years agoFix s390x-specific syscall tests.
David Smith [Thu, 2 Mar 2017 21:25:17 +0000 (15:25 -0600)]
Fix s390x-specific syscall tests.

* testsuite/buildok/syscalls-arch-detailed.stp: Made s390x probe tests
  optional, since the underlying probes don't exist on the 4.10 kernel.
* testsuite/buildok/nd_syscalls-arch-detailed.stp: Ditto.

7 years agoFix s390x compile error in runtime/stack-s390.c.
David Smith [Thu, 2 Mar 2017 21:23:28 +0000 (15:23 -0600)]
Fix s390x compile error in runtime/stack-s390.c.

* runtime/stack-s390.c (__stp_stack_print): Update code to let it compile
  on the 4.10 kernel. Kernel commit d5c352c moved 'thread_info' into
  task_struct.

7 years agoPR20600: Don't use 'time' uninitialized in __stp_time_local_update().
David Smith [Thu, 2 Mar 2017 19:11:35 +0000 (13:11 -0600)]
PR20600: Don't use 'time' uninitialized in __stp_time_local_update().

* runtime/time.c (__stp_time_local_update): Make sure to initialize 'time'
  before use.

7 years agoUpdate lookup_bad_addr() for platforms where user_addr_max() doesn't exist.
David Smith [Thu, 2 Mar 2017 17:14:47 +0000 (11:14 -0600)]
Update lookup_bad_addr() for platforms where user_addr_max() doesn't exist.

* runtime/linux/addr-map.c (lookup_bad_addr): Handle platforms (like
  s390x) where in_task() exists, but user_addr_max() doesn't.

7 years agoFix PR20600 by updating __stp_time_local_update().
David Smith [Tue, 28 Feb 2017 16:12:06 +0000 (10:12 -0600)]
Fix PR20600 by updating __stp_time_local_update().

* runtime/time.c (__stp_time_local_update): Fix PR20600 by changing the
  way we disable/reenable interrupts.

7 years agodummy commit to test git fsckObjects
Frank Ch. Eigler [Fri, 24 Feb 2017 17:56:54 +0000 (12:56 -0500)]
dummy commit to test git fsckObjects

7 years agoUpdate the vfs.stp tapset for newer kernels.
David Smith [Wed, 22 Feb 2017 16:04:00 +0000 (10:04 -0600)]
Update the vfs.stp tapset for newer kernels.

* tapset/linux/vfs.stp: Since the __block_write_begin() function can be
  inlined on newer kernels, we'll also probe
  __block_write_begin_int(). Also, check to see if '$file' is defined
  before using it in _vfs.block_write_begin.return.

7 years agosamples: add cve-2017-6074 security band-aid
Frank Ch. Eigler [Wed, 22 Feb 2017 14:53:50 +0000 (09:53 -0500)]
samples: add cve-2017-6074 security band-aid

7 years agoPR21190: Only build with --enable-sqlite on fedora17+ and rhel7+.
Martin Cermak [Tue, 21 Feb 2017 14:42:25 +0000 (15:42 +0100)]
PR21190: Only build with --enable-sqlite on fedora17+ and rhel7+.

Build with --enable-sqlite on systems having at least sqlite-3.7.

7 years agoAutoreconf after version update (3.1 -> 3.2).
Martin Cermak [Mon, 20 Feb 2017 15:43:24 +0000 (16:43 +0100)]
Autoreconf after version update (3.1 -> 3.2).

This fixes the `make rpm` target, so that it works out of the box.

7 years agoBegin next release cycle
Cody Santing [Fri, 17 Feb 2017 18:49:19 +0000 (13:49 -0500)]
Begin next release cycle

* NEWS: Add section for version 3.2
* configure.ac: Bump version to 3.2
* doc/SystemTap_Beginners_Guide/en-US/Book_Info.xml: same
* systemtap.spec: same
* testsuite/configure.ac: same

7 years agosystemtap.spec: changelog date for release release-3.1
Frank Ch. Eigler [Fri, 17 Feb 2017 17:37:01 +0000 (12:37 -0500)]
systemtap.spec: changelog date for release

7 years agoNEWS: release date set
Frank Ch. Eigler [Fri, 17 Feb 2017 17:34:38 +0000 (12:34 -0500)]
NEWS: release date set

7 years agoPrerelease updates
Cody Santing [Fri, 17 Feb 2017 17:04:27 +0000 (12:04 -0500)]
Prerelease updates

* .../SystemTap_Beginners_Guide: Update docs using ./scripts/update-docs
* .../syscalls.3stap: same
* .../syscalls.xmlpart: same
* session.cxx: Update copyright year
* stapdyn/stapdyn.cxx: same
* staprun/common.c: same

7 years agoUpdate AUTHORS
Cody Santing [Fri, 17 Feb 2017 15:49:45 +0000 (10:49 -0500)]
Update AUTHORS

7 years agoi18n: update-po autoreconfig
Frank Ch. Eigler [Fri, 17 Feb 2017 15:25:36 +0000 (10:25 -0500)]
i18n: update-po autoreconfig

7 years agoREADME: mention c++11 here too
Frank Ch. Eigler [Fri, 17 Feb 2017 15:22:17 +0000 (10:22 -0500)]
README: mention c++11 here too

7 years agoNEWS: mention c++11
Frank Ch. Eigler [Fri, 17 Feb 2017 15:18:00 +0000 (10:18 -0500)]
NEWS: mention c++11

7 years agoPR20236 cont'd: runtime: preempt_disable* around strncpy_from_user()
Frank Ch. Eigler [Fri, 17 Feb 2017 15:12:30 +0000 (10:12 -0500)]
PR20236 cont'd: runtime: preempt_disable* around strncpy_from_user()

After commit 906d6fe632cc9, we delegate to normal kernel routines for
some more userspace-kernelspace copying jobs.  On some old kernels, on
some architectures, these functions make more assumptions about
atomicity than other stap runtime was guaranteeing.  Out of abundance
of caution (and positive test results on conversions.exp), we add a
manual (redundant?) preempt_disable/enable wrap around this call.

7 years agoAdded a small kludge to systemtap.context/symfile.tcl.
David Smith [Thu, 16 Feb 2017 18:23:09 +0000 (12:23 -0600)]
Added a small kludge to systemtap.context/symfile.tcl.

7 years agoFix python tapset errors.
David Smith [Wed, 15 Feb 2017 22:05:41 +0000 (16:05 -0600)]
Fix python tapset errors.

* tapset/python2.stp (python2_get_var_obj): Fix the returned value of the
  2nd function variant.
* tapset/python3.stp (python3_get_var_obj): Ditto.

7 years agoip tapset: separate @cast alternative headers
Frank Ch. Eigler [Wed, 15 Feb 2017 19:20:37 +0000 (14:20 -0500)]
ip tapset: separate @cast alternative headers

The @cast(x,y,"<A><B>") construct is not an alternation facility
between headers A and B.  It's a conjunction.  If a structure is
declared either in A or B, separate @cast()s are required.  Adapt to
this corrected understanding for three iphdr disassembly functions.

7 years agoUpdate python 3 module list in tapset/python3.stp.
David Smith [Tue, 14 Feb 2017 22:47:41 +0000 (16:47 -0600)]
Update python 3 module list in tapset/python3.stp.

7 years agoUpdated testsuite/buildok/dentry-embedded.stp.
David Smith [Tue, 14 Feb 2017 22:45:39 +0000 (16:45 -0600)]
Updated testsuite/buildok/dentry-embedded.stp.

* testsuite/buildok/dentry-embedded.stp: Added missing functions and
  reorganized to match tapset function order.

7 years agoBetter PR21102 fix: Smarter ioblock.stp tapset update for newer kernels.
David Smith [Tue, 14 Feb 2017 22:44:01 +0000 (16:44 -0600)]
Better PR21102 fix: Smarter ioblock.stp tapset update for newer kernels.

* tapset/linux/ioblock.stp: Updated copyright dates. Better fix for
  PR21102 by handling 4.9 kernels properly. Added a new 'opf' field to the
  ioblock probes.
  (bio_op): New function.
* testsuite/buildok/ioblock-embedded.stp: Added bio_op() test.

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