Cc: Jan Kiszka <jan.kiszka@...>, Ray Lee <ray-lk@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, Jason Wessel <jason.wessel@...>
yes. We should allow kgdb to look at just about anything that can be
done safely - and we've got all the necessary protections against
pagefaults via pagefault_disable().
hm, is access_ok() safe on all architectures from irq context? That's
the cross-arch equivalent of TASK_SIZE checks normally.
yes, the full function now looks like this:
int kgdb_mem2hex(char *mem, char *buf, int count)
{
char *tmp;
int err;
/*
* We use the upper half of buf as an intermediate buffer for the
* raw memory copy. Hex conversion will work against this one.
*/
tmp = buf + count;
err = probe_kernel_read(tmp, mem, count);
if (!err) {
while (count > 0) {
buf = pack_hex_byte(buf, *tmp);
tmp++;
count--;
}
*buf = 0;
}
return err;
}
i'll test this a bit.
Ingo
--