mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Bernhard Kaindl <bk@suse.de>
Cc: Andi Kleen <ak@suse.de>, Bernhard Kaindl <bkaindl@ffii.org>,
	linux-kernel@vger.kernel.org,
	linux1394-devel@lists.sourceforge.net,
	Thomas Renninger <trenn@suse.de>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH] Early boot debugging via FireWire (ohci1394_dma=early)
Date: Thu, 06 Dec 2007 21:23:41 +0100	[thread overview]
Message-ID: <47585A4D.8060307@s5r6.in-berlin.de> (raw)
In-Reply-To: <alpine.LNX.0.9999-openSUSE-1.0712061936370.21849@jbgna.fhfr.qr>

Bernhard Kaindl wrote:
>    after summing up the discussion on previous patches, I'm now submitting the
> patch below for formal review and adoption on branches for mainline inclusion.

I will look a bit more into the details later; for now I have just a
quick comment on the documentation.

> --- linux-2.6.24-rc4/Documentation/debugging-via-ohci1394.txt
> +++ linux-2.6.24-rc4/Documentation/debugging-via-ohci1394.txt
> @@ -0,0 +1,179 @@
> +
> +  Using physical DMA provided by OHCI-1394 FireWire controllers for debugging
> +  ---------------------------------------------------------------------------
> +
> +Introduction
> +------------

There are some really long sentences in it.
Try to use the "." character more often.  :-)

> +Basically all FireWire controllers which are in use today are compliant
> +to the OHCI-1394 specification which defines the controller to be a PCI
> +bus master which uses DMA to offload data transfers from the CPU and has
> +a "Physical Response Unit" which executes specific requests by employing
> +PCI-Bus master DMA after applying filters defined by the OHCI-1394 driver.
> +
> +Once properly configured, remote machines can send these requests to
> +ask the OHCI-1394 controller to perform read and write requests on
> +physical system memory and, for read requests, send the result of
> +the physical memory read back to the requester.

In other words, the FireWire controller can be configured to work as a
bus bridge between FireWire bus and local bus (PCI or PCIe).

And yes, there are security implications.

[...]
> +The OHCI-1394 drivers in drivers/firewire and drivers/ieee1394 initialize
> +the OHCI-1394 controllers to a working state and can be used to enable
> +physical DMA. By default you only have to load the driver, and physical
> +DMA access will be granted to all remote nodes, but it can be turned off
> +when using the ohci1394 driver.

This is correct for ohci1394, and it's a bug.
http://bugzilla.kernel.org/show_bug.cgi?id=7794

firewire-ohci however implements filtered physical DMA.  The only user
of that is the firewire-sbp2 driver which grants SBP-2 targets access
through the physical response unit.  firewire-ohci has at the moment no
option for either unfiltered physical DMA (as needed by firescope at al,
tracked at http://wiki.linux1394.org/ToDo) nor to completely disable
physical DMA.
-- 
Stefan Richter
-=====-=-=== ==-- --==-
http://arcgraph.de/sr/

  reply	other threads:[~2007-12-06 20:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-10 11:42 What will be in the x86-64/x86 2.6.21 merge Andi Kleen
2007-02-10 13:43 ` [discuss] " Muli Ben-Yehuda
2007-02-10 13:52   ` Andi Kleen
2007-02-10 13:56     ` Muli Ben-Yehuda
2007-02-10 14:03       ` Andi Kleen
2007-02-10 13:51 ` remote debugging via FireWire (was What will be in the x86-64/x86 2.6.21 merge) Stefan Richter
2007-02-10 14:02   ` Andi Kleen
2007-02-10 15:14     ` remote debugging via FireWire Stefan Richter
2007-02-10 15:41       ` Andi Kleen
2007-02-10 19:16         ` Stefan Richter
2007-02-11 21:35           ` Benjamin Herrenschmidt
2007-02-12  6:49             ` Andi Kleen
2007-02-12  7:29               ` Benjamin Herrenschmidt
2007-12-04  3:45   ` remote debugging via FireWire * __fast__ firedump! Bernhard Kaindl
2007-12-04  7:39     ` Andi Kleen
2007-12-06 16:02       ` Bernhard Kaindl
2007-12-04 22:15     ` Stefan Richter
2007-12-04 22:34       ` Stefan Richter
2007-12-04 22:40         ` Stefan Richter
2007-12-06 18:36           ` [feedback discussion] Early boot debugging via FireWire (ohci1394_dma=early) Bernhard Kaindl
2007-12-06 19:23             ` Stefan Richter
2007-12-06 19:23             ` [PATCH] " Bernhard Kaindl
2007-12-06 20:23               ` Stefan Richter [this message]
2007-12-17 13:49               ` Ingo Molnar
2007-12-06 16:32       ` remote debugging via FireWire * __fast__ firedump! Bernhard Kaindl
2007-02-12 14:11 ` What will be in the x86-64/x86 2.6.21 merge James Morris
2007-02-12 14:14   ` Andi Kleen
2007-02-12 14:46     ` James Morris
2007-02-14  6:53     ` Rusty Russell

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=47585A4D.8060307@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=ak@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=bk@suse.de \
    --cc=bkaindl@ffii.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=trenn@suse.de \
    /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

all inboxes | Powered by JetHome®