Re: ioctl() is unsafe

From: Olaf Titz (olaf@bigred.inka.de)
Date: Fri May 19 2000 - 03:56:56 EST


> /* ioctl command encoding: 32 bits total, command in lower 16 bits,
> * size of the parameter structure in the lower 14 bits of the
> * upper 16 bits.

> If you have some spare time, scanning thru the sources to find
> all IOCTL codes not using these rules would be usefull thing
> for further development. Perhaps for introducing new codes,
> along with old compability ones, or just helping audit things.

There are some codes which don't follow these rules because they
cannot. E.g. SIOCDEVPRIVATE (the parameter is driver-specific).

The only clean solution for these would be to pass an additional
explicit size parameter, but that's missing from ioctl() broken as
designed in the early '70s.

Olaf

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:16 EST