lkml.org 
[lkml]   [2010]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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



\
 
 \ /
  Last update: 2010-01-05 22:51    [W:0.096 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site