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: <alpine.DEB.2.00.1106101456080.23076@chino.kir.corp.google.com>
Date:	Fri, 10 Jun 2011 15:01:15 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>,
	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	tglx@...utronix.de, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, mel@....ul.ie,
	kamezawa.hiroyu@...fujitsu.com, riel@...hat.com, pavel@....cz
Subject: Re: [PATCH] Make GFP_DMA allocations w/o ZONE_DMA emit a warning
 instead of failing

On Fri, 10 Jun 2011, Russell King - ARM Linux wrote:

> > > > Should one submit a patch adding a warning to GFP_DMA allocations
> > > > w/o ZONE_DMA, or the idea of the original patch is wrong?
> > > 
> > > Linus was far from impressed by the original commit, saying:
> > > | Using GFP_DMA is reasonable in a driver - on platforms where that
> > > | matters, it should allocate from the DMA zone, on platforms where it
> > > | doesn't matter it should be a no-op.
> > > 
> > > So no, not even a warning.
> > > 
> > 
> > Any words of wisdom for users with CONFIG_ZONE_DMA=n that actually use 
> > drivers where they need GFP_DMA?  The page allocator should just silently 
> > return memory from anywhere?
> 
> See Linus' reply.  I quote again "on platforms where it doesn't matter it
> should be a no-op".  If _you_ have a problem with that _you_ need to
> discuss it with _Linus_, not me.  I'm not going to be a middle-man sitting
> between two people with different opinions.
> 

We're talking about two different things.  Linus is saying that if GFP_DMA 
should be a no-op if the hardware doesn't require DMA memory because the 
kernel was correctly compiled without CONFIG_ZONE_DMA.  I'm asking about a 
kernel that was incorrectly compiled without CONFIG_ZONE_DMA and now we're 
returning memory from anywhere even though we actually require GFP_DMA.

If you don't want to form an opinion of your own, then I have no problem 
cc'ing Linus on it.  I don't think he'd object to a

	#ifndef CONFIG_ZONE_DMA
	WARN_ON_ONCE(1, "%s (%d): allocating DMA memory without DMA support -- "
			"enable CONFIG_ZONE_DMA if needed.\n",
			current->comm, current->pid);
	#endif
--
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