Re: [git pull] kgdb light, v5
- From: Ingo Molnar <mingo@xxxxxxx>
- Date: Sun, 10 Feb 2008 21:41:24 +0100
* Ingo Molnar <mingo@xxxxxxx> wrote:
all other places already use probe_kernel_{read|write}. (Now, there
are a few stray TASK_SIZE checks still, i'll double check them and
convert them to access_ok() checks.)
all the TASK_SIZE checks relate to the soft breakpoint write accesses.
and access_ok() does not cut it: it's also a bit dangerous from debug
context: uses current->address_space, which is task dependent and can
accidentally allow an int3 write to userspace if executed in a kernel
thread that has lazy-inherited the TLB from a user task, etc., and it
also does not give enough protection on some other architectures.
is_kernel_text() is not good, because it does not cover modules.
is_module_address() is not good either, because it also covers module
data areas, and is a bit thick (hence crash-risky) as well. So there's
no existing facility to cover this.
so i'd say the safest would be to remove the TASK_SIZE check altogether.
If someone typoes a raw breakpoint - it is still enumerated by gdb and
can still be cleared. It's not like kgdb cannot be used to shoot in
one's own foot ...
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [0/6] kgdb light
- From: Ingo Molnar
- Re: [0/6] kgdb light
- From: Sam Ravnborg
- [git pull] kgdb light, v5
- From: Ingo Molnar
- Re: [git pull] kgdb light, v5
- From: Ray Lee
- Re: [git pull] kgdb light, v5
- From: Jan Kiszka
- Re: [git pull] kgdb light, v5
- From: Linus Torvalds
- Re: [git pull] kgdb light, v5
- From: Ingo Molnar
- [0/6] kgdb light
- Prev by Date: Re: [PATCH] Change pci_raw_ops to pci_raw_read/write
- Next by Date: [patch 2.6.24-git] rtc: avoid legacy drivers with generic framework
- Previous by thread: Re: [git pull] kgdb light, v5
- Next by thread: Re: [git pull] kgdb light, v5
- Index(es):