Currently arm_uvtop() calls arm_lpae_vtop() with the LPAE and it can
use LPAE_VTOP() also for a user virtual address. Without this patch,
commands that use uvtop conversion such as "ps -a", "gcore" fail as
readmem() for a uvaddr returns a seek error:
crash> ps -a 357
...
ps: cannot access user stack address: bef2f97c
crash> gcore
gcore: seek error: physical address: 7ec56eab type: "fill_psinfo: pr_psargs"
Failed.
Fixes: https://github.com/crash-utility/crash-extensions/issues/2
Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
to read the per-cpu NT_PRSTATUS note contents if an invalid note is
encountered. Without the patch, if an invalid note is found, all
other notes were ignored, and subsequent "bt" attempts on the active
tasks would fail.
(chenqiwu@xiaomi.com, anderson@redhat.com)
the R7 register instead of FP for unwinding stacks using the DWARF
unwinder. On those kernels, without the patch, the "bt" command
only shows the task header.
(vincent.whitchurch@axis.com)
and contain percpu array_cache structures that were allocated with
vmalloc(). Without the patch, during session initialization there
will be error messages of the form: "crash: kmem_cache: <vaddr>:
invalid array_cache pointer: <vaddr>", and during runtime, the
"kmem -[sS]" commands will show kmem_cache lines that marked as
"[INVALID/CORRUPTED]".
(anderson@redhat.com)
which have offline cpus, and therefore will not contain associated
NT_PRSTATUS notes in the dumpfile header. Without the patch, if
there are any offline cpus, a segmentation violation is generated
during session initialization.
(anderson@redhat.com)
and compressed kdump clones. The patch utilizes the NT_PRSTATUS
notes in the dumpfile headers instead of reading them from the
kernel's "crash_notes", which are not initialized when QEMU generates
a dumpfile. Without the patch, these warning messages are displayed
during session initialization:
WARNING: invalid note (n_type != NT_PRSTATUS)
WARNING: cannot retrieve registers for active tasks
and running "bt" on an active task causes a segmentation violation.
(drjones@redhat.com)
Without the patch, if certain patterns of cpus are offline, the count
may be too small, causing cpu-dependent commands to not recognize
online cpus.
(Jan.Karlsson@sonymobile.com, anderson@redhat.com)
was not configured with CONFIG_IKCONFIG. Without the patch, the
initial system banner and the "sys" command show "UPTIME: (cannot
calculate: unknown HZ value)", the "ps -t" option shows "RUN TIME:
(cannot calculate: unknown HZ value)", and the "timer -r" option
kills the crash session with a floating point exception.
(hukeping@huawei.com)
an LPAE enabled kernel by first checking whether CONFIG_ARM_LPAE
exists in the vmcoreinfo data, and if it does not, by then checking
whether the next higher symbol above "swapper_pg_dir" is 0x5000 bytes
higher in value.
(sdu.liu@huawei.com)
the active tasks in the kernel's per-cpu crash_notes, there is an
initialization-time warning message indicating "could not retrieve
crash_notes". It has been changed to a more meaningful warning
message indicating "cannot retrieve registers for active tasks".
(anderson@redhat.com)
CONFIG_ARM_LPAE. The patch implements the virtual-to-physical
address translation of 64-bit PTEs used by ARM LPAE kernels.
(sdu.liu@huawei.com, weijitao@huawei.com)
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)