Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Peter Xu
Hi, Peter, Gerd, On Tue, Aug 24, 2021 at 02:01:53PM +0200, Gerd Hoffmann wrote: > Hi, > > > I was vaguely tossing an idea around in the back of my mind > > about whether you could have a flag on devices that marked > > them as "this device is currently involved in IO", such that > > you could

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Stefan Hajnoczi
On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > wrote: > > > > This series aim to kill a recent class of bug, the infamous > > "DMA reentrancy" issues found by Alexander while fuzzing. > > > > Introduce the 'bus_perm' field

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Li Qiang
Gerd Hoffmann 于2021年8月24日周二 下午8:02写道: > > Hi, > > > I was vaguely tossing an idea around in the back of my mind > > about whether you could have a flag on devices that marked > > them as "this device is currently involved in IO", such that > > you could then just fail the last DMA (or

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Gerd Hoffmann
Hi, > I was vaguely tossing an idea around in the back of my mind > about whether you could have a flag on devices that marked > them as "this device is currently involved in IO", such that > you could then just fail the last DMA (or qemu_irq_set, or > whatever) that would complete the loop

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Peter Maydell
On Mon, 23 Aug 2021 at 21:50, Peter Xu wrote: > > On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > > wrote: > > > > > > This series aim to kill a recent class of bug, the infamous > > > "DMA reentrancy" issues found by

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Edgar E. Iglesias
On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > wrote: > > > > This series aim to kill a recent class of bug, the infamous > > "DMA reentrancy" issues found by Alexander while fuzzing. > > > > Introduce the 'bus_perm' field

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Stefan Hajnoczi
On Mon, Aug 23, 2021 at 06:41:52PM +0200, Philippe Mathieu-Daudé wrote: > This series aim to kill a recent class of bug, the infamous > "DMA reentrancy" issues found by Alexander while fuzzing. > > Introduce the 'bus_perm' field in MemTxAttrs, defining 3 bits: > > - MEMTXPERM_UNSPECIFIED

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-24 Thread Philippe Mathieu-Daudé
On 8/24/21 12:26 AM, Alexander Bulekov wrote: > On 210823 1650, Peter Xu wrote: >> On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: >>> On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé >>> wrote: This series aim to kill a recent class of bug, the infamous "DMA

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-23 Thread Alexander Bulekov
On 210823 1650, Peter Xu wrote: > On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > > wrote: > > > > > > This series aim to kill a recent class of bug, the infamous > > > "DMA reentrancy" issues found by Alexander while

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-23 Thread Peter Xu
On Mon, Aug 23, 2021 at 08:10:50PM +0100, Peter Maydell wrote: > On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé > wrote: > > > > This series aim to kill a recent class of bug, the infamous > > "DMA reentrancy" issues found by Alexander while fuzzing. > > > > Introduce the 'bus_perm' field

Re: [RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-23 Thread Peter Maydell
On Mon, 23 Aug 2021 at 17:42, Philippe Mathieu-Daudé wrote: > > This series aim to kill a recent class of bug, the infamous > "DMA reentrancy" issues found by Alexander while fuzzing. > > Introduce the 'bus_perm' field in MemTxAttrs, defining 3 bits: > > - MEMTXPERM_UNSPECIFIED (current default,

[RFC PATCH v2 0/5] physmem: Have flaview API check bus permission from MemTxAttrs argument

2021-08-23 Thread Philippe Mathieu-Daudé
This series aim to kill a recent class of bug, the infamous "DMA reentrancy" issues found by Alexander while fuzzing. Introduce the 'bus_perm' field in MemTxAttrs, defining 3 bits: - MEMTXPERM_UNSPECIFIED (current default, unchanged behavior) - MEMTXPERM_UNRESTRICTED (allow list approach) -