All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jan Kiszka <jan.kiszka@web.de>, Ray Lee <ray-lk@madrabbit.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@zip.com.au>,
	Thomas Gleixner <tglx@linutronix.de>,
	Jason Wessel <jason.wessel@windriver.com>
Subject: Re: [git pull] kgdb light, v5
Date: Sun, 10 Feb 2008 21:41:24 +0100	[thread overview]
Message-ID: <20080210204124.GA26701@elte.hu> (raw)
In-Reply-To: <20080210202930.GA25889@elte.hu>


* Ingo Molnar <mingo@elte.hu> 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

  reply	other threads:[~2008-02-10 20:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-10  7:13 [0/6] kgdb light Ingo Molnar
2008-02-10  7:37 ` David Miller
2008-02-10 10:47 ` Sam Ravnborg
2008-02-10 13:25   ` Jan Kiszka
2008-02-10 19:31     ` Sam Ravnborg
2008-02-10 20:23       ` Jan Kiszka
2008-02-10 21:16       ` Ingo Molnar
2008-02-10 21:30         ` Sam Ravnborg
2008-02-10 21:34           ` Ingo Molnar
2008-02-10 16:36   ` [git pull] kgdb light, v5 Ingo Molnar
2008-02-10 17:30     ` Ray Lee
2008-02-10 17:39       ` Jan Kiszka
2008-02-10 18:59         ` Ray Lee
2008-02-10 18:53       ` Jan Kiszka
2008-02-10 19:34         ` Ingo Molnar
2008-02-10 19:44         ` Linus Torvalds
2008-02-10 20:19           ` Ingo Molnar
2008-02-10 20:22           ` Jan Kiszka
2008-02-10 21:13             ` Ingo Molnar
2008-02-10 20:29           ` Ingo Molnar
2008-02-10 20:41             ` Ingo Molnar [this message]
2008-02-10 19:34     ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080210204124.GA26701@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@zip.com.au \
    --cc=jan.kiszka@web.de \
    --cc=jason.wessel@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray-lk@madrabbit.org \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.