Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1316818
| From | Alan Stern <stern@rowland.harvard.edu> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. |
| Date | 2016-01-25 16:30 +0100 |
| Message-ID | <qURfB-5VH-29@gated-at.bofh.it> (permalink) |
| References | <qUL0u-1ia-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 25 Jan 2016, Bjørn Mork wrote: > I don't feel much like an expert here, but I can certainly make up an > opinion anyway :) > > Since 64bits kernels allow usb devio with interface numbers up to 63, I > guess you need __u64 to avoid limiting the range? Limiting will create > all sorts of followup problems, so it's definitely easiest to just go > with __u64. But the Linux USB stack only allows up to 32 interfaces (see include/linux/usb.h): /* this maximum is arbitrary */ #define USB_MAXINTERFACES 32 So there's no point using a 64-bit value. On the other hand, this value is supposed to be the same size as ps->ifclaimed, which is used as an argument to clear_bit(), set_bit(), and test_bit(). Those routines require unsigned long. Alan Stern
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v1 0/1] ioctl to disallow detaching kernel USB drivers Emilio López <emilio.lopez@collabora.co.uk> - 2016-01-19 17:50 +0100
Re: [PATCH v1 0/1] ioctl to disallow detaching kernel USB drivers Greg KH <gregkh@linuxfoundation.org> - 2016-01-19 19:10 +0100
[PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Emilio López <emilio.lopez@collabora.co.uk> - 2016-01-22 01:00 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Bjørn Mork <bjorn@mork.no> - 2016-01-22 10:50 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Emilio López <emilio.lopez@collabora.co.uk> - 2016-01-25 03:10 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Bjørn Mork <bjorn@mork.no> - 2016-01-25 09:50 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Alan Stern <stern@rowland.harvard.edu> - 2016-01-25 16:30 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Bjørn Mork <bjorn@mork.no> - 2016-01-25 16:40 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Alan Stern <stern@rowland.harvard.edu> - 2016-01-25 16:50 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Alan Stern <stern@rowland.harvard.edu> - 2016-01-22 17:20 +0100
Re: [PATCH v2] usb: devio: Add ioctl to disallow detaching kernel USB drivers. Emilio López <emilio.lopez@collabora.co.uk> - 2016-01-25 03:10 +0100
csiph-web