Re: 2.2 PATCH: check return from copy_*_user in fs/pipe.c

Zack Weinberg (zackw@Stanford.EDU)
Wed, 20 Jun 2001 23:10:50 -0700


On Wed, Jun 20, 2001 at 08:44:23PM -0700, David S. Miller wrote:
>
> Zack Weinberg writes:
> > Linus Torvalds wrote:
> > > And before you say "it has to return EFAULT", check the standards, and
> > > think about the case of libraries vs system calls - and how do you tell
> > > them apart?
> >
> > My reading of the standard is that it has to either return EFAULT or
> ^^
> > raise SIGSEGV. But I am not expert in XPG4-ese.
>
> Linus is trying to point out: "what is this 'it'?" Is it glibc or
> what the kernel gives you?

POSIX/XPG doesn't make a distinction between kernel and C library as
far as I see... which is why either a signal or an error return is
permitted by the standard; it depends on where the thing really is
implemented.

> > Whether or not the standard requires anything, I would much rather
> > that the kernel not silently discard error conditions.
>
> But only perhaps from a "quality of implementation" perspective not a
> "correctness" one.

Okay, I'll accept that.

zw
-
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/