This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Intercept ioctls


On 13/05/13 13:07, Andreas Ames wrote:
> My questions are:
>
> 1. Is my above guesswork reasonable?
>
> 2. Are there other argument types that are more dangerous (like one-byte, two-byte etc. arguments)?
>
> 3. Do you know a better approach to shim ioctls?
>
>
> Thanks in advance,
>
> aa
Yes, it should work. You may be passing a garbage argument to the , but
in that case, due to the request code, the real ioctl won't be using it.

Given that sizeof(void*) >= sizeof(int), your choice seems appropiate:
>       The  arg  argument represents additional information that is
> needed by this specific STREAMS device to perform
>        the requested function. The type of arg depends upon the
> particular control request, but it shall be either an
>        integer or a pointer to a device-specific data structure.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]