From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Clemens Ladisch <cladisch@fastmail.net>
Cc: linux-kernel@vger.kernel.org, linux1394-devel@lists.sourceforge.net
Subject: Re: [PATCH 1/5] firewire: fix use of multiple AV/C devices, allow multiple FCP listeners
Date: Sat, 23 Jan 2010 15:51:23 +0100 [thread overview]
Message-ID: <4B5B0CEB.8060707@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.2eca556d1afddd17@s5r6.in-berlin.de>
Stefan Richter wrote:
> Date: Thu, 24 Dec 2009 12:05:58 +0100
> From: Clemens Ladisch <cladisch@fastmail.net>
>
> Control of more than one AV/C device at once --- e.g. camcorders, tape
> decks, audio devices, TV tuners --- failed or worked only unreliably,
> depending on driver implementation. This affected kernelspace and
> userspace drivers alike and was caused by firewire-core's inability to
> accept multiple registrations of FCP listeners.
>
> The fix allows multiple address handlers to be registered for the FCP
> command and response registers. When a request for these registers is
> received, all handlers are invoked, and the Firewire response is
> generated by the core and not by any handler.
>
> The cdev API does not change, i.e., userspace is still expected to send
> a response for FCP requests; this response is silently ignored.
>
> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (changelog, rebased, whitespace)
I tested this on another box which has more kernel debug options enabled
than my current mainly used box. Alas, there is a serious regression on
that box:
1.) testlibraw now always shows:
- testing FCP monitoring on local node
got fcp command from node 0 of 8 bytes:ERROR: fcp payload not correct
6b 6b 6b 6b 6b 6b 6b 6b
got fcp response from node 0 of 8 bytes:ERROR: fcp payload not correct
6b 6b 6b 6b 6b 6b 6b 6b
2.) gscanbus's AV/C controls work but are now very quick to segfault.
3.) Kino frequently shows 6b:6b:6b:6b as timestamp when a DV camcorder
in "record" mode is connected.
4.) Kino is unable to determine the presence of a DV camcorder if the
camcorder is in "play" mode.
Only the AV/C kernel driver firedtv still works (tested with kaffeine).
0x6b is the POISON_FREE pattern in <linux/poison.h>. So, we apparently
have a use-after-free issue with FCP responses in firewire-core's cdev
interface now.
None of this happened before the patch. (There this box with otherwise
identical kernel and modules only exhibits the problem that was fixed by
the patch, i.e. no more than one FCP listener possible at a time.)
--
Stefan Richter
-=====-==-=- ---= =-===
http://arcgraph.de/sr/
next prev parent reply other threads:[~2010-01-23 14:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-26 0:32 [PATCH 0/5] firewire: fixes, status update Stefan Richter
2009-12-26 0:33 ` [PATCH 1/5] firewire: fix use of multiple AV/C devices, allow multiple FCP listeners Stefan Richter
2009-12-26 8:35 ` Pieter Palmers
2009-12-26 12:01 ` Stefan Richter
2009-12-26 13:23 ` Pieter Palmers
2009-12-26 14:13 ` Stefan Richter
2009-12-26 14:33 ` Stefan Richter
2010-01-23 14:51 ` Stefan Richter [this message]
2010-01-24 15:45 ` [PATCH] firewire: core: fix use-after-free regression in FCP handler Stefan Richter
2009-12-26 0:34 ` [PATCH 2/5] firewire: cdev: fix another memory leak in an error path Stefan Richter
2009-12-26 0:35 ` [PATCH 3/5] firewire: ohci: always use packet-per-buffer mode for isochronous reception Stefan Richter
2009-12-26 0:36 ` [PATCH 4/5] firewire, ieee1394: update MAINTAINERS entries Stefan Richter
2009-12-26 15:57 ` Dan Dennedy
2009-12-26 0:36 ` [PATCH 5/5] firewire, ieee1394: update Kconfig help Stefan Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B5B0CEB.8060707@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=cladisch@fastmail.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox