diff --git a/rhbz2223733.patch b/rhbz2223733.patch new file mode 100644 index 0000000..81255ed --- /dev/null +++ b/rhbz2223733.patch @@ -0,0 +1,24 @@ +commit ead30c04c7157fec194c0f6d81e5c51c99bf25cf +gpg: Signature made Wed 24 May 2023 10:23:54 AM EDT +gpg: using RSA key 5D38116FA4D3A7CC77E378D37E83610126DCC2E8 +gpg: Good signature from "Frank Ch. Eigler " [full] +Author: Frank Ch. Eigler +Date: Wed May 24 10:22:08 2023 -0400 + + PR30484: stap-report: scrape less of /sys /proc + + Mainly: avoid process/busy parts like /proc/$pid. + +diff --git a/stap-report b/stap-report +index 217ddf840..3b3a1a258 100755 +--- a/stap-report ++++ b/stap-report +@@ -105,7 +105,7 @@ elif [ -f /var/log/packages ]; then + run "cat /var/log/packages | egrep 'systemtap|elfutils|kernel|gcc|dyninst|java|byteman|avahi|nss|nspr|dejagnu' | sort -k9" + fi + run "egrep 'PROBE|RANDOMIZE|RELOC|TRACE|MARKER|KALLSYM|_DEBUG_|LOCKDEP|LOCKING|MODULE|FENTRY|_SIG|BPF' /lib/modules/`uname -r`/build/.config | grep -v not.set | sort | fmt -w 80" +-run "find /debugfs /proc /sys /dev /sys/kernel/debug -type f -path '*kprobe*' -o -path '*yama*' 2>/dev/null | xargs grep -H ." ++run "find /debugfs /proc/sys /sys/kernel /dev -type f -path '*kprobe*' -o -path '*yama*' 2>/dev/null | xargs grep -H ." + run "lsmod" + run "avahi-browse -r -t _stap._tcp" + run "ifconfig -a" diff --git a/rhbz2223735.patch b/rhbz2223735.patch new file mode 100644 index 0000000..2f21386 --- /dev/null +++ b/rhbz2223735.patch @@ -0,0 +1,64 @@ +commit ab0c5c25509600b7c9cecc9e10baebc984082b50 +gpg: Signature made Fri 12 May 2023 11:18:18 AM EDT +gpg: using RSA key 5D38116FA4D3A7CC77E378D37E83610126DCC2E8 +gpg: Good signature from "Frank Ch. Eigler " [full] +Author: Frank Ch. Eigler +Date: Fri May 12 11:13:45 2023 -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. + +diff --git a/tapsets.cxx b/tapsets.cxx +index 859160bc5..7b7107371 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -2453,8 +2453,9 @@ query_cu (Dwarf_Die * cudie, dwarf_query * q) + } + catch (const semantic_error& e) + { +- q->sess.print_error (e); +- return DWARF_CB_ABORT; ++ // q->sess.print_error (e); ++ throw; ++ // return DWARF_CB_ABORT; + } + } + +@@ -2696,8 +2697,9 @@ query_module (Dwfl_Module *mod, + } + catch (const semantic_error& e) + { +- q->sess.print_error (e); +- return DWARF_CB_ABORT; ++ // q->sess.print_error (e); ++ // return DWARF_CB_ABORT; ++ throw; + } + } + +diff --git a/testsuite/semok/stmtbad.stp b/testsuite/semok/stmtbad.stp +new file mode 100755 +index 000000000..06780790a +--- /dev/null ++++ b/testsuite/semok/stmtbad.stp +@@ -0,0 +1,7 @@ ++#! /bin/sh ++ ++exec stap -v -p2 -e 'probe oneshot {log("nothing") } ++ probe process.statement("main@*:1")? { log("yo") }' -c stap ++ ++# The optional misaddressed statement probe should let stap still ++# succeed with the oneshot probe. diff --git a/systemtap.spec b/systemtap.spec index 56c6d19..717c8b0 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -123,7 +123,7 @@ m stapdev stapdev Name: systemtap # PRERELEASE Version: 4.9 -Release: 1%{?release_override}%{?dist} +Release: 2%{?release_override}%{?dist} # for version, see also configure.ac @@ -160,6 +160,10 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz +Patch1: rhbz2223733.patch +Patch2: rhbz2223735.patch + + # Build* BuildRequires: make BuildRequires: gcc-c++ @@ -588,6 +592,8 @@ or within a container. %prep %setup -q +%patch -P1 -p1 +%patch -P2 -p1 %build @@ -1307,6 +1313,10 @@ exit 0 # PRERELEASE %changelog +* Tue Jul 18 2023 Frank Ch. Eigler - 4.9-2 +- rhbz2223733 +- rhbz2223735 + * 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