]> sourceware.org Git - systemtap.git/log
systemtap.git
2 years agoRun task_fd_lookup.exp with --compatible 4.0
Stan Cox [Thu, 19 Aug 2021 15:25:53 +0000 (11:25 -0400)]
Run task_fd_lookup.exp with --compatible 4.0

Running in --compatible 4.0 mode forces @cast(0, "mount")->mnt_parent
to focus on the kernel module.

2 years agoPR28184: Adapt to kernel rename __fcheck_files to files_lookup_fd_raw
Junlong Li [Fri, 6 Aug 2021 21:41:53 +0000 (17:41 -0400)]
PR28184: Adapt to kernel rename __fcheck_files to files_lookup_fd_raw

The 5.11 kernel renamed __fcheck_files to files_lookup_fd_raw

2 years agoPR28184: Adapt to kernel rename __fcheck_files to files_lookup_fd_raw
Junlong Li [Fri, 6 Aug 2021 18:24:12 +0000 (14:24 -0400)]
PR28184: Adapt to kernel rename __fcheck_files to files_lookup_fd_raw

The 5.11 kernel renamed __fcheck_files to files_lookup_fd_raw

2 years agotestsuite: time-limit auxiliary child processes
Frank Ch. Eigler [Fri, 6 Aug 2021 16:16:21 +0000 (12:16 -0400)]
testsuite: time-limit auxiliary child processes

The testsuite has been observed to intermittently hang on 5.13+
generation kernels.  This is caused by some test binaries (especially
recv*.c) suffering a segv and terminating, but their forked child
process pals still hanging around (indefinitely).  This patch adds an
alarm(30) to each such test, so the children will burn twice as
bright, but half as long, or something.

2 years agostapbpf bugfix: missing in_block() in try-catch code
Serguei Makarov [Fri, 30 Jul 2021 20:22:53 +0000 (16:22 -0400)]
stapbpf bugfix: missing in_block() in try-catch code

After emit_stmt(), we may not be in a block, e.g. if we do

try { return 0 } catch { return 1 }

Also added an assert to make the error more obvious
if it's missed anywhere else. Was a non obvious segfault.

2 years agoreleng: ditch custom pie/ssp CFLAGS engine in configure.ac
Frank Ch. Eigler [Mon, 26 Jul 2021 19:49:15 +0000 (15:49 -0400)]
releng: ditch custom pie/ssp CFLAGS engine in configure.ac

Just inherit the desired c*flags from autoconf via environment
variables from the distro spec files.  This lets us automatically
benefit from centralized hardening flags on some distros.  OTOH
distros without that now will need to add such settings to the build
scripts that invoke this configure script.

2 years agoPR28079: Adapt to kernel 5.14 task_struct.__state change
Frank Ch. Eigler [Mon, 19 Jul 2021 01:32:51 +0000 (21:32 -0400)]
PR28079: Adapt to kernel 5.14 task_struct.__state change

In tapset, use @choose_defined() for old & new field names.

2 years agoruntime: adapt to -Werror=implicit-fallthrough=5, dyninst runtime
Frank Ch. Eigler [Mon, 26 Jul 2021 02:35:59 +0000 (22:35 -0400)]
runtime: adapt to -Werror=implicit-fallthrough=5, dyninst runtime

The runtime/dyninst/runtime.h also needs a fallthrough macro def'n.

2 years agoPR28140: kernel 5.14-rc adaptation, jump_label_patch
Frank Ch. Eigler [Mon, 26 Jul 2021 02:09:18 +0000 (22:09 -0400)]
PR28140: kernel 5.14-rc adaptation, jump_label_patch

Linux commit ab3257042c2 makes it necessary for us to stop overriding
CONFIG_STACK_VALIDATION= (originally a workaround for a 2016 rawhide
bug).  This fixes the tracepoints.stp test case.

2 years agoruntime: adapt to -Werror=implicit-fallthrough=5
Frank Ch. Eigler [Thu, 22 Jul 2021 23:16:12 +0000 (19:16 -0400)]
runtime: adapt to -Werror=implicit-fallthrough=5

Linux kbuild commit d936eb23874 sets $subject CFLAGS, so to play
catch-up, we also need to use gcc attribute(fallthrough) to label such
spots in switch() statements in our runtime / tapset.  Tested on
linux5.14 gcc11 rawhide and linux3.10 gcc4 rhel7.

2 years agoRevert to using test_tsk_thread_flag for uprobes2
Stan Cox [Thu, 22 Jul 2021 11:39:10 +0000 (07:39 -0400)]
Revert to using test_tsk_thread_flag for uprobes2

_stp_is_compat_task is not required for uprobes2 since uprobes2 is only used
for rhel6 and rhel7.

2 years agoPR27984: Adjust the address so dwfl_module_addrinfo finds correct function name
William Cohen [Tue, 20 Jul 2021 15:32:27 +0000 (11:32 -0400)]
PR27984: Adjust the address so dwfl_module_addrinfo finds correct function name

PR27984 discovered that the logic to determine when a location was
part of a partially inlined function was not operating correctly for
shared libraries.  The existing systemtap.base/partial-inline.exp
verified that the test worked for executables, but shared libraries
include a non-zero bias that needs to be added in. Added code to get
the required bias and add it to the address so the correct name is
returned by dwfl_module_addrinfo.

3 years agoPR28079: Adapt to kernel 5.14 task_struct.__state change
Stan Cox [Mon, 19 Jul 2021 01:32:51 +0000 (21:32 -0400)]
PR28079: Adapt to kernel 5.14 task_struct.__state change

Use signal_wake_up_state for the 5.14 kernel which changed volatile long state to unsigned int __state.

3 years agotestsuite item typo fix
Frank Ch. Eigler [Fri, 16 Jul 2021 15:49:12 +0000 (11:49 -0400)]
testsuite item typo fix

3 years agoPR27934: give fuller diagnosis for pass-5 probe-registration errors
Frank Ch. Eigler [Wed, 14 Jul 2021 20:44:46 +0000 (16:44 -0400)]
PR27934: give fuller diagnosis for pass-5 probe-registration errors

While we cannot solve or prevent runtime probe registration errors, we
can help users understand them.  Add a new warning::pass5 man page,
and point registration error messages at it.

3 years agoPR27820 tapset/bpf/logging.stp: implement abort() tapset function
Serhei Makarov [Wed, 14 Jul 2021 15:52:11 +0000 (11:52 -0400)]
PR27820 tapset/bpf/logging.stp: implement abort() tapset function

A more obsessively accurate implementation would add a check
equivalent to if (c->aborted) to the start of each probe,
but it would be an imperfect solution in any case.

3 years agoPR27820 tapset/bpf/logging.stp: move bpf versions of functions
Serhei Makarov [Tue, 13 Jul 2021 19:56:37 +0000 (15:56 -0400)]
PR27820 tapset/bpf/logging.stp: move bpf versions of functions

Follows the same scheme as what I instituted earlier for the
uconversions.stp tapsets: toplevel has functions common to
all 3 backends or common to lkm+dyninst (guarded by a
runtime != "bpf" conditional). BPF implementations are
moved to tapset/bpf.

* tapset/bpf/logging.stp: New file.
* logging.stp: Move bpf versions of functions.

3 years agoruntime: linux 5.14 compat: <linux/panic_notifier.h>
Frank Ch. Eigler [Tue, 13 Jul 2021 23:34:50 +0000 (19:34 -0400)]
runtime: linux 5.14 compat: <linux/panic_notifier.h>

Linux commit f39650de687e3 moved some kernel decls around.

3 years agoruntime: fix unintended compile error with autoconf-x86-uniregs.c
Du Zhe [Tue, 13 Jul 2021 23:11:55 +0000 (19:11 -0400)]
runtime: fix unintended compile error with autoconf-x86-uniregs.c

Adding a #include <linux/sched.h> restores this test on the gentoo
linux-5.10.47-gentoo kernel.

3 years agoRevert "systemtap.spec: don't buildrequire emacs"
Frank Ch. Eigler [Tue, 13 Jul 2021 18:46:29 +0000 (14:46 -0400)]
Revert "systemtap.spec: don't buildrequire emacs"

We need an emacs package - just for the RPM directory-setting macros.

3 years agospin-rawhide: ok tweak the git-archive top level path too
Frank Ch. Eigler [Tue, 13 Jul 2021 18:34:31 +0000 (14:34 -0400)]
spin-rawhide: ok tweak the git-archive top level path too

3 years agospin-rawhide: switch to ~ versioning for Source: file names too
Frank Ch. Eigler [Tue, 13 Jul 2021 18:27:27 +0000 (14:27 -0400)]
spin-rawhide: switch to ~ versioning for Source: file names too

3 years agospin-rawhide: switch to ~ versioning for n-v-r
Frank Ch. Eigler [Tue, 13 Jul 2021 17:52:53 +0000 (13:52 -0400)]
spin-rawhide: switch to ~ versioning for n-v-r

The previous scheme used systemtap-V-0.STUFF numbering.
Now instead systemtap-V~preSTUFF-1 numbering, with a little less stuff.

3 years agotask_finder_vma: add autoconf check for hlist_add_tail_rcu()
Sultan Alsawaf [Mon, 12 Jul 2021 20:31:36 +0000 (15:31 -0500)]
task_finder_vma: add autoconf check for hlist_add_tail_rcu()

The 3.10 version check for hlist_add_tail_rcu() only works for RHEL
kernels. Kernels older than 4.7 that lack the hlist_add_tail_rcu() backport
won't compile (such as Debian kernels). Add an autoconf stub to know for
certain if hlist_add_tail_rcu() is present.

3 years agoDon't fail vma tracking mmap callback if module is already known.
Sultan Alsawaf [Mon, 12 Jul 2021 20:01:57 +0000 (16:01 -0400)]
Don't fail vma tracking mmap callback if module is already known.

An -EEXIST returned by stap_add_vma_map_info() just indicates that the
module is currently in stap's vma cache; it isn't a real issue. Calling
_stp_error() when this occurs causes stap to exit when there isn't a
real bug. Ignore the -EEXIST error to avoid breakage.

3 years agoUse the path instead of the module for vma tracking mmap callback.
Junlong Li [Mon, 12 Jul 2021 19:48:42 +0000 (15:48 -0400)]
Use the path instead of the module for vma tracking mmap callback.

Use the path instead of the module for vma tracking mmap callback
since the module is usually NULL.

3 years agoupdate READMEs + man pages for freenode -> oftc move
Serguei Makarov [Thu, 8 Jul 2021 15:47:00 +0000 (11:47 -0400)]
update READMEs + man pages for freenode -> oftc move

This was done for the website, now do this in the actual codebase.

3 years agoUpdate list of reasons for latencytap.stp example
William Cohen [Tue, 6 Jul 2021 02:56:09 +0000 (22:56 -0400)]
Update list of reasons for latencytap.stp example

Backtraces change over time.  Added additional function names to
monitor in the backtrace and map to reasons.  This should reduce the
number of lines with blank reasons when using newer Linux kernels.

3 years agorhbz1972805: add basic syscall-in-ptregs support for s390x
Frank Ch. Eigler [Thu, 1 Jul 2021 18:41:06 +0000 (14:41 -0400)]
rhbz1972805: add basic syscall-in-ptregs support for s390x

Akin to commit 7be7af0fda36 for ARM, add basic syscalls via
tracepoints / CONTEXT->sregs support for s390x.  The argno=6 case is
funny because for syscalls they travel in registers, whereas normally
they hop onto the stack.

3 years agosystemtap.spec: don't Require: libvirt
Frank Ch. Eigler [Thu, 24 Jun 2021 20:03:50 +0000 (16:03 -0400)]
systemtap.spec: don't Require: libvirt

Remove unnecessary dependency.  The -runtime-virthost subrpm just
needs the libvirt shared libraries, and not the libvirt server
machinery.

3 years agorhbz1972828: tapsets: iommu tracepoints
Frank Ch. Eigler [Thu, 24 Jun 2021 17:30:38 +0000 (13:30 -0400)]
rhbz1972828: tapsets: iommu tracepoints

Disable detection of intel-iommu tracepoint family on non-x86
platforms, because the 5.13ish kernel headers for this tracepoint
include references to functions like clcache_flush_range which don't
exist on all non-x86.

3 years agoppc64 runtime: FULL_REGS() gone
Frank Ch. Eigler [Thu, 24 Jun 2021 00:16:52 +0000 (20:16 -0400)]
ppc64 runtime: FULL_REGS() gone

Adapt to kernel commit 8dc7f0229b78, which dropped the titular macro
from ppc64 ptrace.h header.

3 years agoc++ buildability: util.cxx - unique_ptr
Frank Ch. Eigler [Fri, 18 Jun 2021 19:17:02 +0000 (15:17 -0400)]
c++ buildability: util.cxx - unique_ptr

Add a #include <memory> that may be necessary on some unusual c++ compilers.

3 years agosystemtap.spec: don't buildrequire emacs
Frank Ch. Eigler [Fri, 11 Jun 2021 16:30:26 +0000 (12:30 -0400)]
systemtap.spec: don't buildrequire emacs

We don't run emacs during the build, so don't BuildRequire: it.

3 years agoAllow for adjacent segments belonging to different modules.
Junlong Li [Wed, 9 Jun 2021 13:49:14 +0000 (09:49 -0400)]
Allow for adjacent segments belonging to different modules.

Do not merge adjacent memory segments if they are from different
shared libraries that happen to be loaded adjacent to each other.

3 years agoNote that Python is a requirement.
Sevan Janiyan [Sun, 30 May 2021 23:17:12 +0000 (23:17 +0000)]
Note that Python is a requirement.

3 years agoGet the enumerator's enumeration type
Stan Cox [Thu, 3 Jun 2021 21:19:49 +0000 (17:19 -0400)]
Get the enumerator's enumeration type

Enumeration values are ultimately treated as constants but the path:
literal_stmt_for_local -> find_variable_and_frame_base (-> dwarf_get_enum)
-> translate_final_fetch_or_store often assume there is a
type die. Have dwarf_get_enum also get the type from the enumeration
type and percolate it along.

3 years agotestsuite/systemtap.base/perf.sh drop bashism
Sevan Janiyan [Wed, 2 Jun 2021 18:55:53 +0000 (14:55 -0400)]
testsuite/systemtap.base/perf.sh drop bashism

You don't need to use == to check for equality in a test statement, a
single equals sign is sufficient. The use of double equals sign is a
bashism which doesn't always translate as intended on other shells.

[fche checked other scripts in the source tree that used [ == ]; they
are all marked /bin/bash so can stay as is.]

3 years agoAdd hlist macros for use by hlist_add_tail_rcu
Stan Cox [Wed, 2 Jun 2021 17:37:45 +0000 (13:37 -0400)]
Add hlist macros for use by hlist_add_tail_rcu

3 years agoparse.cxx: Initialize functioncall synthetic field
Alexandra Hájková [Wed, 2 Jun 2021 17:01:26 +0000 (13:01 -0400)]
parse.cxx: Initialize functioncall synthetic field

Quieting complaints from:

% valgrind --track-origins=yes stap -v -p2 --example helloworld.stp

3 years agoAdd hlist_add_tail_rcu for rhel 6.
Stan Cox [Tue, 1 Jun 2021 14:03:26 +0000 (10:03 -0400)]
Add hlist_add_tail_rcu for rhel 6.

hlist_add_tail_rcu is not present in rhel 6

3 years agoDon't assume ISO C99
Stan Cox [Thu, 27 May 2021 20:38:23 +0000 (16:38 -0400)]
Don't assume ISO C99

3 years agoExtend vma mapped entries when the address is adjacent.
Junlong Li [Thu, 27 May 2021 14:31:20 +0000 (10:31 -0400)]
Extend vma mapped entries when the address is adjacent.

When two segments are adjacent, extend the first to contain the second
instead of adding another entry.

3 years agostap-prep: switch to using main vmlinuz file as debuginfod test download
Frank Ch. Eigler [Sun, 23 May 2021 18:12:32 +0000 (14:12 -0400)]
stap-prep: switch to using main vmlinuz file as debuginfod test download

Using the vdso* files only as the debuginfod tests gives us false
positives on platforms where the install vmlinuz files cannot be used
as a basis for debuginfod queries, because they're not elf nor
compressed-elf.  This new stap-prep tries to download the vmlinuz
debuginfo itself.  It's large, but at least once it's here, it's here!
And if it fails (as it will on those few platforms), the user is
advised to do full platform package-manager debuginfo download.

3 years agoPR27903: grok more glibc dwarf
Frank Ch. Eigler [Sun, 23 May 2021 17:13:20 +0000 (13:13 -0400)]
PR27903: grok more glibc dwarf

Some entry-value / parameter-ref combinations needed better error
resilience in the translator (set ->tok fields, not assuming
matches exist, etc.)

3 years agoc++11 hygiene: use cxx_override macro for pre-4.7 g++
Frank Ch. Eigler [Fri, 21 May 2021 00:45:15 +0000 (20:45 -0400)]
c++11 hygiene: use cxx_override macro for pre-4.7 g++

3 years agoFix more -Wformat-nonliteral and -Wmismatched-tags when compiling with clang
Aaron Merey [Wed, 19 May 2021 21:43:18 +0000 (17:43 -0400)]
Fix more -Wformat-nonliteral and -Wmismatched-tags when compiling with clang

3 years agodtrace: Use -o option to specify output file for CPP
Timm Bäder [Wed, 19 May 2021 21:00:43 +0000 (17:00 -0400)]
dtrace: Use -o option to specify output file for CPP

3 years agoFix -Wformat-nonliteral and -Wformat warnings with clang
Timm Bäder [Wed, 19 May 2021 20:59:35 +0000 (16:59 -0400)]
Fix -Wformat-nonliteral and -Wformat warnings with clang

3 years agoFix -Woverloaded-virtual warnings when building with clang
Timm Bäder [Wed, 19 May 2021 20:38:30 +0000 (16:38 -0400)]
Fix -Woverloaded-virtual warnings when building with clang

Satisfy clang by removing option for non-nested signature printing from
implementations of printsig and declare derived_probe::printsig with 'override'.

Add function derived_probe::printsig_nonest to perform non-nested signature
printing.

3 years agoset2: Return this from assignment operator
Timm Bäder [Wed, 19 May 2021 20:29:30 +0000 (16:29 -0400)]
set2: Return this from assignment operator

This should return something but didn't.

3 years agoAdd missing copy constructors to set1_ref and set1_const_ref
Timm Bäder [Wed, 19 May 2021 20:28:29 +0000 (16:28 -0400)]
Add missing copy constructors to set1_ref and set1_const_ref

Clang complains about the missing copy constructors if a user-defined
copy assignment operator exists, e.g.:

./bpf-bitset.h:108:19: error: definition of implicit copy constructor for 'set1_const_ref' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
  set1_const_ref& operator= (const set1_const_ref &);   // not present
                  ^
./bpf-bitset.h:256:12: note: in implicit copy constructor for 'bpf::bitset::set1_const_ref' first required here
    return set1_const_ref(data + w2 * i, w2);

3 years agoAdd some override specifiers where missing
Timm Bäder [Wed, 19 May 2021 20:25:21 +0000 (16:25 -0400)]
Add some override specifiers where missing

3 years agoutil.cxx: Use abs() instead of labs()
Timm Bäder [Wed, 19 May 2021 20:23:06 +0000 (16:23 -0400)]
util.cxx: Use abs() instead of labs()

Taking the absolute value of unsigned values is pointless, as reported
by clang:

util.cxx:1545:28: error: taking the absolute value of unsigned type 'unsigned long' has no effect [-Werror,-Wabsolute-value]
      unsigned min_score = labs(target.size() - it->size());
                           ^
util.cxx:1545:28: note: remove the call to 'labs' since unsigned values cannot be negative
      unsigned min_score = labs(target.size() - it->size());

3 years agosystemtap.spec: python3 tweaks
Frank Ch. Eigler [Wed, 19 May 2021 01:03:17 +0000 (21:03 -0400)]
systemtap.spec: python3 tweaks

Embrace build configurations where python3 is not installed by
default, so needs an explicit BuildRequires; also ones where
python3-probes are not built, ergo stap-exporter isn't packaged.
(The latter is automake-conditionalized on the wrong parameter,
HAVE_PYTHON3_PROBES rather than HAVE_PYTHON3, but this doesn't
matter on normal distro builds.)

3 years agoPR27864: tolerate loc_unavailable during loc2c transform
Frank Ch. Eigler [Fri, 14 May 2021 01:05:56 +0000 (21:05 -0400)]
PR27864: tolerate loc_unavailable during loc2c transform

Change this assertion to a normal semantic error, to tolerate unusual dwarf content.

891            assert(fb_loc->type == loc_address);
(gdb) p fb_loc->type
$1 = loc_unavailable
(gdb) bt

    line=891, function=<optimized out>) at assert.c:92
        function=0x5555557ee788 "symbol* location_context::frame_location()") at assert.c:101

         #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49
         #1  0x00007ffff7d438a4 in __GI_abort () at abort.c:79
         #2  0x00007ffff7d43789 in __assert_fail_base (fmt=0x7ffff7eb0680 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5555557eec07 "fb_loc->type == loc_address", file=0x5555557edc9d "loc2stap.cxx",
     line=891, function=<optimized out>) at assert.c:92
         #3  0x00007ffff7d53026 in __GI___assert_fail (assertion=0x5555557eec07 "fb_loc->type == loc_address", file=0x5555557edc9d "loc2stap.cxx", line=891,
         function=0x5555557ee788 "symbol* location_context::frame_location()") at assert.c:101
         #4  0x00005555556fcc08 in location_context::frame_location (this=0x7fffffff8d10) at loc2stap.cxx:891
         #5  0x00005555556f9671 in location_context::translate (this=0x7fffffff8d10, expr=0x7fffe88a7f38, len=1, piece_expr_start=0, input=0x0, may_use_fb=true, computing_value_orig=false) at loc2stap.cxx:607
         #6  0x0000555555730593 in location_context::location_from_address (input=0x0, len=<optimized out>, expr=0x7fffe88a7f38, this=0x7fffffff8d10) at loc2stap.cxx:912
         #7  location_context::translate_location (input=0x0, len=<optimized out>, expr=0x7fffe88a7f38, this=0x7fffffff8d10) at loc2stap.cxx:1304
         #8  location_context::translate_location (input=0x0, len=<optimized out>, expr=0x7fffe88a7f38, this=0x7fffffff8d10) at loc2stap.cxx:1296
         #9  dwflpp::translate_location (this=0x55555a9f67d0, ctx=0x7fffffff8d10, attr=<optimized out>, die=0x7fffffff8af0, pc=<optimized out>, fb_attr=<optimized out>, e=0x55555ae79900, input=0x0)
             at dwflpp.cxx:3287

3 years agoautoconf: version bumps for the next release-4.6
Serguei Makarov [Tue, 11 May 2021 15:27:47 +0000 (11:27 -0400)]
autoconf: version bumps for the next release-4.6

3 years agoversion bumps for the next release-4.6
Serguei Makarov [Tue, 11 May 2021 15:25:20 +0000 (11:25 -0400)]
version bumps for the next release-4.6

3 years agoNEWS: release-4.5 release-4.5
Serhei Makarov [Fri, 7 May 2021 19:20:39 +0000 (15:20 -0400)]
NEWS: release-4.5

3 years agosystemtap.spec: release-4.5
Serhei Makarov [Fri, 7 May 2021 19:10:03 +0000 (15:10 -0400)]
systemtap.spec: release-4.5

3 years agopre-release-4.5: regen docs, FIX scripts/update-syscall-docs FOR py3
Serhei Makarov [Fri, 7 May 2021 19:06:24 +0000 (15:06 -0400)]
pre-release-4.5: regen docs, FIX scripts/update-syscall-docs FOR py3

scripts/update-syscall-docs needed to be updated for the Python3
binary-input convention. Not doing so had messed up syscalls.3stap for
release-4.4.

3 years agoNEWS: add a few more runtime related entries
Frank Ch. Eigler [Fri, 7 May 2021 17:12:26 +0000 (13:12 -0400)]
NEWS: add a few more runtime related entries

3 years agopre-release-4.5: regen examples index
Serhei Makarov [Fri, 7 May 2021 16:31:59 +0000 (12:31 -0400)]
pre-release-4.5: regen examples index

3 years agopre-release-4.5: make update-po
Serhei Makarov [Fri, 7 May 2021 15:59:22 +0000 (11:59 -0400)]
pre-release-4.5: make update-po

3 years agopre-release-4.5: update PRERELEASE except systemtap.spec
Serhei Makarov [Fri, 7 May 2021 15:09:13 +0000 (11:09 -0400)]
pre-release-4.5: update PRERELEASE except systemtap.spec

3 years agopre-release-4.5: update AUTHORS
Serhei Makarov [Fri, 7 May 2021 15:08:43 +0000 (11:08 -0400)]
pre-release-4.5: update AUTHORS

3 years agouse long-lived debuginfod_client handle for buildid based probes
Frank Ch. Eigler [Fri, 7 May 2021 14:23:50 +0000 (10:23 -0400)]
use long-lived debuginfod_client handle for buildid based probes

New elfutils is more efficient if reusing debuginfod_client*
handles.  Save them in a static unique_ptr<>.

In the corresponding testsuite, stop using -d :memory: for the
temporary debuginfod instance.  That's becuase that doesn't work since
elfutils commit 6362941714548d93a3, which uses two concurrent sqlite
database connections.  The :memory: syntax causes creation of distinct
databases.

3 years agoNEWS: suggested NEWS items for release-4.5
Serhei Makarov [Thu, 6 May 2021 17:12:46 +0000 (13:12 -0400)]
NEWS: suggested NEWS items for release-4.5

3 years agoMake declarations consistent with corresponding definitions
Aaron Merey [Wed, 5 May 2021 19:19:58 +0000 (15:19 -0400)]
Make declarations consistent with corresponding definitions

Avoid -Wmismatched-tags by ensuring that the use of class/struct in
declarations matches use of class/struct in the corresponding definition.

3 years agoUse the skb_frag_size accessor function rather than directly reading field
William Cohen [Wed, 5 May 2021 13:49:22 +0000 (09:49 -0400)]
Use the skb_frag_size accessor function rather than directly reading field

There have been changes in the skb_frag_t struct. In newer kernels the
size field no longer exists.  Rather than trying to determine the name
of the field the __skb_frag_size tapset function now uses the
skb_frag_size accessor function instead.  This function has been in
kernels since 2011 and has been in RHEL kernels since RHEL6.

3 years agoexamples: add old cve security band-aid cve-2011-4127
William Cohen [Wed, 5 May 2021 02:59:03 +0000 (22:59 -0400)]
examples: add old cve security band-aid cve-2011-4127

3 years agoFurther tweak deviceseeks.stp example to work on Fedora 32/33/34
William Cohen [Tue, 4 May 2021 21:56:27 +0000 (17:56 -0400)]
Further tweak deviceseeks.stp example to work on Fedora 32/33/34

The previous fix for Fedora rawhide Linux kernels (5.12) did not work
on earlier Linux 5.11 kernels in Fedora 32/33/34 because struct bio
has a different field, bd_disk that has a pointer to the queue.
Separated the process for getting the sector size into two steps:

-find the request queue struct
-find the sector size for the device

This script has been tested on RHEL8, Fedora 34, and Fedora Rawhide.

3 years agosystemtap.spec: don't *require jpackage-utils
Frank Ch. Eigler [Tue, 4 May 2021 17:32:06 +0000 (13:32 -0400)]
systemtap.spec: don't *require jpackage-utils

Plain java-devel should do the job for building our java runtime.

3 years agoPR27274: tolerate aborted update_visitor traversals
Frank Ch. Eigler [Mon, 3 May 2021 22:02:57 +0000 (18:02 -0400)]
PR27274: tolerate aborted update_visitor traversals

The update_visitor dtor has had an assert() for its value-stack
being empty by the time of its execution.  But some combinations
of errors (exceptions being thrown & caught), this assertion could
fire and those diagnostics hidden.  So we now ditch the assert()
and leave behind exceptions and other optimistic cleanup.

3 years agoreleng: work around fedora ci
Frank Ch. Eigler [Mon, 3 May 2021 15:55:19 +0000 (11:55 -0400)]
releng: work around fedora ci

rpminspect appears to have a cow about -testsuite and -runtime-java
multiarch conflicts.  Perhaps adding a mutual Conflicts: will help.

3 years agoAdjust deviceseeks.stp to work with newer kernels
William Cohen [Fri, 30 Apr 2021 19:17:16 +0000 (15:17 -0400)]
Adjust deviceseeks.stp to work with newer kernels

Newer kernels do not provides the queue parameter ($q) for the
block_bio_queue tracepoint used by ioblock_trace.request.  Based on
the suggestion by Jeff Moyer added an alternative way to get queue and
extract the sector size information required for this script.

3 years agoPR27802: tweak configure.ac for AC_SUBST(pkglibdir)
Frank Ch. Eigler [Thu, 29 Apr 2021 23:51:10 +0000 (19:51 -0400)]
PR27802: tweak configure.ac for AC_SUBST(pkglibdir)

autoconf is such a hassle for getting expanded path names for the
--FOOdir=BAR names.  During execution of the configure script, they
may be defined to be expressions with literal $values in them, which
need to be eval'd with other $values preset.  What a mess.  Tweak the
sequence used to predict the $pkglibexecdir through heuristics to get
around all this indirection.  (e.g. /usr/libexec/systemtap), whether
or not --libexecdir= is given.

3 years agoCorrect ucontext.stp umodname function call to _stp_umod_lookup
William Cohen [Wed, 28 Apr 2021 19:23:01 +0000 (15:23 -0400)]
Correct ucontext.stp umodname function call to _stp_umod_lookup

The runtime _stp_umod_lookup function had an additional offset parameter
added in git commit d1b554876c68f313ec371dbf52c4bddde7bbe10e.  That
patch updated the runtime uses of the function, but overlooked the use
of _stp_umod_lookup in the tapsetss.  This patch updates the missed
_stp_umod_lookup in the ucontext.stp tapset.

3 years agoAdjust tapset dev.stp to get partition number from newer block_device struct
William Cohen [Wed, 28 Apr 2021 13:45:07 +0000 (09:45 -0400)]
Adjust tapset dev.stp to get partition number from newer block_device struct

The kernel git commit 0d02129e76edf91cf04fabf1efbc3a9a1f1d729a removed
the bd_part field from struct block_device.  The newer field bd_partno
in the same struct should be used to get the partition number.  This
fix allows mbrwatch.stp, ioblktime.stp, and disktop.stp examples
to function on Linux 5.10 and new kernels.

3 years agoPR27785: fix segv in try/catch traversal
Frank Ch. Eigler [Tue, 27 Apr 2021 19:47:27 +0000 (15:47 -0400)]
PR27785: fix segv in try/catch traversal

Correct a little brainfart that didn't take into account the
presence of  try { ... } catch { ... } blocks, lacking the
optional exception-string catching clause.

3 years agoruntime: fix user address calculation for PIE binaries
Sultan Alsawaf [Tue, 20 Apr 2021 21:13:28 +0000 (14:13 -0700)]
runtime: fix user address calculation for PIE binaries

Commit d1b554876 ("runtime: fix symbol lookups when the first section
isn't executable") resolved an issue caused by not storing VMA info when
it was actually needed, and it did this by unconditionally storing VMA
info. It turns out we don't want to unconditionally store VMA info, as
is the case for PIE binaries. Doing so causes user address calculations
for PIE binaries to erroneously include the offset of the section
containing the target address.

Fix it by restoring the old code and just adding what's needed to fix
the bug described in commit d1b554876 (i.e., always storing VMA info
when `vm_start + offset == addr`).

Bonus for the git sleuths:
2:07 PM <fche> I'm not sure I understand all the offsets and bases and this and that
2:08 PM <fche> but it does bring the code back closer to what it used to be
2:08 PM <kerneltoast> don't worry, i don't understand it either
2:08 PM <fche> ok wait I have to add that into the git commit text ;)

3 years agoPR27739: modernize java/byteman probing support
Frank Ch. Eigler [Tue, 13 Apr 2021 21:09:31 +0000 (17:09 -0400)]
PR27739: modernize java/byteman probing support

Use modern byteman's ability to load helper .jar on demand, and let
that .jar load the JNI .so on demand, all from full
$pkglibexecdir-based pathnames.  That way, the rpm .spec does not need
to worry about symlinking, and stapbm doesn't have to deal with
anything except the convenient bminstall/bmsubmit frontend scripts.

3 years agoruntime: port to 5.12-rc unexporting of mutex_lock
Frank Ch. Eigler [Tue, 13 Apr 2021 16:08:12 +0000 (12:08 -0400)]
runtime: port to 5.12-rc unexporting of mutex_lock

Use an exportconf to make conditional our manual mutex_lock usage in
kallsyms symbol gathering.

3 years agoAlways get section info via sysfs using kernel_read()
Sultan Alsawaf [Thu, 8 Apr 2021 23:57:41 +0000 (16:57 -0700)]
Always get section info via sysfs using kernel_read()

kernel_read_file_from_path() from before it received the offset argument
is buggy in that it always expects the number of bytes read to be the
size of the inode. Since sysfs inodes are PAGE_SIZE bytes in size on
older kernels, kernel_read_file_from_path() would expect sysfs reads to
produce PAGE_SIZE bytes of output, otherwise it would return an error.

We can avoid kernel_read_file_from_path()'s quirks entirely by simply
using kernel_read() directly, which has the added benefit of existing
since before the first 2.6 kernel. This allows us to ditch the old
module_attribute struct hacks entirely, since the module sections sysfs
has been around since 2.6.8.

3 years agoPR27658: show stderr of typequery make jobs in pass 2
Frank Ch. Eigler [Sat, 3 Apr 2021 01:00:24 +0000 (21:00 -0400)]
PR27658: show stderr of typequery make jobs in pass 2

typequery child-gcc invocations should not cause errors.  But if
they do, might as well show them to users, because a typo or some
other momentary/solvable system error might be responsible.

3 years agoSet trust for new certificates.
Stan Cox [Mon, 29 Mar 2021 15:36:01 +0000 (11:36 -0400)]
Set trust for new certificates.

Remove the change_cert_trust workaround and replace it with
PK11_InitPin call to initialize the metaData in key4.db.  Replace
CERT_DecodeCertFromPackage with PK11_ImportDERCert

3 years agoioscheduler tapset: adapt for loss of $q, standardize elevator_name
Frank Ch. Eigler [Thu, 25 Mar 2021 23:22:31 +0000 (19:22 -0400)]
ioscheduler tapset: adapt for loss of $q, standardize elevator_name

block/scheduler kernel tracepoints have lost the $q parameter, since
it is directly available from $rq.  Thus the derived script variable
elevator_name needs to be accessed that other route.  Tested on f33
and rhel6.

3 years agoRHBZ1940979: make vfs-all-probes.stp compilable again
Frank Ch. Eigler [Thu, 25 Mar 2021 18:13:43 +0000 (14:13 -0400)]
RHBZ1940979: make vfs-all-probes.stp compilable again

Skin-deep update of linux/vfs.stp tapset for supporting >5.*ish
kernels, with vfs_{read,write} fallback kprobes, and readahead_control
parameters.

3 years agoAdd workaround to set trust for new client certificates
Stan Cox [Thu, 25 Mar 2021 13:39:01 +0000 (09:39 -0400)]
Add workaround to set trust for new client certificates

The nss switchover from dbm to sql results in CERT_ChangeCertTrust not changing
the trust so call certutil in those instances to set it manually.

3 years agoRHBZ1940761: tweak old_timex32 conditional usage
Frank Ch. Eigler [Wed, 24 Mar 2021 00:36:53 +0000 (20:36 -0400)]
RHBZ1940761: tweak old_timex32 conditional usage

Improve on commit 4ab42baafca69 for pre-5.1 kernels.  The subject
compatibility type was introduced not with CONFIG_COMPAT_32BIT_TIME,
but later.  Tweak the conditional to also take kernel version >= 5.1
into account.

3 years agoPR13838: tweak auto 32-bit float casting
Frank Ch. Eigler [Tue, 23 Mar 2021 22:26:51 +0000 (18:26 -0400)]
PR13838: tweak auto 32-bit float casting

Reject $float as lvalue.
Reject complex floats (tuples).

3 years agocoverity tweak: stap-report
Kamil Dudka [Tue, 23 Mar 2021 21:00:58 +0000 (17:00 -0400)]
coverity tweak: stap-report

3 years agobpf-translate.cxx refactor: move visit{_try,}_block to a more logical place
Serhei Makarov [Fri, 19 Mar 2021 23:11:25 +0000 (19:11 -0400)]
bpf-translate.cxx refactor: move visit{_try,}_block to a more logical place

visit_try_block() was in the middle of the assembler but unrelated to it.
In preparation for improving the register_error assembler directive,
move this code (and visit_block) to a more sensible location.
Then the embeddedcode assembler implementation is grouped at the start of
the visitor functions.

3 years agoPR13838: support fp32_to_fp64 conversion automatically at functioncall
Alice Zhang [Wed, 17 Mar 2021 18:28:39 +0000 (14:28 -0400)]
PR13838: support fp32_to_fp64 conversion automatically at functioncall
synthesize level.

- tapsets.cxx: modified synthetic_embedded_deref_call, so a 4 byte
  floating point will be convert to 8 byte double if detected.
- testsuite/buildok/floatingpoint.stp: updated corresponding fp32
  examples.

3 years agorhbz1938312: temp disable bpf on recent kernels
Serhei Makarov [Mon, 15 Mar 2021 20:57:28 +0000 (16:57 -0400)]
rhbz1938312: temp disable bpf on recent kernels

So the buildbots can continue to test everything that isn't bpf.

3 years agoPR13838: add local floating point variables in main.cxx and more
Alice Zhang [Tue, 2 Mar 2021 18:37:19 +0000 (13:37 -0500)]
PR13838: add local floating point variables in main.cxx and more
test cases in testsuite/buildok/floatingpoint.stp

3 years agoPR13838:
Frank Ch. Eigler [Mon, 15 Feb 2021 17:01:36 +0000 (12:01 -0500)]
PR13838:
- prototype FP support in STAPCONF_REGSET configuration
In REGSET mode (rhel8ish+), fp registers need to be addressed by
ptrace NT_PRFPREG lookup coordinates.
- runtime/linux/loc2c-runtime.h: extend SSE, SSE2 and XMM register
definiton in url_x86_64[]

3 years agoPR13838: update aarch64 pt_reg section, added macro definition for SIMD FP register...
Alice Zhang [Fri, 5 Feb 2021 10:50:12 +0000 (05:50 -0500)]
PR13838: update aarch64 pt_reg section, added macro definition for SIMD FP register V0-V7, (reg64-reg71).

3 years agoPR13838:
Alice Zhang [Thu, 7 Jan 2021 21:55:05 +0000 (16:55 -0500)]
PR13838:
- modified dwflpp.cxx so that $fp syntax will be supported
- runtme/loc2c-runtime.h: extended x64_64 register to 24 to allow access of xmm0-xmm7 register.
- testsuite/systemtap.examples/general: update examples, using $fp instead of user_long($fpointer)

3 years agotestsuite: fix symbol lookups when the first section isn't executable
Frank Ch. Eigler [Tue, 9 Mar 2021 17:44:36 +0000 (12:44 -0500)]
testsuite: fix symbol lookups when the first section isn't executable

Based on the fedora php binary's peculiar build flags, related to
huge-page optimization.

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