On Thu, 2017-01-12 at 17:26 +0100, Greg KH wrote:
I think, you can change things after access_ok() happens, there used to
be bugs in that area a few years ago. I think we fixed them by moving
the offending drivers to use copy_*() instead.
Ok, I'm surprised though, we still have a metric ton of code,
especially in filesystems, who do access_ok. Generally the idea here is
that the enforcement is done by the MMU normally via the permission in
the page tables. access_ok() is simply needed to make sure we access
the portion of the page tables representing user space, not kernel
space, and that is a pretty fixed dichotomy.
Anyway, this is academic, I agree that copy_to/from_... is nicer.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html