On Tue, Sep 20, 2016 at 1:38 PM, Al Viro <[email protected]> wrote:
>
> Not the point. Of course it *would* fail; the problem is that the loop
> that would ping each page is never executed.
You're missing the point.
If "access_ok()" is fine with wrapping, then some otehr system call
that wraps will successfully do a memcpy_from/to_user() with a wrapped
address (and the proper mappings). Which is completely bogus.
So access_ok() should be fixed regardless. An access_ok() that accepts
a wrapping address is a bug. End of story.
And once that bug is fixed, the fault_in_multipages..() issue is moot.
So it shouldn't be an issue.
Linus