Messages in this thread | | | Date | Tue, 05 Jan 2010 13:44:55 -0800 | From | "H. Peter Anvin" <> | Subject | Re: strict copy_from_user checks issues? |
| |
On 01/05/2010 07:20 AM, Arnd Bergmann wrote: > > You mean like this? > > It adds some complexity and about 200 bytes of object code, > I'm not sure it's worth it. >
What's much worse is that it adds churn to an otherwise-tested code path.
We almost need a copy_from/to_user_audited() to override the warning. Not that errors can't creap back in...
> -- > [UNTESTED PATCH] tun: avoid copy_from_user size warning > > For 32 bit compat code, the tun driver only copies the > fields it needs using a short length, which copy_from_user > now warns about. Moving the copy operation outside of the > main ioctl function lets us avoid the warning. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-hpa
| |