Re: usb zero copy dma handling

2019-08-08 Thread Russell King - ARM Linux admin
On Thu, Aug 08, 2019 at 09:10:15AM -0700, Christoph Hellwig wrote: > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > wrote: > > --- a/drivers/usb/core/devio.c > > +++ b/drivers/usb/core/devio.c > > @@ -238,9 +238,14 @@ static int usbdev_mmap(struct file *file, struct >

Re: usb zero copy dma handling

2019-08-08 Thread Christoph Hellwig
On Thu, Aug 08, 2019 at 09:10:15AM -0700, Christoph Hellwig wrote: > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > wrote: > > --- a/drivers/usb/core/devio.c > > +++ b/drivers/usb/core/devio.c > > @@ -238,9 +238,14 @@ static int usbdev_mmap(struct file *file, struct >

Re: usb zero copy dma handling

2019-08-08 Thread Christoph Hellwig
On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: > --- a/drivers/usb/core/devio.c > +++ b/drivers/usb/core/devio.c > @@ -238,9 +238,14 @@ static int usbdev_mmap(struct file *file, struct > vm_area_struct *vma) > usbm->vma_use_count = 1; > INIT_LIST_HEAD(&

Re: usb zero copy dma handling

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 12:07:26PM +0200, Greg KH wrote: > On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: > > On 2019-08-08 9:58 am, Greg KH wrote: > > > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > > > wrote: > > > > Hello linux-usb and linux-arm. > >

Re: usb zero copy dma handling

2019-08-08 Thread Robin Murphy
On 2019-08-08 11:07 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: On 2019-08-08 9:58 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: Hello linux-usb and linux-arm. Ccing security@ because "the kernel dma cod

Re: usb zero copy dma handling

2019-08-08 Thread Oliver Neukum
Am Donnerstag, den 08.08.2019, 10:59 +0100 schrieb Russell King - ARM Linux admin: > On Thu, Aug 08, 2019 at 10:58:11AM +0200, Greg KH wrote: > > But the main issue here is what exactly is this "fixing"? What is wrong > > with the existing code that non-x86 systems have such a problem with? > > Sh

Re: usb zero copy dma handling

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 10:46:24AM +0100, Robin Murphy wrote: > On 2019-08-08 9:58 am, Greg KH wrote: > > On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org > > wrote: > > > Hello linux-usb and linux-arm. > > > > > > Ccing security@ because "the kernel dma code is mapping ra

Re: usb zero copy dma handling

2019-08-08 Thread Russell King - ARM Linux admin
On Thu, Aug 08, 2019 at 10:58:11AM +0200, Greg KH wrote: > But the main issue here is what exactly is this "fixing"? What is wrong > with the existing code that non-x86 systems have such a problem with? > Shouldn't all of these dma issues be handled by the platform with the > remap_pfn_range() cal

Re: usb zero copy dma handling

2019-08-08 Thread Robin Murphy
On 2019-08-08 9:58 am, Greg KH wrote: On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: Hello linux-usb and linux-arm. Ccing security@ because "the kernel dma code is mapping randomish kernel/user mem to a user process" seems to have security implications even thou

Re: usb zero copy dma handling

2019-08-08 Thread Greg KH
On Thu, Aug 08, 2019 at 10:46:36AM +0200, yvahkhfo.1df7f...@hashmail.org wrote: > Hello linux-usb and linux-arm. > > Ccing security@ because "the kernel dma code is mapping randomish > kernel/user mem to a user process" seems to have security implications > even though i didnt research that aspect