Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 038fdfe9 authored by Neeraj Upadhyay's avatar Neeraj Upadhyay
Browse files

arm64: process: Do not dump memory around register



The addresses stored in registers might not be owned
by the current VM, even though they are mapped.
To avoid stage 2 faults while accessing these regions,
remove displaying of contents around addresses stored
in registers and only show data around sp, lr, pc.

Change-Id: I1cc1deb9d7d9bbfb564fad8fbd89c114ea8a4543
Signed-off-by: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
parent b318a6e0
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -262,19 +262,12 @@ static void show_data(unsigned long addr, int nbytes, const char *name)
static void show_extra_register_data(struct pt_regs *regs, int nbytes)
{
	mm_segment_t fs;
	unsigned int i;

	fs = get_fs();
	set_fs(KERNEL_DS);
	show_data(regs->pc - nbytes, nbytes * 2, "PC");
	show_data(regs->regs[30] - nbytes, nbytes * 2, "LR");
	show_data(regs->sp - nbytes, nbytes * 2, "SP");
	for (i = 0; i < 30; i++) {
		char name[4];

		snprintf(name, sizeof(name), "X%u", i);
		show_data(regs->regs[i] - nbytes, nbytes * 2, name);
	}
	set_fs(fs);
}