]> sourceware.org Git - systemtap.git/log
systemtap.git
13 months agoPR29765: Introduce probe nfs.aop.readfolio
Martin Cermak [Fri, 19 May 2023 09:06:25 +0000 (11:06 +0200)]
PR29765: Introduce probe nfs.aop.readfolio

14 months agoPR30459: removed an unused large C array allocated on the kernel stack
Yichun Zhang (agentzh) [Thu, 18 May 2023 05:43:48 +0000 (05:43 +0000)]
PR30459: removed an unused large C array allocated on the kernel stack

14 months agoPR30456: kernel 5.18+ removed set_fs() and we should use the new replacement, user_ac...
Yichun Zhang (agentzh) [Wed, 17 May 2023 00:17:07 +0000 (17:17 -0700)]
PR30456: kernel 5.18+ removed set_fs() and we should use the new replacement, user_access_begin()/user_access_end() for userland memory accesses.

Alas. user_access_begin() in newer kernels also performs access_ok() itself.
We pay a small price of duplicate access_ok() checks here for now.

We also use __access_ok() instead of access_ok() to avoid warnings on debug kernels.

We use __always_inline instead of inline for the C functions which might
be within the regions with UACCESS enabled (to please objtool's checker).

14 months agoSupport newer kernels with struct module_memory
William Cohen [Wed, 17 May 2023 14:38:31 +0000 (10:38 -0400)]
Support newer kernels with struct module_memory

The upstream kernel commit ac3b43283923440900b4f36ca5f9f0b1ca43b70e
changed the structures for modules.  The runtime printing of kernel
information accessed information about modules and the fields in
module structure.  A test has been added to the autoconf list to
determine the appropriate fields to get information about the
module.

14 months agoPR30454: Fix CR3 switching races on X86 when reading userland memory
Yichun Zhang (agentzh) [Tue, 16 May 2023 21:13:32 +0000 (21:13 +0000)]
PR30454: Fix CR3 switching races on X86 when reading userland memory

Backported the fix from usptream kenrel commit d319f344561de.

See upstream kernel commits 4012e77a90 and d319f344561de for more
details.

14 months agoBug: our autoconf mechanism might find unexported symbols in kernel headers not meant...
Yichun Zhang (agentzh) [Tue, 16 May 2023 20:47:54 +0000 (20:47 +0000)]
Bug: our autoconf mechanism might find unexported symbols in kernel headers not meant for kernel modules

The current BULID_CHECK thing does not pass -DMODULE option as the real
kernel build system does and thus may expose unexported symbols like
nmi_uaccess_okay() to our autoconf test programs.

14 months agoPR30408: fixed excessive read faults when reading userland memory from within perf...
Yichun Zhang (agentzh) [Tue, 16 May 2023 19:12:57 +0000 (19:12 +0000)]
PR30408: fixed excessive read faults when reading userland memory from within perf event/kprobes handlers

The user_addr_max() macro is gone since kernel 5.18, which broke stap's
userland reading routines.

And also since kernel 5.18, access_ok() now does address range checks on
all architectures. so we don't bother checking it ourselves for newer
kernels.

14 months agostap-server logic: drop scraped NSS error table
Frank Ch. Eigler [Fri, 12 May 2023 16:43:55 +0000 (12:43 -0400)]
stap-server logic: drop scraped NSS error table

This used to be needed in the ancient days, when the NSS-related
shared libraries did not reliably decode error codes into usable
messages.  This stuff works nwo, so we don't have to carry this
hand-scraped table around any more.

14 months agoPR30442: failing optional statement probes should not trigger pass2 exceptions
Frank Ch. Eigler [Fri, 12 May 2023 15:13:45 +0000 (11:13 -0400)]
PR30442: failing optional statement probes should not trigger pass2 exceptions

In tapsets.cxx, query_cu() and query_module() aggressively caught &
sess-print_error'd semantic_errors from subsidiary call sites.  They
are unaware of whether the probe in question is being resolved within
an optional (? or !) context.  Instead of this, they now simply let
the exceptions propagate out to derive_probes() or similar, which does
know whether exceptions are errors in that context.  That means
exceptions can propagate through elfutils iteration machinery too,
perhaps risking C level memory leaks, but so be it.

This fix goes well beyond statement probes per se, but hand-testing
and the testsuite appear not to show regressions related to this.

Added semok/badstmt.exp to test.

14 months agotestsuite: untested "$t est" typo fix
Frank Ch. Eigler [Fri, 12 May 2023 14:55:28 +0000 (10:55 -0400)]
testsuite: untested "$t  est" typo fix

14 months agoconfigury: prep for next version
Frank Ch. Eigler [Thu, 11 May 2023 21:56:26 +0000 (17:56 -0400)]
configury: prep for next version

14 months agorelease date fix
Frank Ch. Eigler [Fri, 28 Apr 2023 17:51:27 +0000 (13:51 -0400)]
release date fix

14 months agoPR30405: stapkp_init(): we should not disable preemption around the kallsyms_on_each_...
Yichun Zhang (agentzh) [Sat, 6 May 2023 22:21:14 +0000 (15:21 -0700)]
PR30405: stapkp_init(): we should not disable preemption around the kallsyms_on_each_symbol() call

14 months agofix duplicate codegen in stapregex-dfa.cxx
Serhei Makarov [Mon, 8 May 2023 12:15:09 +0000 (08:15 -0400)]
fix duplicate codegen in stapregex-dfa.cxx

On a span with only '\0', the existing DFA codegen was emitting the same
bookkeeping code again after the 'break;' -- harmless but stupid.

14 months agofix PR30395: Regex code has invalid memory reads caught by KASAN
Serhei Makarov [Mon, 8 May 2023 12:12:59 +0000 (08:12 -0400)]
fix PR30395: Regex code has invalid memory reads caught by KASAN

The TNFA tag cleanup on a '\0' byte would incorrectly read beyond the
end of the string. Keeping YYCURSOR on the nul byte fixes this.

Will harden the fix a little (adding a separate increment-only cursor
for safety) before I close the bug, but this change is already
sufficient if the DFA was generated correctly.

14 months agoPR30406: C symbol conflicts when using stap -DDEBUG_MEM and kernel 6.2
Yichun Zhang (agentzh) [Sun, 30 Apr 2023 21:16:39 +0000 (14:16 -0700)]
PR30406: C symbol conflicts when using stap -DDEBUG_MEM and kernel 6.2

The C symbol MEM_PERCPU was in conflict. We add the STP_ prefix to our
own symbol names.

14 months agoNEWS++ release-4.9a
Frank Ch. Eigler [Fri, 28 Apr 2023 16:07:15 +0000 (12:07 -0400)]
NEWS++

14 months agopr18649.exp: Consider "No DWARF information found" warning expected
Martin Cermak [Fri, 28 Apr 2023 13:37:43 +0000 (15:37 +0200)]
pr18649.exp: Consider "No DWARF information found" warning expected

Testing without debuginfo is part of the test scenario, so it makes
sense to ignore warnings about missing debuginfo.

14 months agoPR30396: adapt runtime to linux 6.3-rc
Frank Ch. Eigler [Thu, 27 Apr 2023 21:02:26 +0000 (17:02 -0400)]
PR30396: adapt runtime to linux 6.3-rc

Found a case where CFI/--ibt interfered with our self-backtrace
capability, and a compatibility bit with init/cleanup_module.

14 months agopre-release prep/regen
Frank Ch. Eigler [Wed, 26 Apr 2023 18:41:29 +0000 (14:41 -0400)]
pre-release prep/regen

14 months agoISystemtap: spec update to fix install issues where pip is unavailable
Ryan Goldberg [Thu, 27 Apr 2023 15:47:33 +0000 (11:47 -0400)]
ISystemtap: spec update to fix install issues where pip is unavailable

14 months agoTest for kernels that backported removal of <linux/genhd.h> include
William Cohen [Tue, 25 Apr 2023 14:56:47 +0000 (10:56 -0400)]
Test for kernels that backported removal of <linux/genhd.h> include

Some kernels (RHEL9) backported patches that removed the
<linux/genhd.h> include.  Thus, the ioblock.stp tapset cannot simply
check the kernel version to determine whether the include file is
available.  The added autoconf test will determine whether the include
is available.

14 months agoAllow nfsd.stp tapset to work on kernels with CONFIG_NFSD_V2 unset
William Cohen [Tue, 25 Apr 2023 13:44:51 +0000 (09:44 -0400)]
Allow nfsd.stp tapset to work on kernels with CONFIG_NFSD_V2 unset

Some of the newer Fedora kernels have CONFIG_NFSD_V2 unset (*).  The
nfsd.stp tapset was requiring various NFSD V2 probes points to exist.
These required probes caused examples like nfsd-trace and nfsdtop
build failures.  Making the NFSD V2 probes optional allows the
nfsd.stp tapset to work on these kernels.

* https://src.fedoraproject.org/rpms/kernel/c/897c8e8d51d02e159116d60fe5bb5dde79150162?branch=rawhide

14 months agoBZ2180328: disable pass-2 dyninst liveness analysis on CONFIG_RETPOLINE kernels
Frank Ch. Eigler [Wed, 19 Apr 2023 15:23:16 +0000 (11:23 -0400)]
BZ2180328: disable pass-2 dyninst liveness analysis on CONFIG_RETPOLINE kernels

As a stopgap measure, ameliorate the dramatic dyninst analysis time
required to liveness-check $var assignments in kernels compiled with
retpolines.  Just skip the effort (with a warning).

See also: https://github.com/dyninst/dyninst/issues/1305 .

14 months agostap-prep: Provide --quiet switch
Martin Cermak [Wed, 19 Apr 2023 11:44:57 +0000 (13:44 +0200)]
stap-prep:  Provide --quiet switch

The stap-prep may run in automation environment, where
verbose output and progress indicators pollute logs.

Teach stap-prep to run quietly.

14 months agoAdded docs for livepatch.stp
Ryan Goldberg [Tue, 18 Apr 2023 15:47:59 +0000 (11:47 -0400)]
Added docs for livepatch.stp

14 months agoISystemtap: Tweaked monitor to fix older build issues
Ryan Goldberg [Tue, 18 Apr 2023 14:26:44 +0000 (10:26 -0400)]
ISystemtap: Tweaked monitor to fix older build issues

15 months agoISystemtap: Added man page stap-jupyter(1)
Ryan Goldberg [Mon, 17 Apr 2023 17:32:38 +0000 (13:32 -0400)]
ISystemtap: Added man page stap-jupyter(1)

15 months agoISystemtap: Improved logging and bug fixes
Ryan Goldberg [Fri, 14 Apr 2023 15:31:14 +0000 (11:31 -0400)]
ISystemtap: Improved logging and bug fixes

15 months agoISystemtap: Added stap-jupyter-* commands and tweaked containers
Ryan Goldberg [Fri, 31 Mar 2023 16:23:00 +0000 (12:23 -0400)]
ISystemtap: Added stap-jupyter-* commands and tweaked containers

15 months agoISystemtap: Updated NEWS, spec and other small tweaks
Ryan Goldberg [Wed, 22 Mar 2023 20:11:06 +0000 (16:11 -0400)]
ISystemtap: Updated NEWS, spec and other small tweaks

15 months agoISystemtap: Added containerized encapsulation of jupyter kernel
Ryan Goldberg [Thu, 16 Mar 2023 17:21:46 +0000 (13:21 -0400)]
ISystemtap: Added containerized encapsulation of jupyter kernel

15 months agoISystemtap: Highlighting, examples and tests
Ryan Goldberg [Tue, 7 Mar 2023 21:32:33 +0000 (16:32 -0500)]
ISystemtap: Highlighting, examples and tests

15 months agoISystemtap: Changes to monitor mode & language server for use with jupyter
Ryan Goldberg [Mon, 6 Mar 2023 18:06:47 +0000 (13:06 -0500)]
ISystemtap: Changes to monitor mode & language server for use with jupyter

15 months agoISystemtap: New Jupyter kernel
Ryan Goldberg [Mon, 6 Mar 2023 17:13:19 +0000 (12:13 -0500)]
ISystemtap: New Jupyter kernel

15 months agodropwatch.stp sample: use symdata vs symname for more info
Frank Ch. Eigler [Wed, 29 Mar 2023 20:39:43 +0000 (16:39 -0400)]
dropwatch.stp sample: use symdata vs symname for more info

The script still needs to be run via something like this for
module/symbol names:

% stap --example dropwatch.stp --all-modules

15 months agoLang Server: Updated gcc version requirement
Ryan Goldberg [Mon, 27 Mar 2023 16:00:14 +0000 (12:00 -0400)]
Lang Server: Updated gcc version requirement

15 months agoLang Server: Fix for deprecated jsonc call and older gcc versions
Ryan Goldberg [Thu, 23 Mar 2023 17:54:07 +0000 (13:54 -0400)]
Lang Server: Fix for deprecated jsonc call and older gcc versions

16 months agoPR30123: rework dwarf4/5 DW_AT_data_bit_offset support
Frank Ch. Eigler [Thu, 9 Mar 2023 22:05:33 +0000 (17:05 -0500)]
PR30123: rework dwarf4/5 DW_AT_data_bit_offset support

$subject DWARF attribute is another way of designating the relative
position of a member field of a struct within it, generally a
bitfield.  It's an absolute bit offset relative to the beginning of
the containing object, rather than the immediately containing word, so
the bit offset numbers can become huge.

New code treats these more correctly, by intercepting them in
dwflpp::translate_final_fetch_or_store to offset the final load/store
address, and relativizing the bit offsets.

New test case covers a variety of -gdwarf* levels with a userspace
target program.

16 months agotestsuite Makefiles: suppress debuginfod client tracing
Frank Ch. Eigler [Thu, 9 Mar 2023 22:03:31 +0000 (17:03 -0500)]
testsuite Makefiles: suppress debuginfod client tracing

Use a strategically placed env -uDEBUGINFOD_PROGRESS -uDEBUGINFOD_VERBOSE .

16 months agodtrace.in: add emacs mode marker for python
Frank Ch. Eigler [Mon, 27 Feb 2023 14:37:19 +0000 (09:37 -0500)]
dtrace.in: add emacs mode marker for python

16 months agodtrace: Use deterministic temp file creation for all temp files
Gioele Barabucci [Mon, 27 Feb 2023 11:56:52 +0000 (12:56 +0100)]
dtrace: Use deterministic temp file creation for all temp files

`dtrace -G -C` creates temporary files with random filenames. The name
of these temporary files gets embedded in the ELF `.symtab` of the final
object files, making them always slightly different.

This behavior makes all packages that use `dtrace`-produced object files
inherently non reproducible.

To fix this issue all temporary files are now created using
the same deterministic procedure currently used only for the
temporary "c." files.

Fixes: https://bugs.debian.org/1032055
Fixes: https://bugs.debian.org/1032056
Signed-off-by: Gioele Barabucci <gioele@svario.it>
17 months agointeractive.cxx: use temporary file with .stp suffix
Martin Cermak [Fri, 10 Feb 2023 13:08:22 +0000 (14:08 +0100)]
interactive.cxx:  use temporary file with .stp suffix

In systemtap interactive mode (stap -i), editors like vim can
benefit from this change by automatically turning on the stap
syntax highlighting and completion.  For this to work, the
EDITOR env var needs to point to the editor of choice.

17 months agostap_language_server_tester.py: Compatibility with python pre-3.7 (cont'd)
Martin Cermak [Wed, 8 Feb 2023 12:03:56 +0000 (13:03 +0100)]
stap_language_server_tester.py:  Compatibility with python pre-3.7 (cont'd)

17 months agostap_language_server_tester.py: Compatibility with python pre-3.7
Martin Cermak [Wed, 8 Feb 2023 11:23:03 +0000 (12:23 +0100)]
stap_language_server_tester.py:  Compatibility with python pre-3.7

17 months agostap_language_server_tester.py: Compatibility with python pre-3.10
Martin Cermak [Wed, 8 Feb 2023 09:01:28 +0000 (10:01 +0100)]
stap_language_server_tester.py:  Compatibility with python pre-3.10

17 months agoLang Server: Testsuite update
Ryan Goldberg [Tue, 7 Feb 2023 18:04:15 +0000 (13:04 -0500)]
Lang Server: Testsuite update

17 months agoLang Server: Removed c++17 features to fix rhel8 build
Ryan Goldberg [Mon, 6 Feb 2023 20:49:30 +0000 (15:49 -0500)]
Lang Server: Removed c++17 features to fix rhel8 build

17 months agoLang Server: News update and minor tweaks
Ryan Goldberg [Fri, 3 Feb 2023 16:03:23 +0000 (11:03 -0500)]
Lang Server: News update and minor tweaks

17 months agoLang Server: Moved to using stap parser
Ryan Goldberg [Thu, 2 Feb 2023 19:43:12 +0000 (14:43 -0500)]
Lang Server: Moved to using stap parser

17 months agoLang-Server: Small bug fixes
Ryan Goldberg [Tue, 24 Jan 2023 21:59:46 +0000 (16:59 -0500)]
Lang-Server: Small bug fixes

17 months agoLang Server: Context var completion & scope bugfix
Ryan Goldberg [Mon, 23 Jan 2023 16:39:16 +0000 (11:39 -0500)]
Lang Server: Context var completion & scope bugfix

17 months agoAdded null-checks to parser
Ryan Goldberg [Thu, 19 Jan 2023 19:30:18 +0000 (14:30 -0500)]
Added null-checks to parser

17 months agoLang server: Small bug fixes & TODO update
Ryan Goldberg [Thu, 19 Jan 2023 19:19:17 +0000 (14:19 -0500)]
Lang server: Small bug fixes & TODO update

17 months agoLang-server: optimized local definition parsing
Ryan Goldberg [Wed, 18 Jan 2023 21:40:35 +0000 (16:40 -0500)]
Lang-server: optimized local definition parsing

In order to speed up full-syncs (ex. jupyter-lsp)
compute the diff between the old source and the text.
This allows for a much faster updating of local definitions
and thus a faster completion (without a multi-second delay)

17 months agoLang server: Added incremental synchronization
Ryan Goldberg [Fri, 13 Jan 2023 15:53:40 +0000 (10:53 -0500)]
Lang server: Added incremental synchronization

17 months agoAdded local global/function LS completion
Ryan Goldberg [Tue, 10 Jan 2023 21:25:48 +0000 (16:25 -0500)]
Added local global/function LS completion

17 months agoadd some notes of things interactively tested & to improve
Frank Ch. Eigler [Tue, 3 Jan 2023 18:32:19 +0000 (13:32 -0500)]
add some notes of things interactively tested & to improve

17 months agotolerate stap --language-server </dev/null
Frank Ch. Eigler [Tue, 3 Jan 2023 17:27:35 +0000 (12:27 -0500)]
tolerate stap --language-server </dev/null

17 months agolanguage-server: configury refresh
Frank Ch. Eigler [Tue, 3 Jan 2023 16:41:04 +0000 (11:41 -0500)]
language-server: configury refresh

17 months agoAdded emacs, vscode and eclipse usage recipes
Ryan Goldberg [Fri, 23 Dec 2022 20:01:49 +0000 (15:01 -0500)]
Added emacs, vscode and eclipse usage recipes

17 months agoAdded README for language-server
Ryan Goldberg [Tue, 20 Dec 2022 21:55:42 +0000 (16:55 -0500)]
Added README for language-server

17 months agoAdded tests for language-server
Ryan Goldberg [Tue, 20 Dec 2022 21:21:44 +0000 (16:21 -0500)]
Added tests for language-server

17 months agoAdded language server feature: completion
Ryan Goldberg [Tue, 20 Dec 2022 16:52:34 +0000 (11:52 -0500)]
Added language server feature: completion

17 months agoThe base language server impl
Ryan Goldberg [Tue, 20 Dec 2022 14:17:40 +0000 (09:17 -0500)]
The base language server impl

17 months agoAdded a new mode: language server
Ryan Goldberg [Mon, 19 Dec 2022 22:29:48 +0000 (17:29 -0500)]
Added a new mode: language server

This mode will turn the stap process into a
language server, which will use the official
language-server-protocol. It can be started
with the new --language-server flag

17 months agoAdd jsonrpc 2.0 client implementation
Ryan Goldberg [Mon, 19 Dec 2022 22:03:24 +0000 (17:03 -0500)]
Add jsonrpc 2.0 client implementation

17 months agoclient-http.cxx: Fix build error rpmFreeCrypto not declared
Aaron Merey [Fri, 27 Jan 2023 16:16:43 +0000 (11:16 -0500)]
client-http.cxx: Fix build error rpmFreeCrypto not declared

rpm-4.18.0 moved the declaration of rpmFreeCrypto into rpm/rpmcrypto.h.

Include this header in client-http.cxx when required in order to avoid
the following error:

 CXX      stap_gen_cert-util.o
../systemtap/client-http.cxx: In member function ‘std::string http_client::get_rpmname(std::string&)’:
../systemtap/client-http.cxx:482:5: error: ‘rpmFreeCrypto’ was not declared in this scope
  482 |     rpmFreeCrypto ();
      |     ^~~~~~~~~~~~~

See https://sourceware.org/bugzilla/show_bug.cgi?id=29094

17 months agodtrace.exp: prevent filesystem access problem with as_non_root()
Martin Cermak [Thu, 26 Jan 2023 12:18:20 +0000 (13:18 +0100)]
dtrace.exp:  prevent filesystem access problem with as_non_root()

17 months agoruntime/stack.c: Fix print_backtrace()
Martin Cermak [Wed, 25 Jan 2023 16:57:24 +0000 (17:57 +0100)]
runtime/stack.c: Fix print_backtrace()

Before this update, print_backtrace() was producing duplicate lines
at the end of the trace:

$ cat /root/systemtap/testsuite/systemtap.base/backtrace.stp
probe begin, end, procfs("foo").read, procfs("foo").write { log(pp()) print_backtrace() }
probe timer.ms(100) { log(pp()) print_backtrace() exit() }
$ stap /root/systemtap/testsuite/systemtap.base/backtrace.stp -d kernel -w
begin
 0xffffffffc1091368 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xb368/0x0]
 0xffffffffc109156a [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xb56a/0x0]
 0xffffffffc1091d2b [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xbd2b/0x0]
 0xffffffffc108a333 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0x4333/0x0]
 0xffffffffc1092fc6 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0xcfc6/0x0]
 0xffffffffc108ce22 [stap_7a1114b3de11b6b97c907eafd2782_1404790+0x6e22/0x0]
 0xffffffffb8e545b2 : proc_reg_write+0x52/0xa0 [kernel]
 0xffffffffb8dc6202 : vfs_write+0xb2/0x280 [kernel]
 0xffffffffb8dc66bf : ksys_write+0x5f/0xe0 [kernel]
 0xffffffffb9520159 : do_syscall_64+0x59/0x90 [kernel]
 0xffffffffb960009b : entry_SYSCALL_64_after_hwframe+0x63/0xcd [kernel]
 0xffffffffb960009b : entry_SYSCALL_64_after_hwframe+0x63/0xcd [kernel] (inexact)
[ ... stuff deleted ... ]

See the very last line of the above trace, which is duplicit.  This problem
was detected by the backtrace.exp testcase.  This update prevents calling the
fallback _stp_stack_print_fallback() in case _stp_print_addr() was already able
to successfully provide some output based on dwarf unwinding.

17 months agodtrace.exp: clean up junk output from previous runs
Martin Cermak [Wed, 25 Jan 2023 15:21:33 +0000 (16:21 +0100)]
dtrace.exp: clean up junk output from previous runs

17 months agodw_entry_value.exp: fix the testcase
Martin Cermak [Wed, 18 Jan 2023 13:24:12 +0000 (14:24 +0100)]
dw_entry_value.exp: fix the testcase

After fixing 05eb6742c1 (Handle DWARF5 DW_OP_implicit_pointer and
DW_OP_entry_value), dw_entry_value.exp no more ends up untested,
but instead often fails in Pass 5.

The problem was that stap_run() sends kill -INT to stap right after
the load generation function (no_load() in this case) is executed,
causing a Pass 5 failure and => testcase failure (unexpected output).

A workaround would be to sleep a second before the signal is sent so
that stap can cleanly finish, and the signal can't be delivered, making
the testcase green. But that'd be just a workaround.

This update relies on stap_run2() instead of stap_run(), simplifying
the testcase and making it stable.

18 months agoGenerate the 32-bit RISCV syscall name<->number mappings.
William Cohen [Mon, 16 Jan 2023 01:40:27 +0000 (20:40 -0500)]
Generate the 32-bit RISCV syscall name<->number mappings.

18 months agoGenerate event syscall name<->number mappings for 32-bit RISCV
William Cohen [Mon, 16 Jan 2023 01:29:51 +0000 (20:29 -0500)]
Generate event syscall name<->number mappings for 32-bit RISCV

There can be a lot of compiler complaints on 64-bit RISCV when
compiling systemtap scripts using syscall_any tapsets about the
missing 32-bit syscall name<->number mappings.  The strace code does
not have special tables for 32-bit RISCV.  However, the numbers look
to be virtually the same for both 64-bit and 32-bit RISCV.  For the
time being just generating a 32-bit version of the table from the
64-bit strace tables.

18 months agoUpdate syscall mapping information for syscall_any tapset
William Cohen [Mon, 16 Jan 2023 01:28:24 +0000 (20:28 -0500)]
Update syscall mapping information for syscall_any tapset

There are a couple new syscalls available, futex_waitv and
set_mempolicy_home_node.  Regenerated the num2name and name2num
associative arrays to include those new syscalls for syscall_any
tapset.

18 months agotestsuite/lib/stap_compile.exp: standardize $test messages
Frank Ch. Eigler [Thu, 5 Jan 2023 23:41:11 +0000 (18:41 -0500)]
testsuite/lib/stap_compile.exp: standardize $test messages

Correct a misuse of dejagnu pass/fail descriptive text.  Pass/fail
status is sufficiently communicated by the proc, and should not be
repeated in the text parameter.

19 months agotapset: nfs.proc.commit_done compilation on some kernels
Martin Cermak [Fri, 16 Dec 2022 21:08:20 +0000 (16:08 -0500)]
tapset: nfs.proc.commit_done compilation on some kernels

Correct:
9.0 Server x86_64 # stap -vp3 nfs.proc.commit_done.stp

Pass 1: parsed user script and 482 library scripts using 108088virt/88468res/12460shr/75476data kb, in 190usr/60sys/501real ms.
semantic error: invalid access '->task' vs 'void*': operator '->' at /usr/share/systemtap/tapset/linux/nfs_proc.stpm:16:21
        source:         ( get_ip(&@nfs_data->task) )
                                           ^
        in expansion of macro: operator '@_nfs_data_server_ip' at /usr/share/systemtap/tapset/linux/nfs_proc.stp:1421:15
        source:                 server_ip = @_nfs_data_server_ip($task->tk_calldata)
                                            ^

19 months agoPR29766: kernel.function("__set_page_dirty_buffers") not found in vfs.stp
Martin Cermak [Wed, 14 Dec 2022 16:37:58 +0000 (17:37 +0100)]
PR29766: kernel.function("__set_page_dirty_buffers") not found in vfs.stp

Updates needed for 6.1.0-65.fc38 compatibility.

19 months agoPR29837: Refix to work correctly with --dyninst too
Martin Cermak [Tue, 6 Dec 2022 15:30:36 +0000 (16:30 +0100)]
PR29837: Refix to work correctly with --dyninst too

19 months agoPR29676: Wildcard expansion fix for labels
Ryan Goldberg [Thu, 1 Dec 2022 21:15:44 +0000 (16:15 -0500)]
PR29676: Wildcard expansion fix for labels

PR29676, introduced an bug where function symbols from the symbol
table were expanded in the function component resulting in wildcards
not being expanded in labels. This fix, removes the issue by restricting
the symbol table query to probes which don't need further debuginfo to
expand.

19 months agoPR29837: Refix using kernel buildsystem directives
Martin Cermak [Wed, 30 Nov 2022 11:31:53 +0000 (12:31 +0100)]
PR29837: Refix using kernel buildsystem directives

This update allows for an option to suppress the kernel version
warning coming from the kernel build system using stap -w .

For the testsuite, the warning is suppressed unconditionally so
that individual tests do not need to handle it on its own.

19 months agoTestsuite/labels.exp: PR29837 partial fix
Martin Cermak [Tue, 29 Nov 2022 20:28:25 +0000 (21:28 +0100)]
Testsuite/labels.exp: PR29837 partial fix

19 months agoHandle DWARF5 DW_OP_implicit_pointer and DW_OP_entry_value
Mark Wielaard [Tue, 29 Nov 2022 17:50:58 +0000 (18:50 +0100)]
Handle DWARF5 DW_OP_implicit_pointer and DW_OP_entry_value

These are the same as the GNU extensions for older DWARF,
DW_OP_GNU_implicit_pointer and DW_GNU_entry_value.

19 months agoscripts/update-htmldocs: rework for git htmldocs repo
Serhei Makarov [Fri, 25 Nov 2022 18:35:02 +0000 (13:35 -0500)]
scripts/update-htmldocs: rework for git htmldocs repo

The 'git push' step is done by the user
separately from the update-htmldocs script,
allowing the changes to be reviewed before upload.

19 months agopr29801 removes dup synthetic probe group joins
Ryan Goldberg [Fri, 18 Nov 2022 15:04:55 +0000 (10:04 -0500)]
pr29801 removes dup synthetic probe group joins

Synthetic probes created -before- semantic_pass_optimize1
were joining the groups twice

20 months agoscripts/update-htmldocs: fixups for practicality
Serhei Makarov [Wed, 16 Nov 2022 15:26:41 +0000 (10:26 -0500)]
scripts/update-htmldocs: fixups for practicality

- script should check out latest release tag,
  in case website update is being done after version bumps
- set CVS_RSH=ssh as it can work no other way

20 months agoautoconf version bumps for next release 4.9
Serhei Makarov [Thu, 10 Nov 2022 15:57:29 +0000 (10:57 -0500)]
autoconf version bumps for next release 4.9

20 months agoversion bumps for next release 4.9
Serhei Makarov [Thu, 10 Nov 2022 15:56:22 +0000 (10:56 -0500)]
version bumps for next release 4.9

20 months agoEnsure that SystemTap runtime uses smp_processor_id() in proper context
William Cohen [Fri, 4 Nov 2022 15:12:05 +0000 (11:12 -0400)]
Ensure that SystemTap runtime uses smp_processor_id() in proper context

There were cases on Fedora 36 and Rawhide running kernels with
CONFIG_DEBUG_PREEMPT=y where systemtap scripts would trigger kernel
log messages like the following:

[  257.544406] check_preemption_disabled: 4 callbacks suppressed
[  257.544409] BUG: using smp_processor_id() in preemptible [00000000] code: staprun/2106
[  257.544465] caller is _stp_runtime_context_trylock+0x12/0x70 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544507] CPU: 0 PID: 2106 Comm: staprun Tainted: G           OE     -------  ---  6.1.0-0.rc2.20221028git23758867219c.24.fc38.x86_64 #1
[  257.544544] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-1.fc36 04/01/2014
[  257.544571] Call Trace:
[  257.544583]  <TASK>
[  257.544593]  dump_stack_lvl+0x5b/0x77
[  257.544620]  check_preemption_disabled+0xe1/0xf0
[  257.544641]  _stp_runtime_context_trylock+0x12/0x70 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544673]  _stp_runtime_entryfn_get_context+0xb/0x70 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544705]  _stp_ctl_send+0x76/0x1e0 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544735]  _stp_transport_init+0x71a/0x860 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544771]  ? kallsyms_on_each_symbol+0x30/0x30 [stap_e36600406768aeefd49daf9fc7a3d23c_2106]
[  257.544803]  do_one_initcall+0x6b/0x320
[  257.544827]  do_init_module+0x4a/0x200
[  257.544844]  __do_sys_init_module+0x16a/0x1a0
[  257.544870]  do_syscall_64+0x58/0x80
[  257.544885]  ? up_read+0x17/0x20
[  257.544902]  ? lock_is_held_type+0xe8/0x140
[  257.544921]  ? asm_exc_page_fault+0x22/0x30
[  257.544939]  ? lockdep_hardirqs_on+0x7d/0x100
[  257.544956]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[  257.544975] RIP: 0033:0x7f3cde12f5de
[  257.544992] Code: 48 8b 0d 35 68 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 02 68 0c 00 f7 d8 64 89 01 48
[  257.545010] RSP: 002b:00007ffc5170c418 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[  257.545010] RAX: ffffffffffffffda RBX: 0000563620bd4020 RCX: 00007f3cde12f5de
[  257.545010] RDX: 0000563620bd4020 RSI: 0000000000040ea0 RDI: 00007f3cde44a010
[  257.545010] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
[  257.545010] R10: 0000000000000053 R11: 0000000000000246 R12: 00007ffc5170c510
[  257.545010] R13: 00007f3cde44a010 R14: 00007ffc5170c440 R15: 00007f3cde4631e8
[  257.545010]  </TASK>

This issue was introduced by git commit 1641b6e7ea which added a fast
path check that used smp_processor_id() without first having a
preempt_disable().  The code now ensures that preemption is disabled
before using the smp_processor_id().

20 months agoSet PYTHONPATH from PY3EXECDIR.
Stan Cox [Fri, 4 Nov 2022 20:18:51 +0000 (16:18 -0400)]
Set PYTHONPATH from PY3EXECDIR.

Set PYTHONPATH from PY3EXECDIR instead of PYEXECDIR.

20 months agotestsuite/systemtap.examples: regen index release-4.8
Serhei Makarov [Thu, 3 Nov 2022 18:25:00 +0000 (14:25 -0400)]
testsuite/systemtap.examples: regen index

20 months agodoc/: regen pdfs
Serhei Makarov [Thu, 3 Nov 2022 18:22:46 +0000 (14:22 -0400)]
doc/: regen pdfs

20 months agodoc/SystemTap_Tapset_Reference/: bump copyyears
Serhei Makarov [Thu, 3 Nov 2022 18:21:04 +0000 (14:21 -0400)]
doc/SystemTap_Tapset_Reference/: bump copyyears

committed separately as a note-to-self to do this more regularly

20 months agodoc/SystemTap_Tapset_Reference: regen man pages + xml
Serhei Makarov [Thu, 3 Nov 2022 18:06:05 +0000 (14:06 -0400)]
doc/SystemTap_Tapset_Reference: regen man pages + xml

20 months agosystemtap.spec + NEWS: releasing 22-11-03
Serhei Makarov [Thu, 3 Nov 2022 17:23:33 +0000 (13:23 -0400)]
systemtap.spec + NEWS: releasing 22-11-03

20 months agoAUTHORS: refresh again
Serhei Makarov [Thu, 3 Nov 2022 17:02:01 +0000 (13:02 -0400)]
AUTHORS: refresh again

20 months agoRevert "runtime: stat: avoid allocating stat_data memory on offline CPUs"
Serhei Makarov [Thu, 3 Nov 2022 16:56:11 +0000 (12:56 -0400)]
Revert "runtime: stat: avoid allocating stat_data memory on offline CPUs"

This reverts commit ba42203ae957bb62805e18eac30459eb74cde3d2.
There are indications that on some non-x86 platforms (ppc64le)
this patch may be causing problems i.e.
'sleeping function called in invalid context' warnings.

Reverting for the release, may return this patch if I get a
clearer idea of the cause of the problem.

20 months agoRevert "Revert "Bug: runtime: we might not sync the tracepoint's SRCU state after...
Serhei Makarov [Thu, 3 Nov 2022 16:54:02 +0000 (12:54 -0400)]
Revert "Revert "Bug: runtime: we might not sync the tracepoint's SRCU state after unregistering the tracepoints""

This reverts commit fae609baeb93c4f41983adcb451378f049b4cdc9.
(There was a miscommunication about which commit was causing the
problem on ppc64le. Just re-confirmed the tracepoint-SRCU commit
was not the culprit.)

20 months agoupdate tested-kernels range to include 6.1.0-rc3 :)
Serhei Makarov [Thu, 3 Nov 2022 15:46:06 +0000 (11:46 -0400)]
update tested-kernels range to include 6.1.0-rc3 :)

20 months agosession.cxx: update tested-kernels range to include 6.1.0-rc2
Frank Ch. Eigler [Thu, 3 Nov 2022 15:43:26 +0000 (11:43 -0400)]
session.cxx: update tested-kernels range to include 6.1.0-rc2

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