[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 11/12] hw/pci: Only allow PCI slave devices to write to d
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [RFC PATCH 11/12] hw/pci: Only allow PCI slave devices to write to direct memory |
Date: |
Thu, 3 Sep 2020 15:18:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/3/20 2:26 PM, Paolo Bonzini wrote:
> On 03/09/20 13:08, Philippe Mathieu-Daudé wrote:
>> Do not allow PCI slaves to write to indirect memory
>> regions such MMIO.
>>
>> This fixes LP#1886362 and LP#1888606.
>
> What is a "PCI slave"?
TBH I at a quick look at the PCIe SPEC, but not PCI.
PCIe might be able to check the requester_id to check if the
access is valid, but I'm not sure where to add this check.
> Which devices would still be allowed to write?
As of this patch, all the non-PCI, but I plan to add a similar
check for USB on top of this series.
> I'm worried that there are cases of MMIO reads that would be broken.
> They are certainly niche these days, but they should still work; the
> most "famous" one is perhaps the old BASIC
>
> DEF SEG=&HB800
> BLOAD "picture.pic", 0
This looks like ISA stuff. I don't think ISA does such checks
(and didn't plan to add them there) but I'd need to verify.
Do you have an acceptance test?
>
> Paolo
>
- [PATCH 03/12] dma: Let dma_memory_set() take MemTxAttrs argument, (continued)
- [PATCH 03/12] dma: Let dma_memory_set() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 04/12] dma: Let dma_memory_rw_relaxed() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 05/12] dma: Let dma_memory_rw() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 06/12] dma: Let dma_memory_read/write() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 07/12] dma: Let dma_memory_map() take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 08/12] docs/devel/loads-stores: Add regexp for DMA functions, Philippe Mathieu-Daudé, 2020/09/03
- [PATCH 09/12] dma: Let load/store DMA functions take MemTxAttrs argument, Philippe Mathieu-Daudé, 2020/09/03
- [RFC PATCH 10/12] exec/memattrs: Introduce MemTxAttrs::direct_access field, Philippe Mathieu-Daudé, 2020/09/03
- [RFC PATCH 11/12] hw/pci: Only allow PCI slave devices to write to direct memory, Philippe Mathieu-Daudé, 2020/09/03
- [RFC PATCH 12/12] dma: Assert when device writes to indirect memory (such MMIO regions), Philippe Mathieu-Daudé, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Laszlo Ersek, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Peter Maydell, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Edgar E. Iglesias, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Paolo Bonzini, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Edgar E. Iglesias, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Paolo Bonzini, 2020/09/03
- Re: [RFC PATCH 00/12] hw: Forbid DMA write accesses to MMIO regions, Edgar E. Iglesias, 2020/09/03