lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 05 Feb 2021 14:03:03 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Hans Verkuil <hverkuil@...all.nl>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        "Matwey V. Kornilov" <matwey@....msu.ru>,
        Robert Foss <robert.foss@...aro.org>
Subject: Re: [PATCH] media: pwc: Fix the URB buffer allocation

On Fri, 05 Feb 2021 13:53:21 +0100,
Andrew Lunn wrote:
> 
> On Fri, Feb 05, 2021 at 01:36:43PM +0100, Hans Verkuil wrote:
> > Hi Takashi,
> > 
> > Thank you for this patch, but it clashes with another patch trying to do the same thing
> > that has already been merged in our tree:
> > 
> > https://patchwork.linuxtv.org/project/linux-media/patch/20210104170007.20625-1-matwey@sai.msu.ru/
> > 
> > I do prefer your patch over the one already merged since it is a bit simpler, but
> > shouldn't the calls to dma_sync_single_for_cpu() and dma_sync_single_for_device()
> > in pwc-if.c also use urb->dev->bus->controller?
> > 
> > Also, Matwey's patch uses urb->dev->bus->sysdev instead of urb->dev->bus->controller.
> > How does 'sysdev' relate to 'controller'? I think 'controller' is the right device to
> > use, but either seems to work when I test it with my pwc webcam.
> 
> Hi Hans
> 
> A quick grep in driver/usb show that all but one dma mapping operation
> use sysdev. The one other case uses controller. So the numbers suggest
> controller is wrong, sysdev is correct.

Indeed, looks so.  In most cases, this doesn't matter since both point
to the same device object.  In some cases like xhci-plat HCD, they
differ.  And sysdev  might be a better choice from the consistency
POV.

But this brought an interesting question, too.  eg. USB chipidea
HCD uses platform devices for both controller and sysdev, and I
couldn't find any DMA mask setup.  So, no matter what to use, the uwc
driver would be broken on this...  Maybe it's just not covered.

> But maybe ask GregKH?

To be certain, better to involve with USB people, yeah.


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ