Thread (1 message) 1 message, 1 author, 2017-01-12

Re: [PATCH 3/4] drivers/misc: Add ASpeed LPC control driver

From: Benjamin Herrenschmidt <hidden>
Date: 2017-01-12 16:07:33
Also in: openbmc

On Thu, 2017-01-12 at 17:00 +0100, Greg KH wrote:
quoted
How so ? I mean, access_ok followed by __get/__put_user is still a
classic, what's wrong with it ?
No "normal" driver should do that, just call copy_to/from_user and be
done with it.  That way all of the proper locking and validation checks
like this are done correctly for you.  Why would a driver ever call the
"raw" __get/__put_user functions?
I supposed historically it was considered faster for some things :-)

Not a huge deal, and yes it's probably cleaner, I was just wondering
what was "racy" about access_ok() that I might have missed...

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help