Re: [patch-2.3.29] bugfix for pipe(2) system call.

Tigran Aivazian (tigran@sco.COM)
Thu, 25 Nov 1999 15:19:39 +0000 (GMT)


On Thu, 25 Nov 1999, Brandon S. Allbery KF8NH wrote:
> Doesn't some spec or other require (or at least strongly suggest) returning
> EFAULT? (Haven't "we" had that discussion before?)

yes, we may have. But no such spec or requirement that I am aware of.
Returning EFAULT is being nice to the stupid user, but SIGSEGV'ing the
offender (e.g. if she overflows the stack) is not breaking any standards.

> At one time there was an optimized path for the double-copy: do the
> verify_area early, then bypass it when doing the real copy later. I guess
> this path no longer exists?

It is still done in several places. For example, have a look at
generic_file_read() in mm/filemap.c. It uses verify_area() at the top and
uses __copy_to_user() in the actual actor (file_read_actor).

Regards,
Tigran.

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