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

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

From: Russell King - ARM Linux <hidden>
Date: 2009-09-28 11:26:24

On Mon, Sep 28, 2009 at 02:01:58PM +0300, Imre Deak wrote:
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
...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help