All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Alexander Gordeev' <agordeev@redhat.com>
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	'Bjorn Helgaas' <bhelgaas@google.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial()
Date: Fri, 4 Jul 2014 09:11:50 +0000	[thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1726C717__37729.5243823484$1404465332$gmane$org@AcuExch.aculab.com> (raw)
In-Reply-To: <20140704085816.GB12247@dhcp-26-207.brq.redhat.com>

From: Alexander Gordeev
...
> > Even if you do that, you ought to write valid interrupt information
> > into the 4th slot (maybe replicating one of the earlier interrupts).
> > Then, if the device does raise the 'unexpected' interrupt you don't
> > get a write to a random kernel location.
> 
> I might be missing something, but we are talking of MSI address space
> here, aren't we? I am not getting how we could end up with a 'write'
> to a random kernel location when a unclaimed MSI vector sent. We could
> only expect a spurious interrupt at worst, which is handled and reported.
> 
> Anyway, as I described in my reply to Bjorn, this is not a concern IMO.

I'm thinking of the following - which might be MSI-X ?
1) Hardware requests some interrupts and tells the host the BAR (and offset)
   where the 'vectors' should be written.
2) To raise an interrupt the hardware uses the 'vector' as the address
   of a normal PCIe write cycle.

So if the hardware requests 4 interrupts, but the driver (believing it
will only use 3) only write 3 vectors, and then the hardware uses the
4th vector it can write to a random location.

Debugging that would be hard!

	David

  reply	other threads:[~2014-07-04  9:13 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-10 13:10 [PATCH 0/3] Add pci_enable_msi_partial() to conserve MSI-related resources Alexander Gordeev
2014-06-10 13:10 ` Alexander Gordeev
2014-06-10 13:10 ` [PATCH 1/3] PCI/MSI: Add pci_enable_msi_partial() Alexander Gordeev
2014-06-10 13:10   ` Alexander Gordeev
     [not found]   ` <4fef62a2e647a7c38e9f2a1ea4244b3506a85e2b.1402405331.git.agordeev-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-23 20:11     ` Alexander Gordeev
2014-06-23 20:11       ` Alexander Gordeev
2014-06-23 20:11       ` Alexander Gordeev
2014-06-23 20:11   ` Alexander Gordeev
2014-07-02 20:22   ` Bjorn Helgaas
2014-07-02 20:22   ` Bjorn Helgaas
2014-07-02 20:22     ` Bjorn Helgaas
2014-07-03  9:20     ` David Laight
2014-07-03  9:20       ` David Laight
2014-07-03  9:20       ` David Laight
2014-07-03  9:20       ` David Laight
2014-07-04  8:58       ` Alexander Gordeev
     [not found]       ` <063D6719AE5E284EB5DD2968C1650D6D1726BF4E-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-07-04  8:58         ` Alexander Gordeev
2014-07-04  8:58           ` Alexander Gordeev
2014-07-04  8:58           ` Alexander Gordeev
2014-07-04  9:11           ` David Laight [this message]
     [not found]           ` <20140704085816.GB12247-hdGaXg0bp3uRXgp2RCiI5R/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-07-04  9:11             ` David Laight
2014-07-04  9:11               ` David Laight
2014-07-04  9:11               ` David Laight
     [not found]               ` <063D6719AE5E284EB5DD2968C1650D6D1726C717-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-07-04  9:54                 ` Alexander Gordeev
2014-07-04  9:54                   ` Alexander Gordeev
2014-07-04  9:54                   ` Alexander Gordeev
2014-07-04  9:54               ` Alexander Gordeev
2014-07-07 19:26             ` Bjorn Helgaas
2014-07-07 19:26               ` Bjorn Helgaas
2014-07-07 19:26               ` Bjorn Helgaas
     [not found]               ` <CAErSpo7QWc35seoMhJA+H1_=MkKWYMdeYG=hT=i1v=iz8d5ezA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-08  8:33                 ` David Laight
2014-07-08  8:33                   ` David Laight
2014-07-08  8:33                   ` David Laight
2014-07-08  8:33                   ` David Laight
2014-07-08  8:33                   ` David Laight
2014-07-08  8:33               ` David Laight
2014-07-07 19:26           ` Bjorn Helgaas
2014-07-03  9:20     ` David Laight
     [not found]     ` <20140702202201.GA28852-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2014-07-04  8:57       ` Alexander Gordeev
2014-07-04  8:57         ` Alexander Gordeev
2014-07-04  8:57         ` Alexander Gordeev
     [not found]         ` <20140704085741.GA12247-hdGaXg0bp3uRXgp2RCiI5R/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-07-07 19:40           ` Bjorn Helgaas
2014-07-07 19:40             ` Bjorn Helgaas
2014-07-07 19:40             ` Bjorn Helgaas
2014-07-07 20:42             ` Alexander Gordeev
2014-07-08 12:26             ` Alexander Gordeev
     [not found]             ` <CAErSpo6f6RXWv0DEtLBZX0jXoSUYJeWrSm7mubSJ_F-O7tQp6w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-07 20:42               ` Alexander Gordeev
2014-07-07 20:42                 ` Alexander Gordeev
2014-07-07 20:42                 ` Alexander Gordeev
2014-07-08 12:26               ` Alexander Gordeev
2014-07-08 12:26                 ` Alexander Gordeev
2014-07-08 12:26                 ` Alexander Gordeev
2014-07-09 16:06                 ` Bjorn Helgaas
     [not found]                 ` <20140708122606.GB6270-hdGaXg0bp3uRXgp2RCiI5R/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2014-07-09 16:06                   ` Bjorn Helgaas
2014-07-09 16:06                     ` Bjorn Helgaas
2014-07-09 16:06                     ` Bjorn Helgaas
     [not found]                     ` <CAErSpo4oiabgoOjsGdWZpCMPnmopK4xRzB2f3tM0AiUFrdhFww-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-10 10:11                       ` Alexander Gordeev
2014-07-10 10:11                         ` Alexander Gordeev
2014-07-10 10:11                         ` Alexander Gordeev
2014-07-10 17:02                         ` Bjorn Helgaas
2014-07-10 17:02                         ` Bjorn Helgaas
2014-07-10 17:02                           ` Bjorn Helgaas
2014-07-10 10:11                     ` Alexander Gordeev
2014-07-07 19:40         ` Bjorn Helgaas
2014-07-04  8:57     ` Alexander Gordeev
2014-07-08  4:01     ` Michael Ellerman
2014-07-08  4:01     ` Michael Ellerman
2014-07-08  4:01       ` Michael Ellerman
2014-06-10 13:10 ` Alexander Gordeev
2014-06-10 13:10 ` [PATCH 2/3] PCI/MSI/x86: Support pci_enable_msi_partial() Alexander Gordeev
2014-06-10 13:10 ` Alexander Gordeev
2014-06-10 13:10 ` [PATCH 3/3] AHCI: Use pci_enable_msi_partial() to conserve on 10/16 MSIs Alexander Gordeev
     [not found]   ` <dba9f0f8e9cccd7625d0f3fab94457482e1a2bd7.1402405331.git.agordeev-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-18 18:54     ` Tejun Heo
2014-06-18 18:54       ` Tejun Heo
2014-06-18 18:54   ` Tejun Heo
2014-06-10 13:10 ` Alexander Gordeev

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='063D6719AE5E284EB5DD2968C1650D6D1726C717__37729.5243823484$1404465332$gmane$org@AcuExch.aculab.com' \
    --to=david.laight@aculab.com \
    --cc=agordeev@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.