Commit Graph

22 Commits

Author SHA1 Message Date
Dave Anderson
4130b83c37 Extension of the "snap.so" extension module to pass a second
architecture-specific value in the ELF header; its initial use
is for support of the upcoming ARM64 52-bit kernel virtual
address space by passing both the VA_BITS and VA_BITS_ACTUAL
values.
(anderson@redhat.com)
2019-04-04 14:43:17 -04:00
Dave Anderson
26488e918f Fixes for the "trace.so" extension module:
(1) The reader_page can be empty if it was never read, do not record
    it if it is empty. Better yet, do not record any page that is
    empty.  The struct buffer_page "real_end" is not available in
    older kernels, so it needs to be tested if it exists before we
    can use it.
(2) In newer kernels, the sp->type of kernel module symbols does not
    contain the symbol type character unless the module's debuginfo
    data has been loaded into the crash session.  Writing a garbage
    type to the kallsyms file for trace-cmd to read causes it to
    crash, so just always write an 'm'.
(3) Add the "trace dump -t <trace.dat>" option to the SYNOPSIS line
    of the help page.
(rostedt@goodmis.org)
2019-03-25 11:48:39 -04:00
Dave Anderson
f6d451d64f Fix for the "trace.c" extension module for RHEL7.6, which moved the
ftrace_event_call.data member into a new structure contained within
an anonymous union.  Without the patch, the module fails to load,
indicating "no commands registered: shared object unloaded".
(xuhuan.fnst@cn.fujitsu.com)
2018-08-20 10:43:05 -04:00
Dave Anderson
6777fe6126 Fix for the "snap.so" extension module to pass the value of the ARM64
"kimage_voffset" value in the ELF header.  Without the patch, it is
necessary to use the "--machdep kvimage_offset=<value>" command line
option, or the session fails with the message "crash: vmlinux and
vmcore do not match!".
(anderson@redhat.com)
2017-09-28 16:39:15 -04:00
Dave Anderson
8717902685 Fix for the "snap.so" extension module to pass the KASLR relocation
offset value in the dumpfile header for kernels that are compiled
with CONFIG_RANDOMIZE_BASE.  Without the patch, it is necessary to
use the "--kaslr=<offset>" command line option, or the session
fails with the message "WARNING: cannot read linux_banner string",
followed by "crash: vmlinux and vmcore do not match!".
(anderson@redhat.com)
2017-05-01 15:14:36 -04:00
Dave Anderson
78330fc5fb Fix for the extensions/trace.c extension module when running on
the ppc64 architecture.  Without the patch, the trace.so extension
module fails to load, indicating "extend: invalid text address:
ring_buffer_read".  On the ppc64 architecture, the text symbol
is ".ring_buffer_read".
(anderson@redhat.com)
2017-04-15 13:54:20 -04:00
Dave Anderson
58fff92459 Fix for the extensions/trace.c extension module to account for
Linux 4.7 kernel commit 9b94a8fba501f38368aef6ac1b30e7335252a220,
which changed the ring_buffer_per_cpu.nr_pages member from an int
to a long.  Without the patch, the trace.so extension module fails
to load on big-endian machines, indicating "extend: Num of pages
is less than 0".
(feij.fnst@cn.fujitsu.com)
2017-04-15 13:45:13 -04:00
Dave Anderson
9c49844316 Fix for the "trace.c" extension module. The kernel buffer referenced
by "max_tr_ring_buffer" is not available in all configurations of the
kernel so the unitialized max_tr_ring_buffer variable should not be
used.  A similar check existed previously before the recent rework of
the trace extension module to support multiple buffers.
(rabinv@axix.com)
2017-02-07 10:42:46 -05:00
Dave Anderson
109dc55f16 Since the Linux 3.10 release, the kernel has offered the ability to
create multiple independent ftrace buffers.  At present, however,
the "trace.c" extension module is only able to extract the primary
buffer.  This patch refactors the trace.c extension module so that
the global instance is passed around as a parameter rather than
accessing it directly, and then locates all of the available
instances and extracts the data from each of them.
(kyle.a.tomsic@gmail.com)
2016-11-09 11:01:03 -05:00
Dave Anderson
6997fbec4a Fix for the "trace.so" extension module to properly recognize Linux
3.15 and later kernels.  In crash-7.1.6, the MEMBER_OFFSET() macro
has been improved so that it is able to recognize members of embedded
anonymous structures.  However, the module's manner of recognizing
Linux 3.15 and later kernels depended upon MEMBER_OFFSET() failing
to handle anonymous members, and therefore the improvement prevented
the module from successfully loading.
(rabinv@axis.com)
2016-09-29 10:25:53 -04:00
Dave Anderson
6341fe52dd Fix for the extensions/trace.c extension module to account for the
Linux 4.7 kernel commit dcb0b5575d24 that changed the bit index for
the TRACE_EVENT_FL_TRACEPOINT flag.  Without the patch, the "extend"
command fails to load the trace.so module, with the error message
"extend: /path/to/crash/extensions/trace.so: no commands registered:
shared object unloaded".  The patch reads the flag's enum value
dynamically instead of using a hard-coded value.
(namhyung@gmail.com)
2016-07-13 14:29:28 -04:00
Dave Anderson
c667f595db Fix for the extensions/trace.c extension module for Linux 4.2 and
later kernels.  Without the patch, the module fails to load, with
the message "failed to init the offset, struct:ftrace_event_call,
member:list".
(anderson@redhat.com)
2015-09-24 11:41:37 -04:00
Dave Anderson
9f809b8e2c Fix for the extensions/trace.c extension module to account for
kernels that are not configured with CONFIG_TRACE_MAX_TRACER.
Without the patch, the module fails to load with the error message
"failed to init the offset, struct: trace_array, member: max_offset".
(rabinv@axis.com)
2015-08-03 14:14:23 -04:00
Dave Anderson
a8921b155f Update the extensions/eppic.mk file to clone the eppic source code
from https://github.com/lucchouina/eppic.git.
(lucchouina@gmail.com)
2015-07-09 10:45:18 -04:00
Dave Anderson
203853b71e Fix compiler warning generated by extensions/trace.c when compiled
with gcc version 5.  Without the patch, the message "warning: the
use of 'mktemp' is dangerous, better use 'mkstemp'" is generated.
(anderson@redhat.com)
2015-07-08 09:14:18 -04:00
Dave Anderson
9a3cef8342 Force the 32-bit MIPS extensions/eppic.so to be compiled with -m32.
This is required when "make extensions" is executed after the top
level crash binary has been built with "make TARGET=MIPS" on an
x86_64 host.
(rabinv@axis.com)
2015-07-06 09:29:17 -04:00
Dave Anderson
86e55bf87b Remove the leftover ".constructor" build file in the extensions
subdirectory when "make extensions" is complete, and update the
top-level .gitignore file to ignore post-build extensions
subdirectory files.
(anderson@redhat.com)
2015-05-18 11:00:31 -04:00
Dave Anderson
407ce33ed0 Build extension modules that utilize the generic extensions/Makefile
with -g.  In addition, build the snap.c extension module with -g.
(rabinv@axis.com)
2015-04-24 10:42:54 -04:00
Dave Anderson
28a2bd99a9 Update the extensions/trace.c extension module to account for the
movement of the ftrace_event_call.name member into an anonymous
union in Linux 3.15, commit de7b2973903c6cc50b31ee5682a69b2219b9919d.
(rabin@rab.in)
2015-02-05 09:35:45 -05:00
Dave Anderson
c6afa51af3 Update the "extensions/snap.mk" file to allow the "snap.so" extension
module to be built outside of a crash source tree on a ppc64le PPC64
little-endian host.  Without the patch, "make -f snap.mk" would fail
to compile, indicating "gcc: error: macro name missing after '-D'"
(anderson@redhat.com)
2014-09-22 14:09:43 -04:00
Dave Anderson
3d23f36a56 Added support for the ARM64 architecture in the extensions/snap.c
extension module.  Also fixed the progress percentage display to
correct for systems which have non-zero starting physical addresses.
(anderson@redhat.com)
2014-04-04 15:22:43 -04:00
Dave Anderson
03e3937ec7 Initial commit: crash-7.0.4 2014-01-28 16:46:11 -05:00