xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] x86/msi: Validate the guest-identified PCI devices in pci_prepare_msix()
Date: Wed, 22 Jan 2014 10:28:22 +0000	[thread overview]
Message-ID: <52DF9D46.7030904@citrix.com> (raw)
In-Reply-To: <52DFA2200200007800115B70@nat28.tlf.novell.com>

On 22/01/14 09:49, Jan Beulich wrote:
>>>> On 22.01.14 at 05:31, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
>> See attached (and relevant part inlined).
>> ...
>> (XEN) [2014-01-22 12:27:07] Xen call trace:
>> (XEN) [2014-01-22 12:27:07]    [<ffff82d0801683a2>] msix_capability_init+0x1dc/0x603
>> (XEN) [2014-01-22 12:27:07]    [<ffff82d080168987>] pci_enable_msi+0x1be/0x4d7
>> (XEN) [2014-01-22 12:27:07]    [<ffff82d08016c65c>] map_domain_pirq+0x222/0x5ad
>> (XEN) [2014-01-22 12:27:07]    [<ffff82d08017f104>] physdev_map_pirq+0x507/0x5d1
>> (XEN) [2014-01-22 12:27:07]    [<ffff82d08017f814>] do_physdev_op+0x646/0x119e
>> (XEN) [2014-01-22 12:27:07]    [<ffff82d08022231b>] syscall_enter+0xeb/0x145
>> (XEN) [2014-01-22 12:27:07] 
>> (XEN) [2014-01-22 12:27:07] Pagetable walk from 0000000000000004:
> Considering the similarity, this is surely another incarnation of
> the same issue. Which gets me to ask first of all - is the device
> being acted upon an MSI-X capable one? If not, why is the call
> being made? If so (and Xen thinks differently) that's what
> needs fixing.
>
> On that basis I'm also going to ignore your patch for the first
> problem, Andrew: It's either incomplete or unnecessary or
> fixing the wrong thing.
>
> Jan
>

I am going to go with incomplete - it is certainly not unnecessary.  The
PCI device parameters to pci_prepare_msix() are completely guest
controlled; There is no validation of the SBDF at all.

~Andrew

  reply	other threads:[~2014-01-22 10:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 21:54 Regression compared to Xen 4.3, Xen 4.4-rc2 - pci_prepare_msix+0xb1/0x12 - BOOM Konrad Rzeszutek Wilk
2014-01-22  0:23 ` Andrew Cooper
2014-01-22  0:24   ` [PATCH] x86/msi: Validate the guest-identified PCI devices in pci_prepare_msix() Andrew Cooper
2014-01-22  4:31     ` Konrad Rzeszutek Wilk
2014-01-22  9:49       ` Jan Beulich
2014-01-22 10:28         ` Andrew Cooper [this message]
2014-01-22 12:08           ` Jan Beulich
2014-01-22 21:40             ` Konrad Rzeszutek Wilk
2014-01-23  8:24               ` Jan Beulich
2014-01-24 15:01                 ` Konrad Rzeszutek Wilk
2014-01-24 15:55                   ` Jan Beulich
2014-01-24 16:19                   ` Jan Beulich
2014-01-24 17:43                     ` Konrad Rzeszutek Wilk
2014-01-24 21:56                       ` Is: pci=assign-busses blows up Xen 4.4 Was:Re: " Konrad Rzeszutek Wilk
2014-02-05 20:07                         ` Konrad Rzeszutek Wilk
2014-02-06  9:02                           ` Jan Beulich
2014-02-21 19:18                           ` Konrad Rzeszutek Wilk
2014-02-24  9:15                             ` Is: pci=assign-busses blows up Xen 4.4 Jan Beulich
2014-02-24 16:15                               ` Konrad Rzeszutek Wilk

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=52DF9D46.7030904@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).