Commit Graph

17 Commits

Author SHA1 Message Date
Lianbo Jiang
8d49ad6662 Fix the failure of resolving ".rodata" on s390x
The commit <cd8954023bd4> broke crash-utility on s390x and got the
following error:

  crash: cannot resolve ".rodata"

The reason is that all symbols containing a "." may be filtered out
on s390x. To prevent the current failure, do not filter out the
symbol ".rodata" on s390x.

In addition, a simple way is to check whether the symbol ".rodata"
exists before calculating the value of a symbol, just to be on the
safe side.

Fixes: cd8954023b ("kernel: fix start-up time degradation caused by strings command")
Reported-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
2022-03-29 16:41:00 +08:00
Dave Anderson
c6b1971549 Rework the previous patch for support of S390X standalone dumpfiles
and LKCD dumpfiles that were taken from S390X KASLR kernels to avoid
calling an s390x-specific function from generic code.
(zaslonko@linux.ibm.com)
2020-01-17 13:34:53 -05:00
Dave Anderson
6e033fe099 Fix for support of S390X standalone dumpfiles and LKCD dumpfiles that
were taken from S390X KASLR kernels.
(zaslonko@linux.ibm.com)
2020-01-16 11:46:10 -05:00
Dave Anderson
6664cb3f4e If an S390X kernel crashes before vmcoreinfo initialization, there is
no way to extract the KASLR offset for such early dumps.  In a new
S390X kernel patch, the KASLR offset will be stored in the lowcore
memory during early boot and then overwritten after vmcoreinfo is
initialized.  This patch allows crash to identify the KASLR offset
that is stored in the lowcore memory.
(zaslonko@linux.ibm.com)
2019-11-26 12:18:02 -05:00
Dave Anderson
5171ef5a7e Similar to ARM64, the X86_64, PPC64 and S390x architectures will use
the exported value of MAX_PHYSMEM_BITS from the vmcoreinfo data as
the preferred method if it is available.
(anderson@redhat.com)
2019-11-22 13:39:40 -05:00
Dave Anderson
6504149678 Fix for an s390x session initialization-time warning that indicates
"WARNING: cannot determine MAX_PHYSMEM_BITS" on Linux 4.15 and later
kernels containing commit 83e3c48729d9ebb7af5a31a504f3fd6aff0348c4,
which changed the data type of "mem_section" from an array to a
pointer.  Without the patch, the s390x manner of determining
MAX_PHYSMEM_BITS fails because it presumes that "mem_section" is
an array, and as a result, displays the warning message.
(anderson@redhat.com)
2018-04-24 11:52:17 -04:00
Dave Anderson
cba615e62a Further enhancement to the S390X "vtop" command to translate the
binary values of the hardware flags for region, segment and page
table entries.  For example:

  crash> vtop -u 0x60000000000000
  VIRTUAL           PHYSICAL
  60000000000000    5b50a000

  PAGE DIRECTORY: 000000005cea0000
   RFTE: 000000005cea0018 => 000000006612400f (flags = 00f)
         flags in binary : P=0; TF=00; I=0; TT=11; TL=11
   RSTE: 0000000066124000 => 000000005d91800b (flags = 00b)
         flags in binary : P=0; TF=00; I=0; TT=10; TL=11
   RTTE: 000000005d918000 => 000000006615c007 (flags = 007)
         flags in binary : FC=0; P=0; TF=00; I=0; CR=0; TT=01; TL=11
    STE: 000000006615c000 => 000000005ce48800 (flags = 800)
         flags in binary : FC=0; P=0; I=0; CS=0; TT=00
    PTE: 000000005ce48800 => 000000005b50a03f (flags = 03f)
         flags in binary : I=0; P=0
   PAGE: 000000005b50a000

or for large pages:

  crash> vtop -k 0x3d100000000
  VIRTUAL           PHYSICAL
  3d100000000       77c00000

  PAGE DIRECTORY: 0000000001210000
   RTTE: 0000000001213d10 => 0000000077dc4007 (flags = 007)
         flags in binary : FC=0; P=0; TF=00; I=0; CR=0; TT=01; TL=11
    STE: 0000000077dc4000 => 0000000077c03403 (flags = 03403)
         flags in binary : AV=0, ACC=0011; F=0; FC=1; P=0; I=0; CS=0; TT=00

(zaslonko@linux.vnet.ibm.com)
2017-08-15 15:57:17 -04:00
Dave Anderson
51cda8344f Enhancement to the S390X "vtop" command to display page table walk
information, adding output showing the following page table contents:

   "Region-First-Table Entry" (RFTE)
   "Region-Second-Table Entry" (RSTE)
   "Region-Third-Table Entry" (RTTE)
   "Segment Table Entry" (STE)
   "Page Table Entry" (PTE)
   "Read address of page" (PAGE)

Depending on the size of the address space, the page tables can start
at different levels.  For example:

  crash> vtop 3ff8000c000
  VIRTUAL           PHYSICAL
  3ff8000c000       2e3832000

  PAGE DIRECTORY: 0000000000aaa000
   RTTE: 0000000000aadff8 => 00000002e3c00007
    STE: 00000002e3c00000 => 00000002e3df7000
    PTE: 00000002e3df7060 => 00000002e383203d
   PAGE: 00000002e3832000

        PAGE      PHYSICAL     MAPPING      INDEX CNT FLAGS
  3d10b8e0c80    2e3832000               0       0  1 7fffc0000000000

(holzheu@linux.vnet.ibm.com)
2017-08-08 14:28:25 -04:00
Dave Anderson
c30fbd7a43 Fix for the validity check of S390X virtual addresses for 5-level
page tables where user space memory is mapped above 8 Petabytes.
Without the patch, "rd -u" fails and indicates "invalid user virtual
address", and "vtop -u" indicates that the address is "(not mapped)".
(zaslonko@linux.vnet.ibm.com)
2017-05-11 15:52:49 -04:00
Dave Anderson
13dc25c923 Fix for the s390x "bt" command for active tasks. Since commit
c9f932440b in this crash-7.1.7 release that added support for
the new CONFIG_THREAD_INFO_IN_TASK configuration, the backtrace of
active tasks can be incomplete.
(holzheu@linux.vnet.ibm.com)
2016-11-10 15:03:04 -05:00
Dave Anderson
cc5244d86b Fix for the S390X "dis" command to prevent jump target addresses
from being displayed as kernel system call alias/wrapper names, for
example, "SyS_read+<offset>" instead of "sys_read+<offset>".
(anderson@redhat.com)
2015-08-14 09:17:30 -04:00
Dave Anderson
cefda9be11 Fix for the S390X "bt" command when running against kernels that have
Linux 4.0 commit 2f859d0dad818765117c1cecb24b3bc7f4592074, which
removes the "async_stack" and "panic_stack" members from the "pcpu"
structure.  Without the patch, backtraces of active tasks that were
executing I/O or machine check interrupts are not displayed, while
other tasks may generate fatal readmem() errors of type "readmem_ul".
(holzheu@linux.vnet.ibm.com)
2015-06-09 10:10:52 -04:00
Dave Anderson
e30594ebea Implemented a new "bt -A" option for the S390X architecture, which
adds support for displaying the new s390x vector registers.  For
ELF dumps, the registers are taken from the VX ELF notes; for s390
dumps. the registers are taken from memory.  The option produces the
same output as the -a option, but also displays the vector registers
for all active tasks.
(holzheu@linux.vnet.ibm.com)
2014-12-17 16:35:28 -05:00
Dave Anderson
f15a48817f Support for "irq" and "irq -u" on the S390 and S390X architectures
if they are running Linux 3.12 and later kernels.  Older kernels
without GENERIC_HARDIRQ support will fail with the error message
"irq: cannot determine number of IRQs".
(sebott@linux.vnet.ibm.com)
2014-11-17 13:48:21 -05:00
Dave Anderson
df8d23ff21 Fix the CPU timer and clock comparator output for the "bt -a" command
on S390X machines.  The output of CPU timer and clock comparator has
always been incorrect because:
  - We added S390X_WORD_SIZE (8) instead of 4 to get the second word
  - We did not left shift the clock comparator by 8
The fix gets the complete 64 bit values and by shifting the clock
comparator correctly.
(holzheu@linux.vnet.ibm.com)
2014-09-12 15:13:25 -04:00
Dave Anderson
8bff022b52 Fix for Linux 3.11 and later ARM kernels, in which all non-panicking
cpus offline themselves during a kdump procedure.  This causes an
invalid cpu count determination during crash session initialization
from an ARM vmcore.  The patch utilizes the cpu count found in the
cpu_active_map if it is greater than the count in the cpu_online_map.
In addition, the maximum NR_CPUS value for the ARM architecture has
been raised from 4 to 32.
(sdu.liu@huawei.com)
2014-04-28 15:45:51 -04:00
Dave Anderson
03e3937ec7 Initial commit: crash-7.0.4 2014-01-28 16:46:11 -05:00