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: <20141202144551.GJ3156@suse.de>
Date:	Tue, 2 Dec 2014 15:45:51 +0100
From:	Joerg Roedel <jroedel@...e.de>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:	Joerg Roedel <joro@...tes.org>, Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] x86, swiotlb: Try coherent allocations with
 __GFP_NOWARN

On Mon, Dec 01, 2014 at 03:28:54PM -0500, Konrad Rzeszutek Wilk wrote:
> On Fri, Nov 28, 2014 at 12:29:08PM +0100, Joerg Roedel wrote:
> > diff --git a/arch/x86/kernel/pci-swiotlb.c b/arch/x86/kernel/pci-swiotlb.c
> > index 77dd0ad..79b2291 100644
> > --- a/arch/x86/kernel/pci-swiotlb.c
> > +++ b/arch/x86/kernel/pci-swiotlb.c
> > @@ -20,6 +20,14 @@ void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
> >  {
> >  	void *vaddr;
> >  
> > +	/*
> > +	 * When booting a kdump kernel in high memory these allocations are very
> > +	 * likely to fail, as there are by default only 8MB of low memory to
> > +	 * allocate from. So disable the warnings from the allocator when this
> > +	 * happens.  SWIOTLB also implements fall-backs for failed allocations.
> > +	 */
> > +	flags |= __GFP_NOWARN;
> 
> Should this perhaps then have 'if (kdump_kernel)' around it since
> the use-case seems to be kdump related?

Hmm, I don't think this is entirely kdump specific. It can also be
triggered on a non-kdump kernel, it is just much more unlikely. But
maybe I should change the comment to something like:

	/*
	 * Don't print a warning when the first allocation attempt
	 * fails. The swiotlb_alloc_coherent() function will print a
	 * warning when the allocation of DMA memory ultimatly failed.
	 */

This takes the kdump-specifics out of this change (in the end
kdump-kernel loaded high is just a case where this failure is much more
likely).


	Joerg

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