[linux-dvb] [akpm@xxxxxxxx: [linux-dvb-maintainer] Fw: [Bugme-new] [Bug 4370] New: Pinnacle PCI SAT-TV card: cx24110 frontend ioctl32 error]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerd Knorr wrote:
> Johannes Stezenbach <js@xxxxxxxxxxx> writes:
> 
> > I have no idea if we need to do something special to support this,
> > although I've seen that there's this compat_ioctl in
> > struct file_operations. Does someone have a clue?
> 
> Yes, compat_ioctl is for 32bit apps.  Had a quick look at the structs
> and they seem to be identical in 32 and 64 bit.  I think simply
> hooking the ioctl callback into both ioctl and compat_ioctl could do
> the trick for the frontend device.
> 
> In case you'll have fields like "long" or "void*" in the ioctl structs
> which have different sizes for 32/64 bit apps compat_ioctl would have
> to take care to handle the 32-bit cases correctly.  Browse through the
> kernel source code, there should be quite a few examples ;)

It seems none of the DVB API headers use long or void* fields,
except osd.h, so conversion should be easy.

BUT: http://lwn.net/Articles/119652/

If I understand that correctly, compat_ioctl does not acquire
the BKL (big kernel lock), so if we want to add compat_ioctl
we must either audit all code if it depends on the BLK
(I guess not, but I'm not sure), or call lock/unlock_kernel()
explicitely in our compat_ioctl handlers.

Johannes



[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux