Re: [PATCHv3] crash-utility/arm64: store phy_offset and memstart_addr separately

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 4/7/21 5:16 PM, Pingfan Liu wrote:
Crash encounters a bug like the following:
     ...
     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
     This is free software: you are free to change and redistribute it.
     There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
     and "show warranty" for details.
     This GDB was configured as "aarch64-unknown-linux-gnu"...

     crash: read error: kernel virtual address: ffff000f789c0050  type: "IRQ stack pointer"
     crash: read error: kernel virtual address: ffff000f78a60050  type: "IRQ stack pointer"
     crash: read error: kernel virtual address: ffff000f78b00050  type: "IRQ stack pointer"
     ...

This bug connects with kernel commit 7bc1a0f9e176 ("arm64: mm: use
single quantity to represent the PA to VA translation"), memstart_addr
can be negative, which makes it different from real phys_offset.

In crash utility, PTOV() needs memstart_addr to calculate VA from PA,
while getting PFN offset in a dumpfile, phys_offset is required.

To serve the different purpose, using phys_offset_nominal and
phys_offset to store them.

Signed-off-by: Pingfan Liu <piliu@xxxxxxxxxx>
Cc: HAGIO KAZUHITO <k-hagio-ab@xxxxxxx>
Cc: Lianbo Jiang <lijiang@xxxxxxxxxx>
Cc: Bhupesh Sharma <bhupesh.sharma@xxxxxxxxxx>
Cc: Mark Salter <msalter@xxxxxxxxxx>
Cc: Mark Langsdorf <mlangsdo@xxxxxxxxxx>
Cc: Jeremy Linton <jlinton@xxxxxxxxxx>
To: crash-utility@xxxxxxxxxx
---
v2 -> v3:
   rename ms->memstart_addr as ms->phys_offset_nominal ( I keep the name
as phys_offset* since it is in accordance with other platform
conventions)
---
  arm64.c | 25 ++++++++++++++++++++++---
  defs.h  |  3 +++
  2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/arm64.c b/arm64.c
index 37aed07..5e567ca 100644
--- a/arm64.c
+++ b/arm64.c
@@ -24,6 +24,9 @@
#define NOT_IMPLEMENTED(X) error((X), "%s: function not implemented\n", __func__) +#define MEMSTART_ADDR_OFFSET \
+	(0xffffffffffffffff << 48 - 0xffffffffffffffff << 56)
+
For this macro, it is ideal to use the kernel macro " #define _PAGE_OFFSET(va) (-(UL(1) << (va)))". But it will introduce a series of files in kernel.

To Bhupesh:
Can it be deferred to be done until more users occur?

Thanks,
Pingfan

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux