linux-mips
[Top] [All Lists]

Re: Ioctl size mask

To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Subject: Re: Ioctl size mask
From: Ralf Baechle <ralf@oss.sgi.com>
Date: Tue, 17 Apr 2001 13:39:57 -0300
Cc: Shay Deloya <shay@jungo.com>, linux-mips@oss.sgi.com
In-reply-to: <Pine.GSO.4.10.10104162042230.10522-100000@rose.sonytel.be>; from Geert.Uytterhoeven@sonycom.com on Mon, Apr 16, 2001 at 08:42:41PM +0200
References: <01041612582600.25043@athena.home.krftech.com> <Pine.GSO.4.10.10104162042230.10522-100000@rose.sonytel.be>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
On Mon, Apr 16, 2001 at 08:42:41PM +0200, Geert Uytterhoeven wrote:

> > #define _IOWR(type,nr,size)                         
> >     _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))                     
> >      
> > 
> > 
> > and _IOC uses size in this way:
> > 
> > (((size) & _IOC_SLMASK) << _IOC_SIZESHIFT))           // (_IOC_SLMMASK = 
> > 0xff)
> > 
> > 
> > The limited size causes problems on drivers that use size mask to their 
> > needs, while officialy the allowed limit is 2^13 ( 8kB) by definition .
> 
> This was fixed in the CVS tree some weeks ago.

Small addendum to the fix - while it made some ioctls usable it also did
result in the affected ioctl number changing which may have broken some
software that _appeared_ to be working before.  One example is autofs.
Just recompile against the updated kernel headers and everything will be
ok.

The effect gets more visible on the 64-bit kernel which will spit kernel
messages for unknown ioctls.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>