Re: [git pull] kgdb light, v5

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Jan Kiszka <jan.kiszka@...>, Ray Lee <ray-lk@...>, Sam Ravnborg <sam@...>, <linux-kernel@...>, Andrew Morton <akpm@...>, Thomas Gleixner <tglx@...>, Jason Wessel <jason.wessel@...>
Date: Sunday, February 10, 2008 - 4:41 pm

* Ingo Molnar <mingo@elte.hu> wrote:


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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[0/6] kgdb light, Ingo Molnar, (Sun Feb 10, 3:13 am)
Re: [0/6] kgdb light, Sam Ravnborg, (Sun Feb 10, 6:47 am)
[git pull] kgdb light, v5, Ingo Molnar, (Sun Feb 10, 12:36 pm)
Re: [git pull] kgdb light, v5, Sam Ravnborg, (Sun Feb 10, 3:34 pm)
Re: [git pull] kgdb light, v5, Ray Lee, (Sun Feb 10, 1:30 pm)
Re: [git pull] kgdb light, v5, Jan Kiszka, (Sun Feb 10, 2:53 pm)
Re: [git pull] kgdb light, v5, Linus Torvalds, (Sun Feb 10, 3:44 pm)
Re: [git pull] kgdb light, v5, Ingo Molnar, (Sun Feb 10, 4:29 pm)
Re: [git pull] kgdb light, v5, Ingo Molnar, (Sun Feb 10, 4:41 pm)
Re: [git pull] kgdb light, v5, Jan Kiszka, (Sun Feb 10, 4:22 pm)
Re: [git pull] kgdb light, v5, Ingo Molnar, (Sun Feb 10, 5:13 pm)
Re: [git pull] kgdb light, v5, Ingo Molnar, (Sun Feb 10, 4:19 pm)
Re: [git pull] kgdb light, v5, Ingo Molnar, (Sun Feb 10, 3:34 pm)
Re: [git pull] kgdb light, v5, Jan Kiszka, (Sun Feb 10, 1:39 pm)
Re: [git pull] kgdb light, v5, Ray Lee, (Sun Feb 10, 2:59 pm)
Re: [0/6] kgdb light, Jan Kiszka, (Sun Feb 10, 9:25 am)
Re: [0/6] kgdb light, Sam Ravnborg, (Sun Feb 10, 3:31 pm)
Re: [0/6] kgdb light, Ingo Molnar, (Sun Feb 10, 5:16 pm)
Re: [0/6] kgdb light, Sam Ravnborg, (Sun Feb 10, 5:30 pm)
Re: [0/6] kgdb light, Ingo Molnar, (Sun Feb 10, 5:34 pm)
Re: [0/6] kgdb light, Jan Kiszka, (Sun Feb 10, 4:23 pm)
Re: [0/6] kgdb light, David Miller, (Sun Feb 10, 3:37 am)