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:   Wed, 31 May 2017 17:12:37 +0200
From:   Wolfram Sang <wsa@...-dreams.de>
To:     Vignesh R <vigneshr@...com>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        Peter Chen <peter.chen@....com>, Roger Quadros <rogerq@...com>,
        Alan Stern <stern@...land.harvard.edu>,
        Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Javier Martinez Canillas <javier@....samsung.com>,
        Baoyou Xie <baoyou.xie@...aro.org>,
        Sekhar Nori <nsekhar@...com>, William wu <wulf@...k-chips.com>,
        Arnd Bergmann <arnd@...db.de>,
        Chris Bainbridge <chris.bainbridge@...il.com>,
        Wolfram Sang <wsa-dev@...g-engineering.com>,
        Krzysztof Opasiak <k.opasiak@...sung.com>,
        Felix Hädicke <felixhaedicke@....de>,
        Colin Ian King <colin.king@...onical.com>,
        "open list:USB SUBSYSTEM" <linux-usb@...r.kernel.org>,
        clemens@...isch.de, maksim.salau@...il.com
Subject: Re: [PATCH v3 0/2] usb: Check for DMA capable buffer sanity


> > +/* only works in process context because of stack detection */
> > +static inline bool is_dma_capable_addr(void *addr)
> > +{
> > +	return !(is_vmalloc_or_module_addr(addr) ||
> > +		 object_is_on_stack(addr));
> 
> This does not catch kmap'ed buffers which are not directly DMA'able.
> I would suggest to use virt_addr_valid() instead. Something like:
> 
> 	return (virt_addr_valid(addr) && !object_is_on_stack(addr));

Hehe, here is the part of the commit message I have for this code:

===

Second note: I am not even sure the checks complete (kmapped mem?). But
that just strengthens the argument of having on centralized place IMO :)

===

So, thanks for the heads up!


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ