Re: [Libusbx-devel] [libusbx] Darwin: Fix format of 64-bit sessionIDs in log messages (#153)

2014-01-07 Thread Pete Batard
Closed #153 via 0500232303fe706dbe538290a49869f1dadf90af. --- Reply to this email directly or view it on GitHub: https://github.com/libusbx/libusbx/pull/153-- Rapidly troubleshoot problems before they affect your business.

Re: [Libusbx-devel] [libusbx] Darwin: submit_bulk_transfer crashes with EXC_ARITHMETIC (#136)

2014-01-07 Thread Pete Batard
Closed #136 via 314f4ff998f6ba63607ce3be6cd7193a39cd1f78. --- Reply to this email directly or view it on GitHub: https://github.com/libusbx/libusbx/pull/136-- Rapidly troubleshoot problems before they affect your business.

Re: [Libusbx-devel] [libusbx] Darwin: When an unknown error fall back to error code (#117)

2014-01-07 Thread Pete Batard
Closed #117 via b1bbea6f4f5cadc8ba2f48ae077f0c4ac339c3cc. --- Reply to this email directly or view it on GitHub: https://github.com/libusbx/libusbx/pull/117-- Rapidly troubleshoot problems before they affect your business.

Re: [Libusbx-devel] [libusbx] Core: libusb_interrupt_transfer and libusb_control_transfer does not return in case of error (#76)

2014-01-07 Thread miguelfreitas
@jwrdegoede let me make an additional argument. even if it were a buggy client passing invalid pointers to the kernel directly (which is not the case), this buggy client would still get a nice -EFAULT which he would have a chance to handle. But the current behavior of libusbx is not good, imho.

Re: [Libusbx-devel] [libusbx] Core: libusb_interrupt_transfer and libusb_control_transfer does not return in case of error (#76)

2014-01-07 Thread Hans de Goede
urb->actual_length is guaranteed by the kernel usb-core and hcd code to never be longer then urb->transfer_buffer_length. --- Reply to this email directly or view it on GitHub: https://github.com/libusbx/libusbx/issues/76#issuecomment-31744650-

Re: [Libusbx-devel] [libusbx] Core: libusb_interrupt_transfer and libusb_control_transfer does not return in case of error (#76)

2014-01-07 Thread miguelfreitas
@jwrdegoede I have read the processcompl() you mention and i agree the only failure case is when one of the put_user or copy_to_user fails. -EFAULT is the only error code used there. Another raw guess: is it possible that data was corrupted during USB transfer (this actually happens here due to

Re: [Libusbx-devel] [libusbx] Core: libusb_interrupt_transfer and libusb_control_transfer does not return in case of error (#76)

2014-01-07 Thread miguelfreitas
I chose not to use memmove but rather read and write all buffer bytes in a loop (not sure if memmove would optimize src==dst case). I could successfully trigger the EFAULT and it did not cause any segfault. patch (just for reference): https://gist.github.com/miguelfreitas/8298825 besides i must

Re: [Libusbx-devel] [libusbx] Core: libusb_interrupt_transfer and libusb_control_transfer does not return in case of error (#76)

2014-01-07 Thread miguelfreitas
@jwrdegoede your reasoning sounds good to me. so we are basically concluding it is either a bug in my client or kernel itself, right? i have an idea: what if i add a memmove inside libusbx to every libusb_control_transfer and libusb_bulk_transfer? this way, if i pass an invalid buffer to libusb

Re: [Libusbx-devel] Get file description and call sync transfer functions after a poll/select.

2014-01-07 Thread Joaquim Duran
OK, I've the ideas much more clear. Thanks for your answer. Joaquim Duran 2014/1/6 Tim Roberts > Joaquim Duran wrote: > > > > I'm new to this e-mail list. In the current project, I would like use > > a 3rd party library to monitor the IO events on file descriptors, > > including libusb libra