Re: [PATCH v7 05/19] iov_iter: Introduce fault_in_iov_iter_writeable

From: Al Viro
Date: Fri Aug 27 2021 - 15:23:57 EST


On Fri, Aug 27, 2021 at 12:05:32PM -0700, Linus Torvalds wrote:

> But see above. People *need* that ternary result, and "bytes/pages
> uncopied" is not only the traditional one we use elsewhere in similar
> situations, it's the one that has the easiest error tests for existing
> users (because zero remains "everything worked").

Could you show the cases where "partial copy, so it's OK" behaviour would
break anything?

For that you would need the case where
partial fault-in is currently rejected by the check
checks downstream from there (for failing copy-in/copy-out) would
be either missing or would not be handled correctly in case of partial
fault-in or would slow a fast path down.

I don't see any such cases and I would be very surprised if such existed.
If you see any, please describe them - I could be wrong. And I would
like to take a good look at any such case and see how well does it handle
possible short copy after full fault-in.