Re: mmap, SIGBUS, and handling it

David S. Miller (davem@redhat.com)
Fri, 10 May 2002 08:47:22 -0700 (PDT)


From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Fri, 10 May 2002 17:53:21 +0200 (MET DST)

On Fri, 10 May 2002, David S. Miller wrote:

> How would you like the kernel to "ignore" a page fault that cannot be
> serviced?

I would expect it to return from the handler with no action, possibly
re-executing the faulting instruction (if the reason was synchronous) and
causing an infinite loop. For consistency, whether it makes sense, or not
(ditto for SIGSEGV, etc.).

If we reexecute the instruction it will take the signal endlessly,
forever. That makes no sense.

Next, if we skip the instruation, what should be in the destination
register of the load? There is no reasonable answer. If you put
zero there the program will likely segfault on a NULL pointer
dereference.

So my original point I was trying to make, which still stands, is that
what is being requested is totally rediculious behavior, trying to
ignore a page fault that can't be serviced.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/