lkml.org 
[lkml]   [2008]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts
Am Fri, 23 May 2008 07:41:15 +0200
schrieb Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>:

> Hello Tom,
>
> Tom Spink wrote:
> > The added benefit is that the code becomes less complex, as you
> > don't have to check buffer sizes and copy the integer from
> > userspace.
> AFAIK this is wrong. You need to copy the integer from userspace in
> uio_ioctl. Actually it's a value coming from user space, so you need
> to do it somewhere.

True. Also note that this is not type-safe. All ioctl calls blindly
trust userspace to pass in correct data. This has to be tolerated for
ancient well-known filesystem ioctls, because you'd break almost all of
userspace if you changed that, but we certainly don't want to add new
stuff to this mess.

Thanks,
Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-05-23 10:55    [W:0.558 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site