lkml.org 
[lkml]   [2010]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH] input: Introduce device information ioctl
On Tue, Dec 7, 2010 at 11:56, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Tue, Dec 07, 2010 at 11:48:28AM +0100, Kay Sievers wrote:

>> Please don't add new ioctls which are not extensible. The ioctl should
>> carry the length or the version of the structure it asks for, so it
>> can be extended in the future.
>
> Size of ioctl data is encoded in ioctl, it can be extended easily. For
> examples take a look at how EVIOCGKEYCODE and EVIOCGSKEYCODE are handled
> in recent kernels.

Oh, how does that work? With the ioctl call, userspace has to supply
the size it expects to be returned from the kernel. How does the
kernel otherwise know how much it is allowed to copy to the user?

Kay


\
 
 \ /
  Last update: 2010-12-07 12:21    [W:0.040 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site