]> sourceware.org Git - systemtap.git/log
systemtap.git
6 years agoDo better cleanup when the web server gets an error.
David Smith [Mon, 9 Oct 2017 15:51:42 +0000 (10:51 -0500)]
Do better cleanup when the web server gets an error.

* httpd/backends.cxx (generate_module): Be sure to cleanup the
  posix_span_file_actions, even if we get an error.

6 years agostapbpf: fix global variable initialization bug.
Aaron Merey [Fri, 6 Oct 2017 23:34:24 +0000 (19:34 -0400)]
stapbpf: fix global variable initialization bug.

* bpf-translate.cxx: The translator now adds assignment statements to
  the beginning of the "stap_begin" bpf program in order to initialize
  global variables with any user-supplied default values. Currently there
  is no support for string literals, the translator will still ignore them.
  (struct init_block): manages the resources associated with these
  assignments.

* tapsets.cxx(sort_for_bpf), tapset-been.cxx (sort_for_bpf): immediately
  returns if the probe group pointer is NULL.

* bpf_tests: added new tests and fixed a syntax error in globals1.stp and
  globals2.stp.

6 years agoAdd a PR20516 workaround by using kallsyms_lookup_name to find udelay_simple.
David Smith [Fri, 6 Oct 2017 15:32:53 +0000 (10:32 -0500)]
Add a PR20516 workaround by using kallsyms_lookup_name to find udelay_simple.

* runtime/linux/common_session_state.h (stp_session_init): Use
  kallsyms_lookup_name() to find udelay_simple() if it exists but isn't
  exported.
* runtime/linux/runtime.h: Ditto.
* buildrun.cxx (compile_pass): Add an new autoconf test for
  udelay_simple().
* runtime/linux/autoconf-udelay_simple.c: New file.

6 years agostapbpf: add testsuite.
Aaron Merey [Thu, 5 Oct 2017 17:48:29 +0000 (13:48 -0400)]
stapbpf: add testsuite.

* testsuite/systemtap.bpf/bpf.exp: Driver for testsuite. Call
  make installcheck with RUNTESTFLAGS='bpf.exp' to run this testsuite.

* tapset/logging.stp (error): added version of error() for bpf runtime.

6 years agostapbpf: fix evaluation of comparison expressions.
Aaron Merey [Thu, 5 Oct 2017 17:22:36 +0000 (13:22 -0400)]
stapbpf: fix evaluation of comparison expressions.

* bpf-translate.cxx (bpf_unparser::emit_cond): correct the order
  of arguments in the call to mk_jcond().

6 years agostapbpf: fix context variable segfault, improve adherence to bpf's calling conventions.
Aaron Merey [Thu, 5 Oct 2017 17:19:56 +0000 (13:19 -0400)]
stapbpf: fix context variable segfault, improve adherence to bpf's calling conventions.

* bpf-translate.cxx: Added missing assignment statements for bpf_unparser's
  'result' member. r0 is no longer used to pass arguments to bpf functions.

6 years agostapbpf: fix temporary registers appearing in translator output and null ptr deref.
Aaron Merey [Thu, 5 Oct 2017 16:35:44 +0000 (12:35 -0400)]
stapbpf: fix temporary registers appearing in translator output and null ptr deref.

* bpf-opt.cxx (reg_alloc): When replacing temp registers with hard registers in
  bpf instructions, allow for a maximum of 10 dereferences of vector "partition",
  up from 2.
  (post_alloc_cleanup): Avoid removing redundant instructions if they
  are their block's only instruction since removing them will cause a null pointer
  deref in bpf-translate.cxx (output_probe).

6 years agoAdd the server version number to the http protocol.
David Smith [Thu, 5 Oct 2017 17:31:26 +0000 (12:31 -0500)]
Add the server version number to the http protocol.

* httpd/api.cxx (result_info::generate_response): Send the server version
  number to the client.
  (build_info::generate_response): Ditto.
* client-http.cxx (unpack_response): Get the server version number.

6 years agopowerpc: Change SDT argument constraint
Sandipan Das [Thu, 5 Oct 2017 09:09:41 +0000 (14:39 +0530)]
powerpc: Change SDT argument constraint

With the 'o' memory constraint, any memory operand which
has an offsettable address is allowed. However, for some
architectures such as powerpc, this allows operands like
the ones shown below in the readelf output from Fedora 26
to be generated.

  $ readelf -n /lib64/libc.so.6 | grep memory_mallopt_mmap_max -A2 -B2
    stapsdt              0x0000006c NT_STAPSDT (SystemTap probe descriptors)
      Provider: libc
      Name: memory_mallopt_mmap_max
      Location: 0x00000000000a0274, Base: 0x00000000001ccb90, Semaphore: 0x0000000000000000
      Arguments: -4@9 -4@.LANCHOR0+44@toc@l(8) -4@.LANCHOR0+52@toc@l(7)

The second and third argument shown above are both having
operands which are pointers to static data anchors. Since
these static anchors are not included in the symbol table,
they cannot be resolved from the binary itself. So, such
arguments cannot be read via their corresponding markers.

Using the 'Z' memory constraint instead solves this issue
as it will only allow a memory operand that is an indexed
or indirect from a register.

So, for powerpc, we set STAP_SDT_ARG_CONSTRAINT to 'nZr'
but keep it as 'nor' for all other architectures.

Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
6 years agoconfigury: disable http parts by default
Frank Ch. Eigler [Thu, 5 Oct 2017 16:03:55 +0000 (12:03 -0400)]
configury: disable http parts by default

Also, move the stapbpf -lpthread out of the generated configure/ file
and into stapbpf/Makefile.am.

6 years agoAdd more http client updates and rearrange some code.
David Smith [Wed, 4 Oct 2017 20:48:19 +0000 (15:48 -0500)]
Add more http client updates and rearrange some code.

* client-nss.cxx: Moved MOK_PUBLIC_CERT_NAME to cscommon.h.
  (nss_client_backend:nss_client_backend): Moved here from client-nss.h.
  (process_response): Moved to csclient.cxx.
* client-nss.h (nss_client_backend): Moved class constructor to
  client-nss.cxx.
* client-http.h (http_client_backend): Moved class constructor to
  client-http.cxx.
* client-http.cxx (http_client_backend::http_client_backend): Moved here
  from header file and initialize 'server_tmpdir'.
  (http_client_backend::unpack_response): Move processing from
  process_response() to here and delete process_response().
* csclient.cxx (process_response): Moved from client-nss.cxx.
* csclient.h: Move 'process_response' from the backend to the main
  code. Add 'server_tmpdir' and 'server_version' to the backend.
* cscommon.h: Move MOK_PUBLIC_CERT_NAME and MOK_PUBLIC_CERT_FILE
  definitions here.
* stap-serverd.cxx: Remove MOK_PUBLIC_CERT_NAME and MOK_PUBLIC_CERT_FILE
  definitions.
* util.cxx: Add another write_to_file() template instantiation.

6 years agoAdd more http client updates.
David Smith [Mon, 2 Oct 2017 21:29:08 +0000 (16:29 -0500)]
Add more http client updates.

* client-http.cxx (http_client::download): Turn off following HTML
  redirects, so we can handle things ourselves.
  (http_client::get_response_code): New function.
  (http_client_backend::find_and_connect_to_server): Don't try to look up
  details for the "kernel" module. Reverse return value logic - only
  return success if everything worked.
  (http_client_backend::process_response): Rework logic to keep looping
  until we get a 303 response code. The next GET should be our result
  info. Make the "files" array optional, since not all stap requests
  return a module.

6 years agoFix PR22158 by fixing the shutdown sequence of events.
David Smith [Wed, 27 Sep 2017 21:43:33 +0000 (16:43 -0500)]
Fix PR22158 by fixing the shutdown sequence of events.

* runtime/stp_utrace.c (utrace_exit): Free everything.
  (utrace_cleanup): No longer cancel pending task_work requests.
  (utrace_cancel_all_task_work): New function.
  (untrace_shutdown): Cancel all pending task_work requests, wait on all
  running items to finish, then free everything.
* runtime/linux/task_finder2.c (__stp_tf_cancel_all_task_work): Renamed
  from __stp_tf_cancel_task_work.
  (__stp_tf_free_all_task_work) New function.
  (stap_stop_task_finder): Just cancel all pending task_work requests
  before waiting for them to finish. After they have all finished, free
  everything.

6 years agoEmit correct kernel rpm syntax.
Stan Cox [Fri, 22 Sep 2017 18:28:59 +0000 (14:28 -0400)]
Emit correct kernel rpm syntax.

* client-http.cxx (http_client_backend::find_and_connect_to_server):
  Emit correct kernel rpm syntax.

6 years agoUpdate testsuite/systemtap.base/optim_arridx.exp.
David Smith [Fri, 22 Sep 2017 13:07:31 +0000 (08:07 -0500)]
Update testsuite/systemtap.base/optim_arridx.exp.

* testsuite/systemtap.base/optim_arridx.exp: Commit cbc169736 changed the
  contents of the exit() function. Update the expected output.

6 years agoAdd some http client updates.
David Smith [Thu, 21 Sep 2017 20:41:21 +0000 (15:41 -0500)]
Add some http client updates.

* client-http.cxx (http_client::post): Reindent a bit and add FIXME
  comment.
  (http_client::add_script_file): Don't assume a placeholder for the
  script file.
  (http_client_backend::process_response): Instead of calling
  json_object_to_json_string(), call json_object_get_string(). The former
  returns a quoted string (and turns '/' into '\/'). The latter returns a
  "raw" string, which is what we want.

6 years agoFix PR22155 by avoiding a kernel panic.
Tetsuo Handa [Thu, 21 Sep 2017 15:09:44 +0000 (10:09 -0500)]
Fix PR22155 by avoiding a kernel panic.

* runtime/linux/task_finder.c (__stp_call_mmap_callbacks_for_task):
  Instead of a 'struct path' pointer, store the 'struct path' structure
  itself in vma_cache_t.
* runtime/linux/task_finder2.c: Ditto.

6 years agoMerge branch 'master' of ssh://sourceware.org/git/systemtap
David Smith [Thu, 21 Sep 2017 14:47:00 +0000 (09:47 -0500)]
Merge branch 'master' of ssh://sourceware.org/git/systemtap

6 years agoFix PR22151 by not trying to use a pmap when it is NULL.
David Smith [Thu, 21 Sep 2017 14:46:39 +0000 (09:46 -0500)]
Fix PR22151 by not trying to use a pmap when it is NULL.

* runtime/pmap-gen.c (_stp_pmap_new*): If pmap allocation fails, don't try
  to use it.

6 years agostapbpf: fix kprobe registration bugs
Aaron Merey [Wed, 20 Sep 2017 23:45:34 +0000 (19:45 -0400)]
stapbpf: fix kprobe registration bugs

* stapbpf/stapbpf.cxx: Perform _stext-based relocation on kprobe addresses.
  Use symbol name instead of symbol address for kretprobes registration.

* tapsets.cxx (generic_kprobe_derived_probe): Add member sym_name_for_bpf.
  (args_for_bpf): bo file now includes proper kprobe registration info.

* tapset/bpf/exit.stp, tapset/logging.stp: _set_exit_flag() renamed to
  _set_exit_status().

6 years agostapbpf: fix printf(), add exit()
Aaron Merey [Tue, 19 Sep 2017 23:09:33 +0000 (19:09 -0400)]
stapbpf: fix printf(), add exit()

* bpf-translate.cxx:
  All bpf programs produced by the translator now include a bpf map
  containing internal globals intended for use by the runtime. Currently
  this map contains a single element which indicates whether exit()
  has been called.

  Add support for BPF_LD_MAP pseudo-instruction for tapsets with
  embedded bytecode.

  Add tags to printf() format strings to facilitate parsing from trace
  buffer at runtime.

* bpf-internal.h (struct globals): Add ABI for internal globals.

* configure: Add "-pthread" to stapbpf_LIBS

* main.cxx (passes_0_4): Include "/bpf" as a possible runtime_prefix

* parse.cxx (eval_pp_conditional): Include "bpf" as option for
  runtime-based preprocessor conditionals.

* stapbpf/bpfinterp.cxx: Add function remove_tags().

* stapbpf/libbpf.c: Fix bug where some bpf_attrs weren't memset to 0
  upon initialization.

* stapbpf/stapbpf.cxx: Add functions init_internal_globals(),
  get_exit_status(), print_trace_output(). sigint() now sets
  exit status.

* tapset/bpf/exit.stp: Add function _set_exit_status()

* tapset/logging.stp: Add version of exit() for bpf runtime.

6 years agoAvoid "confusing usage" warnings in tcpmib.stp and the tcpipstat.stp example.
David Smith [Wed, 20 Sep 2017 13:31:34 +0000 (08:31 -0500)]
Avoid "confusing usage" warnings in tcpmib.stp and the tcpipstat.stp example.

* tapset/linux/tcpmib.stp: Avoid "confusing usage, consider @entry($sk) in
  .return probe" translator warnings by using @entry().
* testsuite/systemtap.examples/network/tcpipstat.stp: Ditto.

6 years agoGet stapregex-dfa.cxx compiling.
David Smith [Tue, 19 Sep 2017 16:02:48 +0000 (11:02 -0500)]
Get stapregex-dfa.cxx compiling.

* stapregex-dfa.cxx: Fix some unsigned vs signed comparison problems, so
  that gcc doesn't complain.

6 years agoFix PR22158 by updating the runtime to handle the removal of spin_unlock_wait.
David Smith [Tue, 19 Sep 2017 15:51:54 +0000 (10:51 -0500)]
Fix PR22158 by updating the runtime to handle the removal of spin_unlock_wait.

* runtime/stp_helper_lock.h: Removed stp_spin_unlock_wait(), since the
  underlying kernel functionality was removed in kernel commit
  d3a024abbc43827785.
* runtime/stp_utrace.c (utrace_finish_stop): Instead of calling
  stp_spin_unlock_wait(), just try to lock and unlock the spin lock.

6 years agoregexp post-merge cleanup
Frank Ch. Eigler [Fri, 15 Sep 2017 19:07:44 +0000 (15:07 -0400)]
regexp post-merge cleanup

Just little type / doc / test tweaks.

6 years agoMerge remote-tracking branch 'serhei/serhei/tnfa-submit'
Frank Ch. Eigler [Fri, 15 Sep 2017 18:49:20 +0000 (14:49 -0400)]
Merge remote-tracking branch 'serhei/serhei/tnfa-submit'

* serhei/serhei/tnfa-submit:
  PR15065 documentation :: doc/langref.tex
  PR15065 documentation :: NEWS and man/stap.1.in
  stapregex PR15065 (8/8) :: add back re2c's mini-optimizer
  stapregex PR15065 (7/8) :: Core algorithm -- emit TNFA actions.
  stapregex PR15065 (6/8) :: Core algorithm -- compute TNFA actions.
  stapregex PR15065 (5/8) :: correctly number tags in stapregex-parse
  stapregex PR15065 (4/8) :: switch DFA engine to an unsigned char type
  stapregex PR15065 (3/8) :: translator integration bits
  stapregex PR15065 (2/8) :: add grouping testsuite
  stapregex PR15065 (1/8) :: add tapset/regex.stp

6 years agoAvoid pulling in old compatibility RPM 4.4 API
William Cohen [Fri, 15 Sep 2017 15:37:36 +0000 (11:37 -0400)]
Avoid pulling in old compatibility RPM 4.4 API

RPM 4.14.0 rc1 removes a number of RPM 4.4 compatibility APIs enabled by
_RPM_4_4_COMPAT define.  SystemTap has been updated to the newer API
and keeping this define causes the build to fail on Fedora rawhide.

6 years agoUpdate systemtap.stress/conversions.exp.
David Smith [Thu, 14 Sep 2017 21:42:55 +0000 (16:42 -0500)]
Update systemtap.stress/conversions.exp.

* testsuite/systemtap.stress/conversions.exp (run_conv_test): Turn off
  overload protection so that we get the right errors ("copy fault") and
  not the wrong errors ("probe took too long").

6 years agoSuppress spurious "never-assigned" warnings for globals set via '-G'.
Arjun Shankar [Thu, 14 Sep 2017 20:46:23 +0000 (15:46 -0500)]
Suppress spurious "never-assigned" warnings for globals set via '-G'.

6 years agowork around bpf valgrind errors
Frank Ch. Eigler [Thu, 14 Sep 2017 17:09:18 +0000 (13:09 -0400)]
work around bpf valgrind errors

The bpf infrastructure has a complex graph data types, which are
created, mutated, partly deleted, added etc., representing a
worst-case scenario for a statically typed non-GC system like c++.
The following little test case triggers memory corruption
(access-after-free).

./stap --runtime=bpf -p4 -e 'probe  kernel.function("sys_open")
        {x = 1; if (x) x = 0; else x = 2 } '

This patch disables some of the responsible code - by turning off
program::program destructors' detailed cleanup of the embedded graph
structure.  So we leak memory instead. :-(

Another little hunk deals with an un-C++-ish typecasting error that
valgrind also caught (operator new[] vs. free() on same pointer).

6 years agoImprove fix for PR22117 by updating the translator.
David Smith [Tue, 12 Sep 2017 21:15:47 +0000 (16:15 -0500)]
Improve fix for PR22117 by updating the translator.

* dwflpp.cxx (dwflpp::translate_base_ref): Add an even better fix to the
  number of bytes comparison to avoid "noncontiguous location for base
  fetch" semantic error on 32-bit systems (and not break 64-bit systems).

6 years agoFix PR22124 by properly handling perf counter reads in uretprobes.
David Smith [Tue, 12 Sep 2017 18:51:07 +0000 (13:51 -0500)]
Fix PR22124 by properly handling perf counter reads in uretprobes.

* tapsets.cxx (uprobe_derived_probe_group::emit_module_utrace_decls): Be
  sure to properly handle perf counter reads in uretprobes.
* testsuite/systemtap.base/perf.exp: If this system doesn't support
  hardware perf probes, try with software perf probes.
* testsuite/systemtap.base/perf03sw.stp: New file.
* testsuite/systemtap.base/perf04sw.stp: Ditto.

6 years agoPR15065 documentation :: doc/langref.tex
Serhei Makarov [Tue, 12 Sep 2017 02:27:40 +0000 (22:27 -0400)]
PR15065 documentation :: doc/langref.tex

6 years agoPR15065 documentation :: NEWS and man/stap.1.in
Serhei Makarov [Tue, 12 Sep 2017 02:13:16 +0000 (22:13 -0400)]
PR15065 documentation :: NEWS and man/stap.1.in

6 years agoFix PR22110 by updating the translator.
David Smith [Fri, 8 Sep 2017 19:08:18 +0000 (14:08 -0500)]
Fix PR22110 by updating the translator.

* loc2stap.cxx (location_context::new_symref): Set sym->referent to avoid
  "internal error: unresolved symbol 'pointer'" when processing
  semok/autocast07.stp.

6 years agoFix PR22117 by updating the translator.
David Smith [Fri, 8 Sep 2017 19:05:37 +0000 (14:05 -0500)]
Fix PR22117 by updating the translator.

* dwflpp.cxx (dwflpp::translate_base_ref): Fix number of bytes comparison
  to avoid "noncontiguous location for base fetch" semantic error on
  32-bit systems.

6 years agostapregex PR15065 (8/8) :: add back re2c's mini-optimizer
Serhei Makarov [Fri, 8 Sep 2017 03:04:37 +0000 (23:04 -0400)]
stapregex PR15065 (8/8) :: add back re2c's mini-optimizer

* stapregex-tree.cxx (ins_optimize): New function.
(regexp::compile): Initialize i.marked in newly allocated ins to
stop a harmless but very noisy Valgrind complaint.
* stapregex-tree.h (ins_optimize): New function.
* stapregex-dfa.cxx (stapregex_compile): Invoke ins_optimize.

6 years agostapregex PR15065 (7/8) :: Core algorithm -- emit TNFA actions.
Serhei Makarov [Fri, 8 Sep 2017 01:55:39 +0000 (21:55 -0400)]
stapregex PR15065 (7/8) :: Core algorithm -- emit TNFA actions.

This is the only part of the TNFA functionality that touches
the kernel, so it is crucially important to review for safety.

* stapregex.cxx (stapdfa::emit_declaration): Set up and clean
up tag state, define additional YY* macros used by TNFA actions.
* stapregex-dfa.cxx (span::emit_jump): Add diagnostic printing,
continue matching even after entering an accepting state.
(span::emit_final): Emit finalizer TNFA action, save final
tags if the finalizer produced a suitable longest-match.
(state::emit): Add diagnostic printing, handle unknown chars.
(dfa::emit): Set up tags, emit initializer TNFA action, emit
finalizer when the regex accepts at the first char.
(dfa::emit_action): New function.
(dfa::emit_tagsave): Vestigial functionality -- just sets ntags.

* stapregex-dfa.h (dfa::emit_action): New function.

6 years agostapregex PR15065 (6/8) :: Core algorithm -- compute TNFA actions.
Serhei Makarov [Fri, 8 Sep 2017 01:49:49 +0000 (21:49 -0400)]
stapregex PR15065 (6/8) :: Core algorithm -- compute TNFA actions.

* stapregex-dfa.cxx: Implement Laurikari's TNFA algorithm.
(arc_priority::refine_higher, ::refine_lower): Detect overflow.
(arc_compare): Previous implementation was incorrect, fix it.
(dfa::add_map_item): New function.
(te_closure): Properly consider arc_priorities.
(same_ins): New function.
(dfa::find_equivalent): Algorithm to compute reordering actions.
(dfa::compute_action): Algorithm to compute TNFA actions.
(dfa::compute_finalizer): Algorithm to compute finalizers.
(dfa::dfa): Consider arc_priorities and reordering actions.
(operator << for map_item): New function.
(operator << for tdfa_action): Use << for map_item.
(kernel_point::print): New function.
(state::print): Include diagnostic info for TNFA algorithm.
(operator << for state): New function.
(operator << for dfa): New function.

* stapregex-dfa.h (operator << for map_item): New function.
(struct tdfa_insn): Add save_tag option for finalizers.
(kernel_point::print): New function.
(struct span): Add jump_pairs field.
(struct state): Add dfa field to access containing DFA. Also
add accept_kp field to track TNFA actions for accepting states.
(state::state): Add dfa field to constructor.
(state::print): Use ordinary ostream, not translator_output.
(operator << for state): New function.
(struct dfa): Add success_outcome and fail_outcome field to
explicitly track the indices of 'accept' and 'fail' outcomes.
(dfa::dfa): Add an option to set index of 'accept' outcome.
(dfa::add_map_item): New function.
(dfa::compute_action): New function.
(dfa::compute_finalizer): New function.

* stapregex.cxx (regex_to_stapdfa): Add comment -- here is how
you can force TNFA tag operations to be generated even when the
stap script doesn't request any groups.

6 years agostapregex PR15065 (5/8) :: correctly number tags in stapregex-parse
Serhei Makarov [Fri, 8 Sep 2017 01:44:14 +0000 (21:44 -0400)]
stapregex PR15065 (5/8) :: correctly number tags in stapregex-parse

* stapregex-parse.h (regex_parser):
Replace num_tags with num_subexpressions.

* stapregex-parse.cxx (regex_parser::parse):
Compute num_subexpressions, generate tags for subexpression 0.
(regex_parser::parse_factor): Generate tags for groups '()'.
(regex_parser::parse_char_range): Remove TODOXXX.

6 years agostapregex PR15065 (4/8) :: switch DFA engine to an unsigned char type
Serhei Makarov [Fri, 8 Sep 2017 01:36:29 +0000 (21:36 -0400)]
stapregex PR15065 (4/8) :: switch DFA engine to an unsigned char type

* stapregex-defines.h: New file. The rchar type is an unsigned
char. Within an NFA or DFA, rchar 128 is used to represent
unknown characters (i.e., anything that does not fit within
the ASCII standard encoding). This is placeholder functionality
meant to sanely handle other encodings such as UTF prior to
implementing full support for them.

* stapregex-dfa.h, stapregex-dfa.cxx: Use rchar throughout.
* stapregex-parse.h, stapregex-parse.cxx: Use rchar throughout.
* stapregex-tree.h, stapregex-tree.cxx: Use rchar throughout.
* stapregex.h: Use rchar throughout.

6 years agostapregex PR15065 (3/8) :: translator integration bits
Serhei Makarov [Fri, 8 Sep 2017 01:17:35 +0000 (21:17 -0400)]
stapregex PR15065 (3/8) :: translator integration bits

* elaborate.cxx (typeresolution_info::visit_embeddedcode):
Enable session.need_tagged_dfa.

* session.h (systemtap_session):
Replace dfa_maxstate with dfa_maxmap.
* session.cxx (systemtap_session::systemtap_session):
Replace dfa_maxstate with dfa_maxmap.
* translate.cxx (systemtap_session):
Replace dfa_maxstate with dfa_maxmap.

* stapregex-dfa.h (struct dfa): New variable nmapitems.

* stapregex.h (stapdfa::num_map_items): New function.
* stapregex.cxx (regex_to_stapdfa): Set value of dfa_maxmap.
(stapdfa::num_map_items): New function.

6 years agostapregex PR15065 (2/8) :: add grouping testsuite
Serhei Makarov [Wed, 12 Jul 2017 00:46:42 +0000 (20:46 -0400)]
stapregex PR15065 (2/8) :: add grouping testsuite

* testsuite/runok/regex_grouping.stp:
New file. Testcases with grouping enabled.

* testsuite/runok/regex.stp:
Testcases with grouping disabled (minor fix).

6 years agostapregex PR15065 (1/8) :: add tapset/regex.stp
Serhei Makarov [Thu, 6 Jul 2017 18:17:11 +0000 (14:17 -0400)]
stapregex PR15065 (1/8) :: add tapset/regex.stp

* regex.stp: New tapset providing access to TNFA grouping data.
(matched_str): Return last matched str.
(matched): Return n'th subexpression from last match.
(ngroups): Return the number of subexpressions in last match.

6 years agoFix PR22097 by updating the translator.
David Smith [Thu, 7 Sep 2017 20:30:28 +0000 (15:30 -0500)]
Fix PR22097 by updating the translator.

* dwflpp.cxx (dwflpp::translate_final_fetch_or_store): Add logic that
  prevents trying to take the address of a register (and similar items).

6 years agoFix PR22109 by updating tapset/linux/nfsd.stp for upstream kernel changes.
David Smith [Thu, 7 Sep 2017 19:15:51 +0000 (14:15 -0500)]
Fix PR22109 by updating tapset/linux/nfsd.stp for upstream kernel changes.

* tapset/linux/nfsd.stp: Handle several nfsd function's moving several
  function arguments to fields inside structures in current kernels.

6 years agoGet the systemtap.printf/memory1.exp test case working on rawhide.
David Smith [Thu, 7 Sep 2017 14:46:38 +0000 (09:46 -0500)]
Get the systemtap.printf/memory1.exp test case working on rawhide.

* testsuite/systemtap.printf/memory1_module.c: Update for rawhide systems,
  where <linux/uaccess.h> is needed.

6 years agoGet the "spi" tracepoint group working again on rawhide.
David Smith [Thu, 7 Sep 2017 14:04:44 +0000 (09:04 -0500)]
Get the "spi" tracepoint group working again on rawhide.

* tapsets.cxx (tracepoint_extra_decls): Add another structure declaration
  to get the "spi" tracepoint group working again on rawhide.

6 years agoAdd a better update to tapset/python2.stp for RHEL6-era systems.
David Smith [Wed, 6 Sep 2017 20:04:36 +0000 (15:04 -0500)]
Add a better update to tapset/python2.stp for RHEL6-era systems.

* tapset/python2.stp: Revert 21e0511c6 and check for a field within the
  PyLongObject.

6 years agoCorrectly tweak the key.meta and keyhack.meta testsuite files.
David Smith [Wed, 6 Sep 2017 15:32:30 +0000 (10:32 -0500)]
Correctly tweak the key.meta and keyhack.meta testsuite files.

6 years agoFix PR22087 by updating testsuite/systemtap.base/implicitptr.exp.
David Smith [Wed, 6 Sep 2017 15:11:10 +0000 (10:11 -0500)]
Fix PR22087 by updating testsuite/systemtap.base/implicitptr.exp.

* testsuite/systemtap.base/implicitptr.exp: Update probed line location as
  a result of commit 85166d5f1.

6 years agoFix PR22054 by making sure we know whether a pointer is an lvalue or not.
David Smith [Tue, 5 Sep 2017 18:30:54 +0000 (13:30 -0500)]
Fix PR22054 by making sure we know whether a pointer is an lvalue or not.

* dwflpp.cxx: Pass around 'lvalue' in several places where needed.
  (dwflpp::translate_pointer): Instead of assuming a pointer isn't an
  lvalue, use the new parameter.
* dwflpp.h: Update prototypes.
* tapsets.cxx: Pass around 'lvalue' in several places where needed.

6 years agoFix PR22066 by making stap link correctly when not using nss or http.
Saul Wold [Tue, 5 Sep 2017 14:26:44 +0000 (09:26 -0500)]
Fix PR22066 by making stap link correctly when not using nss or http.

6 years agostaptree pretty-print: mark up register/deref/bitfield nodes with "@" tag
Frank Ch. Eigler [Thu, 31 Aug 2017 19:03:43 +0000 (15:03 -0400)]
staptree pretty-print: mark up register/deref/bitfield nodes with "@" tag

Also, don't claim "fetch" for registers as they may be lvalues.

6 years agoAdd a minor update to the strace example and meta file.
David Smith [Thu, 31 Aug 2017 14:38:18 +0000 (09:38 -0500)]
Add a minor update to the strace example and meta file.

* testsuite/systemtap.examples/process/strace.stp (filter_p): Remove
  comment about PR6762, which has been fixed.
* testsuite/systemtap.examples/process/strace.meta: Run the script on a
  specific process, instead of on the entire system (where we would hit
  "probe overhead exceeded threshold").

6 years agoUpdate tapset/python2.stp for RHEL6-era systems.
David Smith [Thu, 31 Aug 2017 14:35:41 +0000 (09:35 -0500)]
Update tapset/python2.stp for RHEL6-era systems.

* tapset/python2.stp (Py2Long_AsLongLongAndOverflow_Small): Don't bother
  trying to see if the Py2LongObject is defined, go ahead and use it. The
  check to see if it is defined seems to fail.
  (Py2Long_AsLongLongAndOverflow_Big): Ditto.

6 years agoKFAIL more .callee tests in systemtap.unprivileged/unprivileged_myproc.exp.
David Smith [Wed, 30 Aug 2017 20:51:40 +0000 (15:51 -0500)]
KFAIL more .callee tests in systemtap.unprivileged/unprivileged_myproc.exp.

6 years agoSend the kernel build id to the http server.
Stan Cox [Wed, 30 Aug 2017 20:46:09 +0000 (16:46 -0400)]
Send the kernel build id to the http server.

* client-http.cxx (http_client::get_kernel_buildid) New.
(http_client_backend::find_and_connect_to_server):  Use it.

6 years agoFix PR22036 by handling "struct bio" kernel changes.
David Smith [Tue, 29 Aug 2017 21:27:23 +0000 (16:27 -0500)]
Fix PR22036 by handling "struct bio" kernel changes.

* buildrun.cxx (compile_pass): Add "autoconf"-style test for bi_opf field
  of the "bio" structure.
* runtime/linux/autoconf-bio-bi_opf.c: New file.
* tapset/linux/ioblock.stp (bio_op): Use new STAPCONF_BIO_BI_OPF define.

6 years agoFix PR22031 by initializing the context class instance before using it.
David Smith [Tue, 29 Aug 2017 20:26:38 +0000 (15:26 -0500)]
Fix PR22031 by initializing the context class instance before using it.

* dwflpp.cxx (dwflpp::literal_stmt_for_local): Initialize the context 'dw'
  field before using the context.

6 years agoFix PR22012 by updating the way we read user strings.
David Smith [Tue, 29 Aug 2017 16:03:06 +0000 (11:03 -0500)]
Fix PR22012 by updating the way we read user strings.

* runtime/linux/loc2c-runtime.h (_stp_deref_string_nofault): Renamed from
  kderef_string_() and modified to be able to read either a kernel or user
  string.
  (kderef_string): Modified to call the new _stp_deref_string_nofault().
* runtime/linux/copy.c (_stp_strncpy_from_user): Replace all code with a
  call to _stp_deref_string_nofault(). This avoids a "scheduling while
  atomic" kernel BUG seen when reading strings.

6 years agoFix spurious python2/python3 testing failures by increasing MAXACTION.
David Smith [Mon, 28 Aug 2017 21:19:30 +0000 (16:19 -0500)]
Fix spurious python2/python3 testing failures by increasing MAXACTION.

* testsuite/systemtap.python/python2.exp: Increased MAXACTION to avoid
  spurious failures.
* testsuite/systemtap.python/python3.exp: Ditto.

6 years agoFix comments in runtime/linux/loc2c-runtime.h.
David Smith [Mon, 28 Aug 2017 16:49:01 +0000 (11:49 -0500)]
Fix comments in runtime/linux/loc2c-runtime.h.

6 years agoPR22005: Fix @min() and @max() extractor functions.
Martin Cermak [Mon, 28 Aug 2017 11:01:40 +0000 (13:01 +0200)]
PR22005: Fix @min() and @max() extractor functions.

Commit 26382d613f4d26 introduced a regression in @min()
and @max() extractor functions.  Example:

$ stap -e 'global n probe oneshot {n<<<12 n<<<34 println(@max(n))}'
12
$

This commit fixes the regression and adds a testcase.

6 years agoProvide decoded env_str in arch-specific syscall.execve probes.
David Smith [Fri, 25 Aug 2017 20:19:02 +0000 (15:19 -0500)]
Provide decoded env_str in arch-specific syscall.execve probes.

* tapset/linux/arm/sysc_execve.stp: Commit be0c04a changed syscall.execve
  to provide decoded environment variables. Make similar changes to the
  old kernel arch-specific syscall.execve probes.
* tapset/linux/i386/sysc_execve.stp: Ditto.
* tapset/linux/ia64/sysc_execve.stp: Ditto.
* tapset/linux/powerpc/sysc_execve.stp: Ditto.
* tapset/linux/s390/sysc_execve.stp: Ditto.
* tapset/linux/x86_64/sysc_compat_execve.stp: Ditto.
* tapset/linux/x86_64/sysc_execve.stp: Ditto.
* tapset/linux/aux_syscalls.stp: Deprecate the unused __count_envp() and
  __count_compat_envp() functions.
* NEWS: Mention deprecation.
* testsuite/buildok/aux_syscalls-embedded.stp: Handle deprecation.

6 years agoRevert "PR21891: perform _stext relocation on kprobes, fix kretprobe registration."
Aaron Merey [Fri, 25 Aug 2017 18:56:46 +0000 (14:56 -0400)]
Revert "PR21891: perform _stext relocation on kprobes, fix kretprobe registration."

This reverts commit ade4246e43fe0fac66798ce9c37d70f6766238a5.

6 years agoImprove s390x support in testsuite/systemtap.syscall/execve.c.
David Smith [Fri, 25 Aug 2017 18:51:00 +0000 (13:51 -0500)]
Improve s390x support in testsuite/systemtap.syscall/execve.c.

7 years agoTweak more systemtap.examples meta files to improve test passes.
David Smith [Thu, 24 Aug 2017 21:42:51 +0000 (16:42 -0500)]
Tweak more systemtap.examples meta files to improve test passes.

* testsuite/systemtap.examples/general/key.meta: Check that the probed
  kernel function exists before trying to compile/run the example.
* testsuite/systemtap.examples/general/keyhack.meta: Ditto.

7 years agoAdd a small fix to testsuite/systemtap.base/utrace_syscall_args.exp.
David Smith [Thu, 24 Aug 2017 17:43:22 +0000 (12:43 -0500)]
Add a small fix to testsuite/systemtap.base/utrace_syscall_args.exp.

* testsuite/systemtap.base/utrace_syscall_args.exp: Wait 5 seconds when
  running the target executable to be sure to give it time to run.

7 years agoPerform process cleanup in testsuite/systemtap.interactive/*.exp.
David Smith [Thu, 24 Aug 2017 16:00:59 +0000 (11:00 -0500)]
Perform process cleanup in testsuite/systemtap.interactive/*.exp.

* testsuite/systemtap.interactive/char_and_line.exp: Be sure to kill
  systemtap at the end of the test and wait on it to finish.
* testsuite/systemtap.interactive/input.char.exp: Ditto.
* testsuite/systemtap.interactive/input.line.exp: Ditto.

7 years agoAdd a small fix to testsuite/lib/stapi.exp.
David Smith [Thu, 24 Aug 2017 15:45:54 +0000 (10:45 -0500)]
Add a small fix to testsuite/lib/stapi.exp.

* testsuite/lib/stapi.exp (stapi_exit): Make sure we're killing the
  interactive stap process, not just the last spawned process.

7 years agoAdd a fix to the 'container_check' example.
David Smith [Thu, 24 Aug 2017 15:42:58 +0000 (10:42 -0500)]
Add a fix to the 'container_check' example.

* testsuite/systemtap.examples/profiling/container_check.stp: Handle the
  fact that the kernel functions ns_capable() and capable() have different
  function signatures. On RHEL6 systems, we were getting bogus output.

7 years agoTweak some systemtap.examples meta files to improve test passes.
David Smith [Thu, 24 Aug 2017 15:34:22 +0000 (10:34 -0500)]
Tweak some systemtap.examples meta files to improve test passes.

* testsuite/systemtap.examples/memory/hugepage_collapse.meta: Check that
  the probed kernel function exists before trying to compile/run the
  example.
* testsuite/systemtap.examples/memory/hugepage_split.meta: Ditto.
* testsuite/systemtap.examples/general/func_time_stats.meta: Probe
  syscall.read instead of syscall.nanosleep, since we're much more likely
  to hit that syscall.

7 years agoPR21891: perform _stext relocation on kprobes, fix kretprobe registration.
Aaron Merey [Wed, 23 Aug 2017 22:54:49 +0000 (18:54 -0400)]
PR21891: perform _stext relocation on kprobes, fix kretprobe registration.

* stapbpf/stapbpf.cxx (maybe_collect_kprobe): read value of _stext from
  /proc/kallsyms and add to kprobe symbol offsets.
* tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): set symbol_name
  to funcname for kretprobes.

7 years agoFix PR21998 by updating tapset/linux/ip.stp.
David Smith [Wed, 23 Aug 2017 21:00:24 +0000 (16:00 -0500)]
Fix PR21998 by updating tapset/linux/ip.stp.

* tapset/linux/ip.stp: Use the new 'iphdr_cast' macro to properly cast a
  value to a iphdr struture pointer. For RHEL6, this fixes some "kbuild
  exited with status: 2" warnings.

7 years agoAdd small fixes in tapset/linux/memory.stp.
David Smith [Wed, 23 Aug 2017 19:05:21 +0000 (14:05 -0500)]
Add small fixes in tapset/linux/memory.stp.

* tapset/linux/memory.stp: Handle the case where __GFP_MEMALLOC doesn't
  exist (like on RHEL6). In __vm.kmalloc_node.kp, add @entry() around
  variables in a return probe.

7 years agoFix PR21996 by updating DEREF_FAULT for dyninst.
David Smith [Wed, 23 Aug 2017 16:34:56 +0000 (11:34 -0500)]
Fix PR21996 by updating DEREF_FAULT for dyninst.

* runtime/loc2c-runtime.h (DEREF_FAULT): Fix dyninst compile errors on
  32-bit systems where 'intptr_t' is an 'int'. Be sure to cast to 'long'
  in DEREF_FAULT and STORE_DEREF_FAULT before printing the value with
  "%lx".

7 years agoFix PR21991 by casting to a 64-bit value when shifting.
David Smith [Wed, 23 Aug 2017 13:42:17 +0000 (08:42 -0500)]
Fix PR21991 by casting to a 64-bit value when shifting.

* translate.cxx (c_unparser::visit_binary_expression): Cast to 64-bits to
  avoid gcc "shift count >= width of type" errors on 32-bit systems.

7 years agoFix the testsuite/buildok/[nd_]syscalls-arch-detailed.stp tests.
David Smith [Tue, 22 Aug 2017 21:17:37 +0000 (16:17 -0500)]
Fix the testsuite/buildok/[nd_]syscalls-arch-detailed.stp tests.

* testsuite/buildok/nd_syscalls-arch-detailed.stp: Mark the
  nd_syscall.vm86 probe as optional.
* testsuite/buildok/syscalls-arch-detailed.stp: Ditto.

7 years agoFix tapset/linux/timestamp_monotonic.stp on newer kernels.
David Smith [Tue, 22 Aug 2017 21:16:06 +0000 (16:16 -0500)]
Fix tapset/linux/timestamp_monotonic.stp on newer kernels.

* tapset/linux/timestamp_monotonic.stp: Be sure to include header files to
  get cpu_clock() and local_clock() defined.

7 years agoUse @entry() in a return probe in tapset/linux/ipmib.stp.
David Smith [Tue, 22 Aug 2017 19:44:59 +0000 (14:44 -0500)]
Use @entry() in a return probe in tapset/linux/ipmib.stp.

7 years agoAdd and use a new macro @inet_sock_cast().
David Smith [Tue, 22 Aug 2017 19:44:03 +0000 (14:44 -0500)]
Add and use a new macro @inet_sock_cast().

* tapset/linux/inet.stpm: Added new macro file.
* tapset/linux/inet_sock.stp: Use new @inet_sock_cast() macro to
  standardize casting a pointer to a "struct inet_sock".
* tapset/linux/ip.stp: Ditto.
* tapset/linux/tcp.stp: Ditto.

7 years agoPR21984: Fix "cast to pointer from integer of different size" errors.
David Smith [Tue, 22 Aug 2017 15:15:29 +0000 (10:15 -0500)]
PR21984: Fix "cast to pointer from integer of different size" errors.

* runtime/linux/loc2c-runtime.h: Modify the __Xread() and __Xwrite()
  macros for 32-bit systems so that 64-bit values are handled properly.
* tapset/linux/atomic.stp: Make sure all pointer values are cast
  properly. Their values must be cast to a 'uintptr_t' value then the
  final pointer type value. This is necessary for 32-bit systems (since
  systemtap variables are 64-bits). Some pointer casts weren't cast to a
  numeric value, some were cast to a signed value, etc. Standardize all of
  them.
* tapset/linux/aux_syscalls.stp: Ditto.
* tapset/linux/conversions-guru.stp: Ditto.
* tapset/linux/conversions.stp: Ditto.
* tapset/linux/i386/aux_syscalls.stp: Ditto.
* tapset/linux/ioblock.stp: Ditto.
* tapset/linux/ioscheduler.stp: Ditto.
* tapset/linux/ip.stp: Ditto.
* tapset/linux/ipmib.stp: Ditto.
* tapset/linux/kprocess.stp: Ditto.
* tapset/linux/netfilter.stp: Ditto.
* tapset/linux/nfs.stp: Ditto.
* tapset/linux/nfsd.stp: Ditto.
* tapset/linux/proc_mem.stp: Ditto.
* tapset/linux/rcu.stp: Ditto.
* tapset/linux/s390/aux_syscalls.stp: Ditto.
* tapset/linux/signal.stp: Ditto.
* tapset/linux/socket.stp: Ditto.
* tapset/linux/task.stp: Ditto.
* tapset/linux/tcp.stp: Ditto.
* tapset/linux/tcpmib.stp: Ditto.
* tapset/linux/x86_64/aux_syscalls.stp: Ditto.
* tapset/string.stp: Ditto.
* tapset/uconversions-guru.stp: Ditto.
* tapset/uconversions.stp: Ditto.

7 years agoAdd a minor fix to testsuite/systemtap.onthefly/uprobes_onthefly.exp.
David Smith [Thu, 17 Aug 2017 20:34:07 +0000 (15:34 -0500)]
Add a minor fix to testsuite/systemtap.onthefly/uprobes_onthefly.exp.

7 years agoSend rpmname and buildid to http server.
Stan Cox [Thu, 17 Aug 2017 18:46:27 +0000 (14:46 -0400)]
Send rpmname and buildid to http server.

* client-http.cxx (get_rpmname):  New to get the rpmname of a file.
  (process_buildid, get_buildid): New to get the buildid of a file.
  (post):  Also send rpmname and buildid
* main.cxx (passes_0_4):  Invoke http client after elaboration pass.

7 years agoadd PRERELEASE marker to stapbpf startup line
Frank Ch. Eigler [Wed, 16 Aug 2017 16:14:45 +0000 (12:14 -0400)]
add PRERELEASE marker to stapbpf startup line

7 years agoSend over the linux distribution info to the http server.
David Smith [Wed, 16 Aug 2017 15:39:45 +0000 (10:39 -0500)]
Send over the linux distribution info to the http server.

* httpd/backends.cxx (local_backend::local_backend): Get the distro name
  and arch.
  (local_backend::can_generate_module): Check the distro name and arch.
  (docker_backend::docker_backend): Get the list of JSON docker data files.
  (docker_backend::can_generate_module): Check the arch and see if we have
  a JSON docker data file for that distro.
* httpd/api.cxx (response build_collection_rh::POST): Look for 'distro_name'
  and 'distro_version' tags.
* httpd/api.h (client_request_data): Added 'distro_name' and
  'distro_version' fields.
* util.cxx (get_distro_info): New function.
* util.h: Add get_distro_info() declaration.
* httpd/client.py: Send over the distro information.

7 years agodtrace: Allow for reproducible .o file builds.
Bernhard M. Wiedemann [Mon, 14 Aug 2017 21:33:33 +0000 (16:33 -0500)]
dtrace: Allow for reproducible .o file builds.

* dtrace.in: When building packages like libvirt on openSUSE that
  link a libvirt_probes.o from dtrace, the build results differed
  across builds. This is because the source's temporary filename
  was in the .o. Make the temporary filename reproducible.

7 years agoFix client-http.cxx compile errors with libcurl-7.55.
David Smith [Mon, 14 Aug 2017 19:42:36 +0000 (14:42 -0500)]
Fix client-http.cxx compile errors with libcurl-7.55.

* client-http.cxx: Remove inclusion of <curl/curlbuild.h>, which doesn't
  exist in libcurl-7.55. We evidently weren't using it anyway.

7 years agoFix rpm_finder.cxx compile errors with rpm 4.13.90.
David Smith [Mon, 14 Aug 2017 18:32:16 +0000 (13:32 -0500)]
Fix rpm_finder.cxx compile errors with rpm 4.13.90.

* rpm_finder.cxx (missing_rpm_enlist): Replace deprecated headerSprintf()
  function calls with headerFormat() function calls.

7 years agoMake a small improvement in the http server "docker" backend.
David Smith [Fri, 11 Aug 2017 18:48:52 +0000 (13:48 -0500)]
Make a small improvement in the http server "docker" backend.

* httpd/backends.cxx (docker_backend): Make sure the docker executable
  exists before trying to use the docker backend.

7 years agoFix PR21802 by improving the syscall test cases.
David Smith [Fri, 11 Aug 2017 14:36:51 +0000 (09:36 -0500)]
Fix PR21802 by improving the syscall test cases.

* testsuite/systemtap.syscall/syscall.exp: Add logic to use the
  'CHECK_ONLY' environment variable to limit the syscalls tested.
* testsuite/systemtap.syscall/nd_syscall.exp: Ditto.

7 years agoMake small improvements to systemtap.base/perf.exp.
David Smith [Fri, 11 Aug 2017 14:29:16 +0000 (09:29 -0500)]
Make small improvements to systemtap.base/perf.exp.

* testsuite/systemtap.base/perf.exp: Compile the test executable with
  debuginfo. Make the test notice if the scripts don't compile.

7 years agoFor rawhide, fix casting issues in the nd_syscall tapset.
David Smith [Fri, 11 Aug 2017 13:20:54 +0000 (08:20 -0500)]
For rawhide, fix casting issues in the nd_syscall tapset.

* tapset/linux/syscalls.stpm: Add the 'ulong_cast' and 'uint_cast' macros
  to properly do casting for rawhide (4.13.0-0.rc3.git4.1.fc27.x86_64)
  systems.
* tapset/linux/sysc_accept.stp: Use the new macros when needed.
* tapset/linux/sysc_accept4.stp: Ditto.
* tapset/linux/sysc_bind.stp: Ditto.
* tapset/linux/sysc_chmod.stp: Ditto.
* tapset/linux/sysc_connect.stp: Ditto.
* tapset/linux/sysc_fchmod.stp: Ditto.
* tapset/linux/sysc_fchmodat.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/s390/sysc_compat_fadvise64.stp: Ditto.
* tapset/linux/s390/sysc_mmap.stp: Ditto.
* tapset/linux/s390/sysc_mmap2.stp: Ditto.
* tapset/linux/x86_64/sysc_mmap.stp: Ditto.

7 years agoFix PR21917 by making _stp_module_panic_notifier more robust.
David Smith [Mon, 7 Aug 2017 20:58:06 +0000 (15:58 -0500)]
Fix PR21917 by making _stp_module_panic_notifier more robust.

* runtime/transport/symbols.c (_stp_module_panic_notifier): Be more
  paranoid about relay data buffers.

7 years agoFix deref handling on 32-bit kernels.
David Smith [Thu, 3 Aug 2017 19:23:28 +0000 (14:23 -0500)]
Fix deref handling on 32-bit kernels.

* runtime/linux/loc2c-runtime.h (__stp_deref_nocheck_): Fix i386/arm
  systems where handling 8-byte values in one operation isn't possible.
  (__stp_store_deref_nocheck_): Ditto.

7 years agoFix PR21901 by releasing locks in the correct order in runtime/stp_utrace.c.
David Smith [Thu, 3 Aug 2017 18:46:31 +0000 (13:46 -0500)]
Fix PR21901 by releasing locks in the correct order in runtime/stp_utrace.c.

* runtime/stp_utrace.c (utrace_reset): Be sure to release the locks in the
  order we take them, otherwise we get an "inconsistent lock state" kernel
  warning.

7 years agoPR14021: Handle --sysroot=/
Cody Santing [Wed, 2 Aug 2017 19:32:20 +0000 (15:32 -0400)]
PR14021: Handle --sysroot=/

* setupdwfl.cxx: Make sure kernel_release is passed to
dwfl_linux_kernel_report_offline rather than an absolute path for the
case of --sysroot=/

7 years agoDefine a dummy translate_bpf_pass() for non-bpf systems (like RHEL6).
David Smith [Tue, 1 Aug 2017 19:26:12 +0000 (14:26 -0500)]
Define a dummy translate_bpf_pass() for non-bpf systems (like RHEL6).

7 years agoFix: BPF patches break the elfutils out of tree compilation.
Torsten Polle [Tue, 1 Aug 2017 18:10:10 +0000 (13:10 -0500)]
Fix: BPF patches break the elfutils out of tree compilation.

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