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] [day] [month] [year] [list]
Message-ID: <20130607095013.GU18614@n2100.arm.linux.org.uk>
Date:	Fri, 7 Jun 2013 10:50:13 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Alessandro Rubini <rubini@...dd.com>
Cc:	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	jslaby@...e.cz, linux-serial@...r.kernel.org, x86@...nel.org,
	tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
	Chanho Min <chanho.min@....com>,
	Giancarlo Asnaghi <giancarlo.asnaghi@...com>
Subject: Re: amba pl011: where to submit a fix for x86 builds

On Fri, Jun 07, 2013 at 11:38:54AM +0200, Alessandro Rubini wrote:
> Hello.
> This is cc'd to $(get_maintainer.pl -f drivers/tty/serial/amba-pl011.c)
> and x86 maintainers too.
> 
> While working on the pci-to-amba bridge driver (to be resubmitted in
> the next days) I have to deal with the problem of pl011 not building,
> after phys_to_page was introduced, by Chanho Min (Cc: here) in commit
> 
>    cb06ff1 ARM: PL011: Add support for Rx DMA buffer polling.
> 
> because x86 has no phys_to_page.
> 
> The fix I use is trivially this:
> 
>   -       sg_set_page(&sg->sg, phys_to_page(dma_addr),
>   +       sg_set_page(&sg->sg, virt_to_page(sg->buf),
> 
> (virt_to_page is slower, but other sg_get_page() users do the same
> and other solutions are more convoluted).

... and thereby breaks ARM, because sg->buf is not part of the kernel
direct mapped RAM region.

I don't think there's a portable way to do the above, because the DMA
coherent API doesn't really support translating the allocated memory
region to a struct page pointer.
--
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