linux-mips
[Top] [All Lists]

Re: Ioctl size mask

To: Shay Deloya <shay@jungo.com>
Subject: Re: Ioctl size mask
From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Date: Mon, 16 Apr 2001 20:42:41 +0200 (MET DST)
Cc: linux-mips@oss.sgi.com
In-reply-to: <01041612582600.25043@athena.home.krftech.com>
Sender: owner-linux-mips@oss.sgi.com
On Mon, 16 Apr 2001, Shay Deloya wrote:
> On asm-mips/ioctl.h , there is a mask on the size transfered to the ioctl , 
> e.g. : when implementing an ioctl that handles IO , the max size the 
> supported in mips is 0xff  as defined in the code below: 
> 
> 
> #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.

Gr{oetje,eeting}s,

                                                Geert

--
Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE)
Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248626 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium


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