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:	Tue, 8 Jan 2013 08:39:24 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jeff Chua <jeff.chua.linux@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: 2nd attempt: help with dma_alloc_coherent() + dma_free_coherent()

On Tue, Jan 8, 2013 at 7:51 AM, Jeff Chua <jeff.chua.linux@...il.com> wrote:
> No response so far ... I'm sure someone know this stuff ...  Thanks, Jeff.
>
> I'm trying to understand how this oops in the diva driver and it's just a
> simple dma_alloc_coherent() followed by dma_free_coherent(), but it oops.
> Why?

Umm. You're using a NULL 'dev' pointer?

iommu_no_mapping() will look if the device is a PCI device, and that's
where it oopses.

Now, it looks like some users "know" that the device doesn't matter
(which is true on some platforms), but that's bogus. The device is how
you even find out what the rules for DMA access are (see for example
dma_set_mask() etc), so giving a NULL device is insane.

              Linus
--
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