diff --git a/.gitignore b/.gitignore index e64fe0a..0d59b35 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ /systemtap-5.1~pre17060399gb6abf4bd.tar.gz /systemtap-5.1~pre17062114g2604d135.tar.gz /systemtap-5.1~pre17062192g5fd8daba.tar.gz +/systemtap-5.1.tar.gz diff --git a/RHEL-16549.patch b/RHEL-16549.patch deleted file mode 100644 index 4469759..0000000 --- a/RHEL-16549.patch +++ /dev/null @@ -1,59 +0,0 @@ -commit 0fef0bd60ff4b359a32da52262855dfe82fe51ae -gpg: Signature made Tue 14 Nov 2023 03:20:12 PM EST -gpg: using RSA key 4B35DCD2EA45C4E0783135BC8094BE9C9F4696A1 -gpg: Can't check signature: No public key -Author: Yichun Zhang (agentzh) -Date: Fri Nov 10 21:51:56 2023 -0800 - - PR31051: memory and uprobe leaks in early uprobe registraton code when errors happen - -diff --git a/runtime/linux/uprobes-inode.c b/runtime/linux/uprobes-inode.c -index 997f4528d..289cce00b 100644 ---- a/runtime/linux/uprobes-inode.c -+++ b/runtime/linux/uprobes-inode.c -@@ -529,6 +529,16 @@ stapiu_init(struct stapiu_consumer *consumers, size_t nconsumers) - } - - if (unlikely(ret != 0)) { -+ for ( ;; ) { -+ struct stapiu_consumer *c = &consumers[i]; -+ // protect against conceivable stapiu_refresh() at same time -+ mutex_lock(& c->consumer_lock); -+ stapiu_consumer_unreg(c); -+ mutex_unlock(& c->consumer_lock); -+ if (i == 0) -+ break; -+ i--; -+ } - return ret; - } - -@@ -545,7 +555,27 @@ stapiu_init(struct stapiu_consumer *consumers, size_t nconsumers) - break; - } - } -- return ret; -+ -+ if (unlikely(ret != 0)) { -+ int j; -+ for (j = 0; j < nconsumers; ++j) { -+ struct stapiu_consumer *c = &consumers[j]; -+ // protect against conceivable stapiu_refresh() at same time -+ mutex_lock(& c->consumer_lock); -+ stapiu_consumer_unreg(c); -+ mutex_unlock(& c->consumer_lock); -+ } -+ for ( ;; ) { -+ struct stapiu_consumer *c = &consumers[i]; -+ stap_cleanup_task_finder_target(&c->finder); -+ if (i == 0) -+ break; -+ i--; -+ } -+ return ret; -+ } -+ -+ return 0; - } - - diff --git a/sources b/sources index 75bc5a4..b6cca60 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (systemtap-5.1~pre17062192g5fd8daba.tar.gz) = 423b09c001a2446d807be9fb8b66226545dddb15e7e57af01780966b17af5e2d8c16f44ce3f77d9a884c4e64a379604f9fb493b2a0f5e6ae50d65de19d9af992 +SHA512 (systemtap-5.1.tar.gz) = da0fe237d2124031a5786d1221dbb420d90da5497376715fd43a7a9f61a354a229c1128e67ce6becbc012aa3796dc5d337149e239e3c1def0651b179e5bf199f diff --git a/systemtap.spec b/systemtap.spec index d22819b..5e5f1d3 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -9,7 +9,8 @@ %ifarch ppc ppc64 %{sparc} %{mips} %{riscv} %{!?with_crash: %global with_crash 0} %else -%{!?with_crash: %global with_crash 1} +# rawhide crash-devel breakage rhbz2219728 +%{!?with_crash: %global with_crash 0} %endif %{!?with_rpm: %global with_rpm 1} %{!?elfutils_version: %global elfutils_version 0.179} @@ -92,7 +93,10 @@ \ g stapusr 156\ g stapsys 157\ -g stapdev 158 +g stapdev 158\ +g stapunpriv 159\ +u stapunpriv 159 "systemtap unprivileged user" /var/lib/stapunpriv /sbin/nologin\ +m stapunpriv stapunpriv %define _systemtap_server_preinstall \ # See systemd-sysusers(8) sysusers.d(5)\ @@ -117,7 +121,7 @@ m stapdev stapdev Name: systemtap # PRERELEASE -Version: 5.1~pre17062192g5fd8daba +Version: 5.1 Release: 1%{?release_override}%{?dist} # for version, see also configure.ac @@ -153,7 +157,7 @@ Release: 1%{?release_override}%{?dist} Summary: Programmable system-wide instrumentation system License: GPL-2.0-or-later URL: http://sourceware.org/systemtap/ -Source: %{name}-%{version}.tar.gz +Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz # Build* BuildRequires: make @@ -842,6 +846,9 @@ echo '%_systemtap_runtime_preinstall' | systemd-sysusers --replace=%{_sysusersdi getent group stapusr >/dev/null || groupadd -f -g 156 -r stapusr getent group stapsys >/dev/null || groupadd -f -g 157 -r stapsys getent group stapdev >/dev/null || groupadd -f -g 158 -r stapdev +getent passwd stapunpriv >/dev/null || \ + useradd -c "Systemtap Unprivileged User" -u 159 -g stapunpriv -d %{_localstatedir}/lib/stapunpriv -r -s /sbin/nologin stapunpriv 2>/dev/null || \ + useradd -c "Systemtap Unprivileged User" -g stapunpriv -d %{_localstatedir}/lib/stapunpriv -r -s /sbin/nologin stapunpriv %endif exit 0 @@ -1304,44 +1311,15 @@ exit 0 # PRERELEASE %changelog -* Thu Jan 25 2024 Frank Ch. Eigler - 5.1-17062192g5fd8daba -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Jan 25 2024 Frank Ch. Eigler - 5.1-17062114g2604d135 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Tue Jan 23 2024 Frank Ch. Eigler - 5.1-17060399gb6abf4bd -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Mon Jan 22 2024 Frank Ch. Eigler - 5.1-17059382g67086c54 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Jan 18 2024 Frank Ch. Eigler - 5.1-17056139g6c0b92b3 -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Jan 18 2024 Frank Ch. Eigler - 5.1-17056120g2ccc0c4c -- Automated weekly rawhide release -- Applied spec changes from upstream git - -* Thu Jan 18 2024 Jonathan Wakely - 5.0-4 -- Rebuilt for Boost 1.83 - -* Tue Nov 14 2023 Frank Ch. Eigler - 5.0-3 -- RHEL-16549 - -* Mon Nov 06 2023 Frank Ch. Eigler - 5.0-2 -- License header tweak +* Fri Apr 26 2024 Frank Ch. Eigler - 5.1-1 +- Upstream release, see wiki page below for detailed notes. + https://sourceware.org/systemtap/wiki/SystemTapReleases * Sat Nov 04 2023 Frank Ch. Eigler - 5.0-1 - Upstream release, see wiki page below for detailed notes. https://sourceware.org/systemtap/wiki/SystemTapReleases - migrated to SPDX license - + * Fri Apr 28 2023 Frank Ch. Eigler - 4.9-1 - Upstream release, see wiki page below for detailed notes. https://sourceware.org/systemtap/wiki/SystemTapReleases