RE: [RFC 02/20] vfio: Add device class for /dev/vfio/devices

2021-11-02 Thread Liu, Yi L
> From: Jason Gunthorpe > Sent: Monday, November 1, 2021 8:50 PM > > On Fri, Oct 29, 2021 at 09:47:27AM +, Liu, Yi L wrote: > > Hi Jason, > > > > > From: Jason Gunthorpe > > > Sent: Monday, October 25, 2021 8:53 PM > > > > > > On Mon, Oct 25, 2021 at 06:28:09AM +, Liu, Yi L wrote: > > >

Re: [PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING

2021-11-02 Thread Walter Wu
Hi Christoph, I am sorry, fix my typo. Walter On Tue, 2021-11-02 at 07:41 +0100, Christoph Hellwig wrote: > As others pointed out, DMA_ATTR_NO_KERNEL_MAPPING just means the > caller can't rely on a kernel mapping. So the "fix" here is > wrong. That being said for cases where we can easily

Re: [PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING

2021-11-02 Thread Walter Wu
Hi Cristoph, On Tue, 2021-11-02 at 07:41 +0100, Christoph Hellwig wrote: > As others pointed out, DMA_ATTR_NO_KERNEL_MAPPING just means the > caller can't rely on a kernel mapping. So the "fix" here is > wrong. That being said for cases where we can easily remove a page > from the kernel

Re: [PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING

2021-11-02 Thread Christoph Hellwig
On Tue, Nov 02, 2021 at 11:21:16AM +0800, Walter Wu wrote: > Our platform is arch64. We need a dynamic allocated buffer from CMA is > not to read by CPU peculative execution, so we need to remove its > kernel mapping. If your CPU speculates into unused kernel direct mappings your have a worse

Re: [PATCH] dma-direct: fix DMA_ATTR_NO_KERNEL_MAPPING

2021-11-02 Thread Christoph Hellwig
As others pointed out, DMA_ATTR_NO_KERNEL_MAPPING just means the caller can't rely on a kernel mapping. So the "fix" here is wrong. That being said for cases where we can easily remove a page from the kernel mapping it would be nice to do to: a) improve security b) as a debug check to see