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

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Sep 28 07:26:24 EDT 2009


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:
> > [...]
> >
> > 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
...



More information about the linux-arm-kernel mailing list