Thread (40 messages) 40 messages, 8 authors, 2009-09-29
STALE6104d

[PATCH] ARM: add warning for invalid kernel page faults

From: Imre Deak <hidden>
Date: 2009-09-28 11:33:27

On Mon, Sep 28, 2009 at 01:26:24PM +0200, ext Russell King - ARM Linux wrote:
On Mon, Sep 28, 2009 at 02:01:58PM +0300, Imre Deak wrote:
quoted
On Mon, Sep 28, 2009 at 12:27:10PM +0200, ext Russell King - ARM Linux wrote:
quoted
[...]

Now you're talking about different code - the bit I quoted was what was
in your submitted patch, without deletion of intervening lines.  There
was no else clause in your patch.

Please, go back and look at your original patch.
Ah, sorry. Missed that line when rebasing. I'll send an updated one.
Now I see what you're getting at.  Yes, we can make this a debugging
option, but I believe it should exhibit the right behaviour.

In other words (and as I already covered) it should invoke the standard
no_context thing if there isn't a fixup handler in place rather than
continuing blindly on to try to handle the fault.  So, it should be:

	if (!down_read_trylock(&mm->mmap_sem)) {
		if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
			goto no_context;
		down_read(&mm->mmap_sem);
	} else {
+#ifdef CONFIG_DEBUG_VM
+		if (!user_mode(regs) && !search_exception_tables(regs->ARM_pc))
+			goto no_context;
+#endif
Ok, agreed. Do you need an updated patch?

--Imre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help