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:   Mon, 6 Aug 2018 09:03:35 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Alan Stern <stern@...land.harvard.edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: OHCI: ohci-sm501: complete URBs in BH context

On 08/06/2018 01:37 AM, Christoph Hellwig wrote:
> On Fri, Aug 03, 2018 at 09:01:19PM -0700, Guenter Roeck wrote:
>> Testing an USB drive connected to ohci-sm501 results in a large number
>> of runtime warnings.
> 
> As far as I can tell this driver uses the HCD_LOCAL_MEM feature flag
> for memory declared using dma_declare_coherent_memory.  Unlike the
> mormal dma mapping interfaces this special case can actually be freed
> from interrupt context, and we have a fix for this warning queued
> up in linux-next:
> 
> http://git.infradead.org/users/hch/dma-mapping.git/commitdiff/d27fb99f62af7b79c542d161aa5155ed57271ddc
> 
> That being said I'm generally very unhappy how dma_init_coherent_memory
> turned out.  The idea was to allow device local memory to be hidden
> behind the DMA API, but in general we use it either as a way to declare
> special uncache system memory (which would really be the plaform codes
> job), or as a magic bounce buffer like in the USB code.  I plan to
> eventually untangle this, but it is going to take some time.
> 

Yes, I can confirm that the warning is gone in -next. Problem solved,
except of course there are still the warnings about the missing
coherent_dma_mask.

sm501-usb sm501-usb: SM501 OHCI
sm501-usb sm501-usb: new USB bus registered, assigned bus number 1
WARNING: CPU: 0 PID: 1 at ./include/linux/dma-mapping.h:516 ohci_init+0x194/0x2d8

Is that warning also not warranted for the given use case, or is
the missing mask indeed necessary ? It is easy to add - see
https://lore.kernel.org/patchwork/patch/971411/ - but I do wonder
if that change is appropriate.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ