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, 25 Mar 2011 11:12:37 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
	linux-arch@...r.kernel.org, Matthew Evans <matt.evans@....ibm.com>
Subject: Re: [BUG] pgprot_noncached() is -NOT- safe for mapping vmalloc buffers into userspace

At Fri, 25 Mar 2011 20:15:33 +1100,
Benjamin Herrenschmidt wrote:
> 
> > > We
> > > must also make sure we don't go down that path for vmalloc memory
> > > though.
> >
> > Yes.
> 
> I haven't actually checked, but I assume that the test
> 
> substream->dma_buffer.dev.type == SNDRV_DMA_TYPE_DEV
> 
> In snd_pcm_default_mmap() takes care of that, please correct me if
> I'm wrong in which case we'll need something else there.

Well, in the case of usb-audio, it's not handled via
dma_mmap_coherent(), as the page isn't allocated via
dma_alloc_coherent() but vmalloc().

The bad commit was to overcome some problems on SH platform, IIRC,
when it's used with dmix -- i.e. concurrent accesses on the mmapped
buffer from multiple processes.  But, this looks obviously like a
wrong approach.

Actually, the buffer allocated there in usb-audio is an intermediate
buffer, that isn't directly transferred to hardware.  We may need a
bit more consideration what is the best way to solve that issue (if
it's still really present).

> > Your patch looks good.  Thanks for taking care of this! 
> 
> Are you taking care of sending it upstream ?

I'll apply the patch to remove vmalloc pgprot thingy surely to sound
tree and include in the next pull request.

Others should be sent through arch maintainers (PPC and ARM), right?


thanks,

Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ