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

Zack Weinberg
2001-06-21T06:11:16Z

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