Sergey Vlasov wrote:


This thing is seriously broken, both for 2.4.x and 2.6.x:


1) Allocating "struct hiddev_usage_ref_multi uref_multi" on the
stack in hiddev_ioctl() is not good - with HID_MAX_USAGES==1024, it
is more than 4K.

I suppose an artifical limit could be put in (32 maybe?) which forces writes of only N bytes at a time, returning -EINVAL if >32 want to be written. This would also remove the dependence on HID_MAX_USAGES.



2) #include <linux/hiddev.h> from userspace no longer works: first, HID_MAX_USAGES definition is in a private header file; second, #include <asm/types.h> is needed for __s32 and the like.

As for the types, it was suggested that the explicit size types be used as opposed to "unsigned" to guarantee structure size.
Maybe this needs to be rethought since you claim it breaks userspace.


--
James Lamanna


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to