diff --git a/SOURCES/ARM32.patch b/SOURCES/ARM32.patch deleted file mode 100644 index 737aec6..0000000 --- a/SOURCES/ARM32.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- crash-trace-command-2.0/Makefile.orig -+++ crash-trace-command-2.0/Makefile -@@ -30,6 +30,10 @@ ifeq ($(shell arch), aarch64) - TARGET=ARM64 - TARGET_CFLAGS= - endif -+ifeq ($(shell arch), armv7l) -+ TARGET=ARM32 -+ TARGET_CFLAGS= -+endif - - INCDIR=/usr/include/crash - diff --git a/SOURCES/ftrace_event_call_rh_data.patch b/SOURCES/ftrace_event_call_rh_data.patch new file mode 100644 index 0000000..4c38597 --- /dev/null +++ b/SOURCES/ftrace_event_call_rh_data.patch @@ -0,0 +1,43 @@ + +Fix the extension trace.so for RHEL7.6, which moved +ftrace_event_call.data into an anonymous union, and the +previous offset has changed, so the trace.so extension +module fails to load, indicating "no commands registered: +shared object unloaded". + +--- crash-trace-command-2.0/trace.c.orig ++++ crash-trace-command-2.0/trace.c +@@ -853,8 +853,18 @@ static int syscall_get_enter_fields(ulon + inited = 1; + data_offset = MAX(MEMBER_OFFSET("ftrace_event_call", "data"), + MEMBER_OFFSET("trace_event_call", "data")); +- if (data_offset < 0) +- return -1; ++ if (data_offset < 0) { ++ /* ++ * rhel-7.6 moved the .data member into an anonymous union. ++ */ ++ if (MEMBER_EXISTS("ftrace_event_call", "rh_data") && ++ MEMBER_EXISTS("ftrace_event_data", "data")) { ++ data_offset = MEMBER_OFFSET("ftrace_event_call", "rh_data") + ++ MEMBER_OFFSET("ftrace_event_data", "data"); ++ inited = 2; ++ } else ++ return -1; ++ } + + enter_fields_offset = MEMBER_OFFSET("syscall_metadata", "enter_fields"); + if (enter_fields_offset < 0) +@@ -868,6 +878,12 @@ work: + "read ftrace_event_call data", RETURN_ON_ERROR)) + return -1; + ++ if (inited == 2) { ++ if (!readmem(metadata, KVADDR, &metadata, sizeof(metadata), ++ "read ftrace_event_call data (indirect rh_data)", RETURN_ON_ERROR)) ++ return -1; ++ } ++ + *fields = metadata + enter_fields_offset; + return 0; + } diff --git a/SPECS/crash-trace-command.spec b/SPECS/crash-trace-command.spec index 88025bb..ea53a24 100644 --- a/SPECS/crash-trace-command.spec +++ b/SPECS/crash-trace-command.spec @@ -4,15 +4,15 @@ Summary: Trace extension module for the crash utility Name: crash-trace-command Version: 2.0 -Release: 15%{?dist} +Release: 17%{?dist} License: GPLv2 Group: Development/Debuggers -Source: %{name}-%{version}.tar.gz -URL: http://people.redhat.com/anderson/extensions/%{name}-%{version}.tar.gz +Source: https://github.com/crash-utility/crash-extensions/blob/master/%{name}-%{version}.tar.gz +URL: https://crash-utility.github.io/extensions.html # Vendor: Fujitsu Limited # Packager: Qiao Nuohan ExclusiveOS: Linux -ExclusiveArch: x86_64 %{ix86} ppc64 ia64 s390 s390x aarch64 %{arm} ppc64le +ExclusiveArch: x86_64 %{ix86} ppc64 ia64 s390 s390x aarch64 ppc64le Buildroot: %{_tmppath}/%{name}-root BuildRequires: zlib-devel lzo-devel snappy-devel BuildRequires: crash-devel >= 7.2.0-2 @@ -30,8 +30,7 @@ Patch8: TRACE_EVENT_FL_TRACEPOINT_flag.patch Patch9: big_endian_nr_pages.patch Patch10: ppc64_ring_buffer_read.patch Patch11: rhel8_build.patch - -Patch1001: ARM32.patch +Patch12: ftrace_event_call_rh_data.patch %description Command for reading ftrace data from a dumpfile. @@ -50,8 +49,7 @@ Command for reading ftrace data from a dumpfile. %patch9 -p1 -b big_endian_nr_pages.patch %patch10 -p1 -b ppc64_ring_buffer_read.patch %patch11 -p1 -b rhel8_build.patch - -%patch1001 -p1 -b ARM32.patch +%patch12 -p1 -b ftrace_event_call_rh_data.patch %build make @@ -69,8 +67,13 @@ rm -rf %{buildroot} %doc COPYING %changelog -* Mon May 20 2019 Pablo Greco - 2.0-15 -- Fix for armhfp +* Mon Jul 27 2020 Bhupesh Sharma - 2.0-17 +- Chnage Source/URL to point to the latest github location + Resolves: rhbz#1851746 + +* Tue Apr 28 2019 Dave Anderson - 2.0-16 +- Fix for RHEL7 ftrace_event_call data structure change + Resolves: rhbz#1827734 * Wed Sep 19 2018 Dave Anderson - 2.0-15 - annocheck: link with -Wl,-z,now