Linux-kernel mailing list archive 1998-42,: Re: -EFAULT on invalid pointer

# Re: -EFAULT on invalid pointer

Chris Wedgwood (chris@cybernet.co.nz)
Tue, 20 Oct 1998 16:50:12 +1300

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: MOLNAR Ingo: "Re: -EFAULT on invalid pointer"
- Previous message: Alan Cox: "Re: Where does 10ms serial port read latency come from?"

On Tue, Oct 20, 1998 at 05:41:56AM +0200, MOLNAR Ingo wrote:

> no, it's a quality of implementation issue. Also it's a usability
> issue, bugs detected should be reported back to user-space. It's
> _not_ a valid excuse that if it's not defined explicitly in POSIX
> or that other OSs are less careful.

I don't disagree its a useful feature - but its behaves
inconsistently between different OSs and different versions of linux.

> Also, it can be used by user-space too, if a memory-management
> software (such as a C++ wrapped garbage collector or whatever)
> maps/unmaps certain areas of memory, the pointer could be invalid
> because say that page is marked read-only, but user-space has the
> right to detect this.

But... the behaviour isn't consistent right now, why should we expect
it to be in ther future?

We changed the semantics once already, they could change again,
writing applications based upon on set on undefined semantics sounds
a bit dodgey to me.

Anyhow... we can do the above, (non-portably) in user-space my mmap
PROT_NONE and pulling apart the stack frame we get in the segfault
signal handler.

-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: MOLNAR Ingo: "Re: -EFAULT on invalid pointer"
- Previous message: Alan Cox: "Re: Where does 10ms serial port read latency come from?"