SHA256
1
0
forked from pool/systemtap

Accepting request 1181552 from devel:tools

- Upgrade to version 5.1. See systemtap.changes for changelog 
- Upgrade to version 5.1. See systemtap.changes for changelog 
- Upgrade to version 5.1. See systemtap.changes for changelog 
- Update to version 5.1
  Summary of changes:
  * SystemTap frontend (stap) changes
    - An experimental "--build-as=USER" flag to reduce privilege during
      script compilation, which is a security improvement effort.
    - New probe-points for userland hardware breakpoints/watchpoints
      targeting processes (PR31180):
        probe process.data(ADDRESS).write
        probe process.data(ADDRESS).rw
        probe process.data(ADDRESS).length(LEN).write
        probe process.data(ADDRESS).length(LEN).rw
    - Support for stap --remote=bpf.
    - Improved searching heuristics for probing symbol names with/without
      symbol-version suffixes and with/without weak names.
    - Made long-running debuginfod downloads more cleanly interruptible.
    - Improved stap-prep heuristics for finding debuginfo for "-rt"
      (real-time) kernels.
  
  * SystemTap backend changes
    - Dynamic namespace switching for processes targeted via "-x PID",
      allowing processes running within containers to be probed.
    - Improved message transport robustness for heavy traffic (individual
      messages spanning pages) and for short runs (avoiding loss of
      last-gasp messages).
    - Added MTAG macro on several internal memory allocation routines
      to improve leak warnings.  Corrected a bunch of leaks.
    - "stap -t" now reports module initialization timings too.
    - Ported runtime for GCC14 compatibility, with its more recent C
      dialect warnings.
    - Support for DW_OP_bra in DWARF location lists, which makes a few
      more $context variables accessible to systemtap.
  
  * SystemTap tapset changes
    - Portability fixes for more recent kernels, as always.
    - set_kernel_string* tapset functions improved range checking.
    - print_ubacktrace_fileline() works with PIE binaries.
    - Many portability improvements and some fixes in the testsuite.
    - Enhancements for the tcp, nfs, memory tapsets.
  Drop following patches (upstream):
    - bpf-translate.cxx-fix-build-against-upcoming-gcc14.patch
    - get-shm_flag-defines-from-the-appropriate-include-file-for-linux-6.8-kernel.patch
    - pr31288-build-with-gcc14-cont.patch
    - pr31288-build-with-gcc14.patch
    - pr31373-deal-with-the-removal-of-strlcpy-from-linux-6.8.patch
    - staprun-fix-build-against-upcoming-gcc14.patch
    - stapvirt.c-more-gcc-14-werror-calloc-transposed-args-compatibility.patch

OBS-URL: https://build.opensuse.org/request/show/1181552
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemtap?expand=0&rev=123
This commit is contained in:
Ana Guerrero 2024-06-19 14:36:11 +00:00 committed by Git OBS Bridge
commit 58d8c93523
19 changed files with 90 additions and 1539 deletions

View File

@ -1,35 +0,0 @@
From: Sergei Trofimovich <slyich@gmail.com>
Date: Fri Dec 22 19:42:38 2023 +0000
Subject: bpf-translate.cxx: fix build against upcoming `gcc-14`
Git-commit: d42139cf9cd26d0c0363fcfe007716baeb8de517
References: bsc#1221706
Signed-off-by: Tony Jones <tonyj@suse.de>
bpf-translate.cxx: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`)
`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
detected minor infelicity in `calloc()` API usage in `systemtap`:
bpf-translate.cxx: In function 'bpf::BPF_Section* bpf::output_probe(BPF_Output&, program&, const std::string&, unsigned int)':
bpf-translate.cxx:5044:39: error: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
5044 | bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns);
| ^~~~~~~~~~~~~~~~
bpf-translate.cxx:5044:39: note: earlier argument should specify number of elements, later size of each element
diff --git a/bpf-translate.cxx b/bpf-translate.cxx
index 1a9302463..aa8ef65ce 100644
--- a/bpf-translate.cxx
+++ b/bpf-translate.cxx
@@ -5041,9 +5041,9 @@ output_probe(BPF_Output &eo, program &prog,
}
}
- bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns);
+ bpf_insn *buf = (bpf_insn*) calloc (ninsns, sizeof(bpf_insn));
assert (buf);
- Elf64_Rel *rel = (Elf64_Rel*) calloc (sizeof(Elf64_Rel), nreloc);
+ Elf64_Rel *rel = (Elf64_Rel*) calloc (nreloc, sizeof(Elf64_Rel));
assert (rel);
unsigned i = 0, r = 0;

View File

@ -1,41 +0,0 @@
From: William Cohen <wcohen@redhat.com>
Date: Tue Feb 20 09:22:34 2024 -0500
Subject: Get SHM_* flag defines from the appropriate include file for Linux 6.8 kernel
Git-commit: 8a9097d906867d364bc94f9c1552f240ca609422
References: bsc#1222249
Signed-off-by: Tony Jones <tonyj@suse.de>
Get SHM_* flag defines from the appropriate include file for Linux 6.8 kernels
Linux git commit bc46ef3cea3d6f6 removed the include/uapi/linux/shm.h
from include/linux/shm.h. For the newer Linux 6.8 kernels need to get
SHM_* defines directly from include/uapi/linux/shm.h.
diff --git a/tapset/linux/aux_syscalls.stp b/tapset/linux/aux_syscalls.stp
index e773ba7c2..fa915af8f 100644
--- a/tapset/linux/aux_syscalls.stp
+++ b/tapset/linux/aux_syscalls.stp
@@ -3405,7 +3405,11 @@ function _dup3_flag_str:string(f:long)
%}
%{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0)
#include <linux/shm.h>
+#else
+#include <uapi/linux/shm.h>
+#endif
static const _stp_val_array _stp_shmat_list[] = {
V(SHM_RDONLY),
V(SHM_RND),
@@ -4149,7 +4153,11 @@ CATCH_DEREF_FAULT();
%{
#include <linux/ipc.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,8,0)
#include <linux/shm.h>
+#else
+#include <uapi/linux/shm.h>
+#endif
static const _stp_val_array _stp_shmget_flags_list[] = {
V(IPC_CREAT),
V(IPC_EXCL),

View File

@ -1,31 +0,0 @@
Author: Frank Ch. Eigler <fche@redhat.com>
Date: Thu Jan 25 16:46:33 2024 -0500
Subject: PR31288: build with gcc14 cont'd
Git-commit: 11353cf4e90b2344db5609a543c5ccd894550831
References: bsc#1221706
Signed-off-by: Tony Jones <tonyj@suse.de>
diff --git a/runtime/softfloat.c b/runtime/softfloat.c
index 709e45d2f..869efdf46 100644
--- a/runtime/softfloat.c
+++ b/runtime/softfloat.c
@@ -614,6 +614,7 @@ uint_fast64_t
|Converting a fp to a str
*------------------------------------------------------------------------*/
+char* itoa(uint64_t val);
char* itoa(uint64_t val)
{
int base = 10;
diff --git a/stapregex.cxx b/stapregex.cxx
index e25992bb2..d0371beee 100644
--- a/stapregex.cxx
+++ b/stapregex.cxx
@@ -103,6 +103,7 @@ void
stapdfa::emit_declaration (translator_output *o) const
{
o->newline() << "// DFA for \"" << orig_input << "\"";
+ o->newline() << "int " << func_name << " (struct context * __restrict__ c, const char *str);";
o->newline() << "int " << func_name << " (struct context * __restrict__ c, const char *str) {";
o->indent(1);

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
From: William Cohen <wcohen@redhat.com>
Date: Wed Feb 14 09:33:30 2024 -0500
Subject: PR31373: Deal with the removal of strlcpy() from linux 6.8
Git-commit: 60c3d8b1c90c58ca7c048ef24e1b03c6c04b36ad
References: bsc#1222249
Signed-off-by: Tony Jones <tonyj@suse.de>
PR31373: Deal with the removal of strlcpy() from linux 6.8
The Linux 6.8 kernels removed strlcpy() with git commit d26270061a in
January 2024. All the kernel's strlcpy() uses were converted to
strscpy(). Systemtap needed to do the same. This is implemented in
systemtap with a strlcpy macro in the runtime that translates the
strscpy() return value into the equivalent strlcpy() value.
diff --git a/runtime/linux/runtime.h b/runtime/linux/runtime.h
index 1fa62c7ed..0e9fe3fea 100644
--- a/runtime/linux/runtime.h
+++ b/runtime/linux/runtime.h
@@ -48,6 +48,20 @@
#include <generated/compile.h>
#endif
+// PR31373: Linux 6.8 kernel removed strlcpy
+// This provides equivalent to strlcpy using strscpy
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,8,0)
+#define strlcpy(dest, src, count) ({ \
+ size_t size=(count); \
+ ssize_t retval = strscpy((dest), (src), size);\
+ if (retval<0) \
+ retval = size; /* was truncated */ \
+ else \
+ retval++; /* count the NULL */ \
+ retval; \
+})
+#endif
+
// PR26811: Replace some declarations after set_fs() removal in kernel 5.10+.
// Should use the STP_* prefixed defines outside of STAPCONF_SET_FS.
#if defined(STAPCONF_SET_FS)

View File

@ -1,30 +0,0 @@
From: Sergei Trofimovich <slyich@gmail.com>
Date: Thu Dec 21 10:00:06 2023 +0000
Subject: staprun: fix build against upcoming `gcc-14`
Git-commit: 52596f023652114642faba5726c99488529029ce
References: bsc#1221706
Signed-off-by: Tony Jones <tonyj@suse.de>
staprun: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`)
`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
detected minor infelicity in `calloc()` API usage in `systemtap`:
staprun.c: In function 'main':
staprun.c:550:50: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
550 | char ** new_argv = calloc(sizeof(char *),argc+2);
| ^~~~
diff --git a/staprun/staprun.c b/staprun/staprun.c
index 8437f3af6..d1b0b221b 100644
--- a/staprun/staprun.c
+++ b/staprun/staprun.c
@@ -547,7 +547,7 @@ int main(int argc, char **argv)
us to extend argv[], with all the C fun that entails. */
#ifdef HAVE_OPENAT
if (relay_basedir_fd >= 0) {
- char ** new_argv = calloc(sizeof(char *),argc+2);
+ char ** new_argv = calloc(argc+2, sizeof(char *));
const int new_Foption_size = 10; /* -FNNNNN */
char * new_Foption = malloc(new_Foption_size);
int i;

View File

@ -1,40 +0,0 @@
From: Frank Ch. Eigler <fche@redhat.com>
Date: Thu Jan 18 16:37:39 2024 -0500
Subject: stapvirt.c: More gcc-14 -Werror=calloc-transposed-args compatibility
Git-commit: 6c0b92b340db23ccc49e18007d4ecbdef3306bd6
References: bsc#1221706
Signed-off-by: Tony Jones <tonyj@suse.de>
stapvirt.c: More gcc-14 -Werror=calloc-transposed-args compatibility
diff --git a/stapvirt.c b/stapvirt.c
index 0a10fa8fe..af02a4f76 100644
--- a/stapvirt.c
+++ b/stapvirt.c
@@ -119,7 +119,7 @@ getActiveDomains(virConnectPtr conn, int **ids)
if (idsn <= 0)
return idsn;
- *ids = (int*) calloc(sizeof(int), idsn);
+ *ids = (int*) calloc(idsn, sizeof(int));
if (*ids == NULL)
return -1;
@@ -145,7 +145,7 @@ getInactiveDomains(virConnectPtr conn, char ***names)
if (namesn <= 0)
return namesn;
- *names = (char**) calloc(sizeof(char*), namesn);
+ *names = (char**) calloc(namesn, sizeof(char*));
if (*names == NULL)
return -1;
@@ -188,7 +188,7 @@ getAllDomains(virConnectPtr conn, virDomainPtr **domains)
goto cleanup_names;
// Time to prepare virDomainPtr array
- *domains = (virDomainPtr*) calloc(sizeof(virDomainPtr), idsn+namesn);
+ *domains = (virDomainPtr*) calloc(idsn+namesn, sizeof(virDomainPtr));
if (*domains == NULL) {
err("Can't allocate domains array\n");
goto cleanup_names;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a8b43408895fee2b0023483b02f861700b0139629050666dfe4dfa1e49d59939
size 6572411

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEETdE2SQQRwKQrKIRPJYtu+g8gnSQFAmVGcA8ACgkQJYtu+g8g
nSTWfRAAoXx2GH/GBE/GTZ191hiq3Xdql9pjHQfu8bgUcw8S7JcudY8DeiCKA9ne
9kngM3pIQMh+0zetly649TTFpyxMTk7vQPOftmzTp694Js/8qMiRjnpbqdo6+QMK
wwI3MwLz2Z/90zBWkfPHpYUke7Hh/gLk9ZjP70MU+UkC0MSj3Gwi5Z7/EZMa8z2n
CBidRUlBi1j9DQgu8lGkZoRb/BLTRkezuHprrVU5GAGtNI6BlpF6D0oBMHFfdWLa
7hHpxIecK8VxOejqQ63RePDVQVIHrECpZRImN1C/3icWCypXoner1Woq7bY2K+7v
32kR7pTbkQOF7GAg612U6AoWXFJdfXJ3YUjGSRogZQkIPI889sQSTngMCVAtxV2K
D/sg7gcU0vcY6rGL8LK2BPNZVPeMOuS3KtziqQTsde0NDX56IcFpxiIig2Mg2I4E
dV/YwWp13OXjNk5HqOhH2t3x+uqoeLnk/JMBtEP5t5g2ch8Qw2Lhd43MIvcB68bA
R2WOgj4kf2iP/H/wptLr2ZbbytwyA9REZuveT/tg9duodKBR4THO/PVxbgDm7yDB
eODa9s0G5uiMh858vXnV7tZQWH3zx/cDyxk+yTvXhakJfFeVbviYMGdZVBa3YVRM
k622EI1uHzakv39gqQnbLCu6KQTcwqtZNQJyZVp85+J12KBPdeM=
=SxfR
-----END PGP SIGNATURE-----

3
systemtap-5.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1db8c1d65bb13b65bc3f30e4cee2f7e174d517e908d994bb0fcde0051f181b40
size 6590820

16
systemtap-5.1.tar.gz.asc Normal file
View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEETdE2SQQRwKQrKIRPJYtu+g8gnSQFAmYsJFgACgkQJYtu+g8g
nSRR7g/+PBWvHSsD24d/k4QR39X9+eANOY166u+SEbDKc2Wh+5JOjjCKY1cTf8mY
M+Z8nFeHZcQW5bXexX8HHui3W1+Nk2IkrLE0Tc11TaIz/Sjj8jouNsM8OVp3GYIu
nZlhOrGmBnh//ojJRV0eiccgHWxVJUfQf4JV8CPt4gKDm1a0tIJVId2HsUQXl4hN
u/cdrCPQgDk2WzpKTQqnfLHrCjEsfgxRVEDERyn+cjYfeYMZyMkyYG+0ln+775i8
64S8Qe9oOX80dRjRPQ7S0IvOLje4PWUlw6p2ZhW1P6Wf0G2xXKJ4n6T0PSI77ju8
QdZUDm78j4S0fJLjrkFe1IWepsZYCmom/JQWGufmPTn8xEgIAXji7vHRu2fx9pa2
HBtFrrRqwdxfEa5UB3McSZl128B/x8+jkCROKdV+e/Uk8lu7KUkVkeLQzbXgh8kd
2nRxzDPCwN/Ps1Udz/6DUiEBAUwSjtqnIe+p+a1fG/HSxTEHYhCj99SFyQB/8ufd
Zh+7W33eki2zMiUzTWBMSOjkydUdQ0rEYcJryWh9RCpeEZKcwwIPvU9p3hKtpUxD
zsE2Piy8NWqdjTBY+ENkPNEkEIMcqSgqW3nZTRbDuZ85PmC5ikide3p6ql085PRr
kpMImFX76fTbiToAC76bXjrtuKzvmgd/uCt9Kt143162cxAZdao=
=nS25
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jun 17 22:44:47 UTC 2024 - Tony Jones <tonyj@suse.com>
- Upgrade to version 5.1. See systemtap.changes for changelog
-------------------------------------------------------------------
Sat Dec 30 13:48:44 UTC 2023 - Florian "sp1rit" <sp1rit@disroot.org>

View File

@ -17,7 +17,7 @@
Name: systemtap-docs
Version: 5.0
Version: 5.1
Release: 0
Summary: Documents and examples for systemtap
License: GPL-2.0-or-later

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jun 17 22:44:47 UTC 2024 - Tony Jones <tonyj@suse.com>
- Upgrade to version 5.1. See systemtap.changes for changelog
-------------------------------------------------------------------
Fri Mar 8 15:56:21 UTC 2024 - pgajdos@suse.com

View File

@ -20,7 +20,7 @@
%define _rundir %{_localstatedir}/run
%endif
Name: systemtap-dtrace
Version: 5.0
Version: 5.1
Release: 0
Summary: SystemTap dtrace utility
License: GPL-2.0-or-later

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jun 17 22:44:47 UTC 2024 - Tony Jones <tonyj@suse.com>
- Upgrade to version 5.1. See systemtap.changes for changelog
-------------------------------------------------------------------
Tue Sep 13 01:21:04 UTC 2022 - Tony Jones <tonyj@suse.com>

View File

@ -24,7 +24,7 @@
%define _rundir %{_localstatedir}/run
%endif
Name: systemtap-headers
Version: 5.0
Version: 5.1
Release: 0
Summary: SystemTap headers
License: GPL-2.0-or-later

View File

@ -1,3 +1,55 @@
-------------------------------------------------------------------
Mon Jun 17 22:40:06 UTC 2024 - Tony Jones <tonyj@suse.com>
- Update to version 5.1
Summary of changes:
* SystemTap frontend (stap) changes
- An experimental "--build-as=USER" flag to reduce privilege during
script compilation, which is a security improvement effort.
- New probe-points for userland hardware breakpoints/watchpoints
targeting processes (PR31180):
probe process.data(ADDRESS).write
probe process.data(ADDRESS).rw
probe process.data(ADDRESS).length(LEN).write
probe process.data(ADDRESS).length(LEN).rw
- Support for stap --remote=bpf.
- Improved searching heuristics for probing symbol names with/without
symbol-version suffixes and with/without weak names.
- Made long-running debuginfod downloads more cleanly interruptible.
- Improved stap-prep heuristics for finding debuginfo for "-rt"
(real-time) kernels.
* SystemTap backend changes
- Dynamic namespace switching for processes targeted via "-x PID",
allowing processes running within containers to be probed.
- Improved message transport robustness for heavy traffic (individual
messages spanning pages) and for short runs (avoiding loss of
last-gasp messages).
- Added MTAG macro on several internal memory allocation routines
to improve leak warnings. Corrected a bunch of leaks.
- "stap -t" now reports module initialization timings too.
- Ported runtime for GCC14 compatibility, with its more recent C
dialect warnings.
- Support for DW_OP_bra in DWARF location lists, which makes a few
more $context variables accessible to systemtap.
* SystemTap tapset changes
- Portability fixes for more recent kernels, as always.
- set_kernel_string* tapset functions improved range checking.
- print_ubacktrace_fileline() works with PIE binaries.
- Many portability improvements and some fixes in the testsuite.
- Enhancements for the tcp, nfs, memory tapsets.
Drop following patches (upstream):
- bpf-translate.cxx-fix-build-against-upcoming-gcc14.patch
- get-shm_flag-defines-from-the-appropriate-include-file-for-linux-6.8-kernel.patch
- pr31288-build-with-gcc14-cont.patch
- pr31288-build-with-gcc14.patch
- pr31373-deal-with-the-removal-of-strlcpy-from-linux-6.8.patch
- staprun-fix-build-against-upcoming-gcc14.patch
- stapvirt.c-more-gcc-14-werror-calloc-transposed-args-compatibility.patch
-------------------------------------------------------------------
Tue Apr 2 17:32:02 UTC 2024 - Tony Jones <tonyj@suse.com>

View File

@ -20,7 +20,7 @@
%define _rundir %{_localstatedir}/run
%endif
Name: systemtap
Version: 5.0
Version: 5.1
Release: 0
Summary: Instrumentation System
License: GPL-2.0-or-later
@ -33,13 +33,6 @@ Source3: README-BEFORE-ADDING-PATCHES
Source4: README-KEYRING
Source5: stap-server.conf
Patch1: systemtap-build-source-dir.patch
Patch2: staprun-fix-build-against-upcoming-gcc14.patch
Patch3: bpf-translate.cxx-fix-build-against-upcoming-gcc14.patch
Patch4: stapvirt.c-more-gcc-14-werror-calloc-transposed-args-compatibility.patch
Patch5: pr31288-build-with-gcc14.patch
Patch6: pr31288-build-with-gcc14-cont.patch
Patch7: get-shm_flag-defines-from-the-appropriate-include-file-for-linux-6.8-kernel.patch
Patch8: pr31373-deal-with-the-removal-of-strlcpy-from-linux-6.8.patch
BuildRequires: autoconf >= 2.71
BuildRequires: automake