This repository has been archived on 2022-09-20. You can view files and clone it, but cannot push or open issues or pull requests.
libraw1394/src
Stefan Richter 7416da6112 Be more careful when copying response payloads on firewire-core
When faced with bogus config ROM read responses from an audio device
that did not support block requests as advertized, libffado's csr1212
code was able to recover when running on top of raw1394 but corrupted
its config ROM cache when running on top of firewire-core.
http://subversion.ffado.org/ticket/299

While the actual cause was a combination of firmware bug of the device
and flaw in csr1212.c of libffado, the much less graceful behavior when
running on firewire-core was obviously due to libraw1394's
firewire-core backend.  Hence,
  - do not write into the client's buffer if rcode != RCODE_COMPLETE,
  - do not copy more data than the actual response contained.

The latter safeguard is not overly effective though.  The libraw1394 API
has no means to inform a client about the error case that a responder
node sent less bytes than were requested.  (The case that the responder
sent more bytes than requested is covered up by the kernel already.)
Should we synthesize an I/O failure?  Does not sound ideal either.
However, such a size mismatch should never happen; the important part of
this change is the RCODE_COMPLETE check.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-09-07 11:48:18 +02:00
..
Makefile.am Fix build always expecting FW_DIR. 2009-06-18 23:15:19 -07:00
arm.c Address some compiler warnings 2008-10-28 22:56:09 -07:00
csr.h - Added FCP register addresses 1999-12-18 16:02:15 +00:00
dispatch.c Implement raw1394_(start_)phy_packet_write() on firewire-core 2010-09-07 11:27:09 +02:00
errors.c Change handle validation to prevent segfault and be more informative. 2008-07-06 12:06:40 -07:00
eventloop.c Address some compiler warnings 2008-10-28 22:56:09 -07:00
fcp.c First cut at integrating juju 2008-04-23 17:44:36 -07:00
fw-iso.c Rename a few kernel ABI testing helpers 2010-09-07 11:26:58 +02:00
fw.c Be more careful when copying response payloads on firewire-core 2010-09-07 11:48:18 +02:00
fw.h Be more careful when copying response payloads on firewire-core 2010-09-07 11:48:18 +02:00
ieee1394-ioctl.h added raw1394_read_cycle_timer, contributed by Pieter Palmers 2007-02-14 05:29:18 +00:00
ieee1394.h Added ieee1394.h header. 2000-11-22 23:12:56 +00:00
iso.c First cut at integrating juju 2008-04-23 17:44:36 -07:00
kernel-raw1394.h added raw1394_read_cycle_timer, contributed by Pieter Palmers 2007-02-14 05:29:18 +00:00
main.c Address some compiler warnings 2008-10-28 22:56:09 -07:00
raw1394.h Fix documentation of return values of raw1394_start_ family of functions 2010-02-01 22:10:12 +01:00
raw1394_private.h Move the source code files in the juju directory into the src directory and 2008-04-30 14:37:28 -07:00
readwrite.c First cut at integrating juju 2008-04-23 17:44:36 -07:00
version.c reorganize and update documentation; fix compiler warning 2004-11-11 03:19:09 +00:00