Re: copy_from_user() fixu

Mike Jagdis (mike@roan.co.uk)
Tue, 25 Aug 1998 13:05:07 +0100 (GMT/BST)


On Tue, 25 Aug 1998, Chris Wedgwood wrote:

> On Tue, Aug 25, 1998 at 12:24:17AM -0700, H. Peter Anvin wrote:
>
> > All I'm saying is that if you're relying on EFAULT rather than
> > SIGSEGV or vice versa, your code is completely, utterly, and
> > fundamentally broken.

Broken code exists. Broken code is not always accessible for fixing.
Enough said :-).

> If I have a spec. (Unix98) that says when I do blah with blem I can
> expect EFAULT, then I don't see why I can't expect this.

Unix98 also says that reliable detection cannot be guaranteed and
that a signal *may* be generated as well. No, the signal number
that *may* be generated is not mentioned :-).

So, generating SIGSEGV when an EFAULT condition is detected won't
break standards conformence. But there is plenty of old code out
there that is broken but happens to work because that's the way
BSD/SYSV/V7 worked. The question is, do we care about breaking
standards or do we care about, possibly, breaking code? You can
have SIGSEGV on EFAULT either way - you just have to think about
the design a little more if code is an issue rather than just
The Standard.

Mike

-- 
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'

- 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.altern.org/andrebalsa/doc/lkml-faq.html