diff --git a/.gitignore b/.gitignore index 6ba9fd6..adcfb77 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/systemtap-4.2.tar.gz +SOURCES/systemtap-4.3.tar.gz diff --git a/.systemtap.metadata b/.systemtap.metadata index e0f0963..8c485f1 100644 --- a/.systemtap.metadata +++ b/.systemtap.metadata @@ -1 +1 @@ -efdb0d6e09ebdfa2acbfdb725542885db2195bb6 SOURCES/systemtap-4.2.tar.gz +14769266f6591b85895a5f40e516f8228e83476e SOURCES/systemtap-4.3.tar.gz diff --git a/SOURCES/rhbz1788648.patch b/SOURCES/rhbz1788648.patch deleted file mode 100644 index 6b532af..0000000 --- a/SOURCES/rhbz1788648.patch +++ /dev/null @@ -1,65 +0,0 @@ -commit ab4a060a82d0eb68189590ff3f48e8eb5617b6ae -Author: Frank Ch. Eigler -Date: Thu Jan 9 11:43:59 2020 -0500 - - RHBZ1788648: parse arm64 sys/sdt.h operand format [x?, x?] - - On arm64, the sys/sdt.h operand [x0, x1] was observed, and not - handled. New code in - sdt_uprobe_var_expanding_visitor::try_parse_arg_register_pair - recognizes that and parses it indirectly via - sdt_uprobe_var_expanding_visitor::try_parse_arg_effective_addr . - -diff --git a/tapsets.cxx b/tapsets.cxx -index 68ec74b..aab7c83 100644 ---- a/tapsets.cxx -+++ b/tapsets.cxx -@@ -6949,17 +6949,30 @@ sdt_uprobe_var_expanding_visitor::try_parse_arg_register_pair (target_symbol *e, - const string& asmarg, - long precision) - { -+ - // BZ1613157: for powerpc, accept "R,R", as an alias of "(Ra,Rb)" -- if (sess.architecture.substr(0,7) != "powerpc") -- return NULL; -- -- // test for BASE_REGISTER,INDEX_REGISTER -- string regexp = "^(" + regnames + "),(" + regnames + ")$"; -- vector matches; -- if (!regexp_match(asmarg, regexp, matches)) -+ if (sess.architecture.substr(0,7) == "powerpc") -+ { -+ // test for BASE_REGISTER,INDEX_REGISTER -+ string regexp = "^(" + regnames + "),(" + regnames + ")$"; -+ vector matches; -+ if (!regexp_match(asmarg, regexp, matches)) -+ { -+ // delegate to parenthetic syntax -+ return try_parse_arg_effective_addr (e, string("(")+asmarg+string(")"), precision); -+ } -+ } -+ else if (elf_machine == EM_AARCH64) // BZ1788648 - { -- // delegate to parenthetic syntax -- return try_parse_arg_effective_addr (e, string("(")+asmarg+string(")"), precision); -+ // test for [BASE_REGISTER, INDEX_REGISTER] -+ string regexp = "^\\[(" + regnames + "), (" + regnames + ")\\]$"; -+ vector matches; -+ if (!regexp_match(asmarg, regexp, matches)) -+ { -+ // delegate to parenthetic syntax -+ string regnames = asmarg.substr(1, asmarg.length()-2); // trim the [] -+ return try_parse_arg_effective_addr (e, string("(")+regnames+string(")"), precision); // add the () -+ } - } - - return NULL; -@@ -6975,7 +6988,7 @@ sdt_uprobe_var_expanding_visitor::try_parse_arg_effective_addr (target_symbol *e - // test for OFFSET(BASE_REGISTER,INDEX_REGISTER[,SCALE]) where OFFSET is +-N+-N+-N - // NB: Despite PR11821, we can use regnames here, since the parentheses - // make things unambiguous. (Note: gdb/stap-probe.c also parses this) -- string regexp = "^([+-]?[0-9]*)([+-][0-9]*)?([+-][0-9]*)?[(](" + regnames + "),(" + -+ string regexp = "^([+-]?[0-9]*)([+-][0-9]*)?([+-][0-9]*)?[(](" + regnames + "),[ ]?(" + - regnames + ")(,[1248])?[)]$"; - vector matches; - if (!regexp_match(asmarg, regexp, matches)) diff --git a/SOURCES/rhbz1788662.patch b/SOURCES/rhbz1788662.patch deleted file mode 100644 index 66162c6..0000000 --- a/SOURCES/rhbz1788662.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 2699450dde9af4cc609bdeca2b346a014840f0f0 -Author: Frank Ch. Eigler -Date: Thu Jan 23 13:35:30 2020 -0500 - - RHBZ1788662: check rcu_is_watching() before probe entry - - Some tracepoints are problematic because they are called from an idle - context, where RCU/lockdep is not legal to call. On lockdep kernels, - RCU warnings and even possibly-related panics have been reported. - - Kernel tracepoint handlers protect themselves by wrapping their - innards in rcu_irq_enter/rcu_irq_exit(), which flips the legality flag - back on (even during idle), but these functions are not - module-exported, and it's not clear they'd be sufficient anyway. So - we call the module-export'd rcu_is_watching() in - _stp_runtime_get_context() to reject any attempt to start a probe in - such an idling-cpu context. This covers the cpu_idle tracepoint as - well as others. - -diff --git a/runtime/linux/runtime_context.h b/runtime/linux/runtime_context.h -index 48894a6..db38bfc 100644 ---- a/runtime/linux/runtime_context.h -+++ b/runtime/linux/runtime_context.h -@@ -73,6 +73,8 @@ static void _stp_runtime_contexts_free(void) - - static inline struct context * _stp_runtime_get_context(void) - { -+ if (! rcu_is_watching()) // rcu operations are rejected in idle-cpu contexts -+ return 0; // in effect: skip probe - return rcu_dereference_sched(contexts[smp_processor_id()]); - } - diff --git a/SOURCES/rhbz1795196.patch b/SOURCES/rhbz1795196.patch deleted file mode 100644 index 7b63aa2..0000000 --- a/SOURCES/rhbz1795196.patch +++ /dev/null @@ -1,69 +0,0 @@ -commit 6053cecf4a4ffd19d1ac0a3bb3ffef100ab83fda -Author: Frank Ch. Eigler -Date: Tue Jan 28 15:48:42 2020 -0500 - - RHBZ1795196: tolerate partial elf + missing dwarf vmlinuz for -d kernel - - Previous code in dump_symbol_tables() couldn't tolerate the case where - new elfutils opened /boot/vmlinuz* as an elf file for the kernel, and - could not extract a symbol table from that (nor an absent -debuginfo). - New code instead emits a warning and moves on. A special error code - triggers return to the dump_kallsyms() path that prior elfutils/stap - versions rely on. - -diff --git a/testsuite/systemtap.base/kallsyms.exp b/testsuite/systemtap.base/kallsyms.exp -index 8ee5242..13ca4ad 100644 ---- a/testsuite/systemtap.base/kallsyms.exp -+++ b/testsuite/systemtap.base/kallsyms.exp -@@ -5,7 +5,10 @@ if {![installtest_p]} {untested $test; return} - set script {"probe timer.profile {print_stack(backtrace()); exit()}"} - set passed 0 - -+# don't let stap find kernel debuginfo! - setenv SYSTEMTAP_DEBUGINFO_PATH $srcdir -+setenv DEBUGINFOD_URLS "" -+setenv DEBUGINFOD_CACHE_PATH "/dev/null" - - eval spawn stap --all-modules -e $script - expect { -diff --git a/translate.cxx b/translate.cxx -index f142667..9e30427 100644 ---- a/translate.cxx -+++ b/translate.cxx -@@ -6786,7 +6786,17 @@ dump_symbol_tables (Dwfl_Module *m, - dwfl_module_info (m, NULL, NULL, &end, NULL, NULL, NULL, NULL); - - int syments = dwfl_module_getsymtab(m); -- DWFL_ASSERT (_F("Getting symbol table for %s", modname), syments >= 0); -+ if (syments < 0) // RHBZ1795196: elfutils 0.178+ can open vmlinuz as elf.main but fail here -+ { -+ c->session.print_warning(_F("libdwfl failure getting symbol table for %s: %s", -+ modname, dwfl_errmsg(-1))); -+ return DWARF_CB_ABORT; -+ -+ // signal to dump_unwindsyms() to not let things proceed all the way to -+ // dump_unwindsym_cxt(), which then believes it has all the info for a -+ // complete record about this module. In the kernel's case, this allows -+ // PR17921 fallback to /proc/kallsyms via dump_kallsyms(). -+ } - - // Look up the relocation basis for symbols - int n = dwfl_module_relocations (m); -commit 3d571c2ab5797b41d07b51a7bbff626270d1e263 -Author: Craig Ringer -Date: Sun Dec 29 14:51:47 2019 -0500 - - PR25265: fix strict-prototypes nit autoconf-stack-trace-save-regs.c - -diff --git a/runtime/linux/autoconf-stack-trace-save-regs.c b/runtime/linux/autoconf-stack-trace-save-regs.c -index 8bf3339..1fd515f 100644 ---- a/runtime/linux/autoconf-stack-trace-save-regs.c -+++ b/runtime/linux/autoconf-stack-trace-save-regs.c -@@ -1,6 +1,6 @@ - #include - --unsigned int foo () -+unsigned int foo (void) - { - unsigned long e[10]; - struct pt_regs* r = 0; diff --git a/SPECS/systemtap.spec b/SPECS/systemtap.spec index 0cc668b..5c262d7 100644 --- a/SPECS/systemtap.spec +++ b/SPECS/systemtap.spec @@ -10,7 +10,6 @@ %{!?with_crash: %global with_crash 1} %endif %{!?with_rpm: %global with_rpm 1} -%{!?with_bundled_elfutils: %global with_bundled_elfutils 0} %{!?elfutils_version: %global elfutils_version 0.142} %{!?pie_supported: %global pie_supported 1} %{!?with_boost: %global with_boost 0} @@ -87,8 +86,8 @@ %define __brp_mangle_shebangs_exclude_from .stp$ Name: systemtap -Version: 4.2 -Release: 6%{?release_override}%{?dist} +Version: 4.3 +Release: 1%{?release_override}%{?dist} # for version, see also configure.ac @@ -124,10 +123,6 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz -Patch10: rhbz1788648.patch -Patch11: rhbz1788662.patch -Patch12: rhbz1795196.patch - # Build* BuildRequires: gcc-c++ BuildRequires: cpio @@ -158,14 +153,7 @@ BuildRequires: crash-devel zlib-devel %if %{with_rpm} BuildRequires: rpm-devel %endif -%if %{with_bundled_elfutils} -Source1: elfutils-%{elfutils_version}.tar.gz -Patch1: elfutils-portability.patch -BuildRequires: m4 -%global setup_elfutils -a1 -%else BuildRequires: elfutils-devel >= %{elfutils_version} -%endif %if %{with_docs} BuildRequires: /usr/bin/latex /usr/bin/dvips /usr/bin/ps2pdf %if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 @@ -518,39 +506,10 @@ systemtap-runtime-virthost machine to execute systemtap scripts. # ------------------------------------------------------------------------ %prep -%setup -q %{?setup_elfutils} - -%if %{with_bundled_elfutils} -cd elfutils-%{elfutils_version} -%patch1 -p1 -sleep 1 -find . \( -name Makefile.in -o -name aclocal.m4 \) -print | xargs touch -sleep 1 -find . \( -name configure -o -name config.h.in \) -print | xargs touch -cd .. -%endif - -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 +%setup -q %build -%if %{with_bundled_elfutils} -# Build our own copy of elfutils. -%global elfutils_config --with-elfutils=elfutils-%{elfutils_version} - -# We have to prevent the standard dependency generation from identifying -# our private elfutils libraries in our provides and requires. -%global _use_internal_dependency_generator 0 -%global filter_eulibs() /bin/sh -c "%{1} | sed '/libelf/d;/libdw/d;/libebl/d'" -%global __find_provides %{filter_eulibs /usr/lib/rpm/find-provides} -%global __find_requires %{filter_eulibs /usr/lib/rpm/find-requires} - -# This will be needed for running stap when not installed, for the test suite. -%global elfutils_mflags LD_LIBRARY_PATH=`pwd`/lib-elfutils -%endif - # Enable/disable the dyninst pure-userspace backend %if %{with_dyninst} %global dyninst_config --with-dyninst @@ -646,9 +605,10 @@ cd .. # We don't ship compileworthy python code, just oddball samples %global py_auto_byte_compile 0 -%configure %{?elfutils_config} %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} %{bpf_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" +%configure %{dyninst_config} %{sqlite_config} %{crash_config} %{docs_config} %{pie_config} %{rpm_config} %{java_config} %{virt_config} %{dracut_config} %{python3_config} %{python2_probes_config} %{python3_probes_config} %{httpd_config} %{bpf_config} --disable-silent-rules --with-extra-version="rpm %{version}-%{release}" make %{?_smp_mflags} + %install make DESTDIR=$RPM_BUILD_ROOT install %find_lang %{name} @@ -1094,10 +1054,6 @@ done %dir %{_libexecdir}/systemtap %{_libexecdir}/systemtap/libHelperSDT_*.so %endif -%if %{with_bundled_elfutils} -%dir %{_libdir}/systemtap -%{_libdir}/systemtap/lib*.so* -%endif %if %{with_emacsvim} %{_emacs_sitelispdir}/*.el* %{_emacs_sitestartdir}/systemtap-init.el @@ -1270,6 +1226,9 @@ done # PRERELEASE %changelog +* Thu Jun 11 2020 Stan Cox - 4.3-1 +- rhbz1804319: Upstream release. + * Tue Feb 11 2020 Frank Ch. Eigler - 4.2-6 - rhbz1795196 cont'd: autoconf fix for kernel change to stack_trace_save_regs