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]
Message-ID: <20101025142232.GC2414@tuxdriver.com>
Date:	Mon, 25 Oct 2010 10:22:32 -0400
From:	"John W. Linville" <linville@...driver.com>
To:	Hin-Tak Leung <htl10@...rs.sourceforge.net>
Cc:	Larry Finger <Larry.Finger@...inger.net>,
	Serafeim Zanikolas <sez@...ian.org>, herton@...driva.com.br,
	joe@...ches.com, davem@...emloft.net,
	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: rtl818x: request DMA-able memory

On Mon, Oct 25, 2010 at 03:11:22PM +0100, Hin-Tak Leung wrote:
> 
> 
> Larry Finger wrote:
> >On 10/24/2010 03:32 PM, Serafeim Zanikolas wrote:
> >>Despite the indicated intention in comment, the kmalloc() call was not
> >>explicitly requesting memory from ZONE_DMA.
> >>
> >>Signed-off-by: Serafeim Zanikolas <sez@...ian.org>
> >>---
> >> drivers/net/wireless/rtl818x/rtl8187_dev.c |    3 ++-
> >> 1 files changed, 2 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
> >>index 38fa824..771794d 100644
> >>--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
> >>+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
> >>@@ -1343,7 +1343,8 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
> >> 	priv->is_rtl8187b = (id->driver_info == DEVICE_RTL8187B);
> >> 	/* allocate "DMA aware" buffer for register accesses */
> >>-	priv->io_dmabuf = kmalloc(sizeof(*priv->io_dmabuf), GFP_KERNEL);
> >>+	priv->io_dmabuf = kmalloc(sizeof(*priv->io_dmabuf),
> >>+				  GFP_DMA | GFP_KERNEL);
> >> 	if (!priv->io_dmabuf) {
> >> 		err = -ENOMEM;
> >> 		goto err_free_dev;
> >
> >ACK.
> >
> >Larry
> 
> Acked-by: Hin-Tak Leung <htl10@...rs.sourceforge.net>
> 
> I had a quick look for similiar constructs and AFAIK only the
> b43/b43legacy drivers uses DMA buffers. Seems to be a rare practice.
> Is that something we should or should not do?

It doesn't mean what you think it means.  It is a relic of the past,
used to indicate memory below 16MB so that ISA devices could do DMA.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@...driver.com			might be all we have.  Be ready.
--
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