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: <20080311150048.4376c73a@mandriva.com.br>
Date:	Tue, 11 Mar 2008 15:00:48 -0300
From:	"Luiz Fernando N. Capitulino" <lcapitulino@...driva.com.br>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org
Subject: Re: [PATCH] [0/13] General DMA zone rework

Em Tue, 11 Mar 2008 18:35:40 +0100
Andi Kleen <andi@...stfloor.org> escreveu:

| On Tue, Mar 11, 2008 at 02:26:24PM -0300, Luiz Fernando N. Capitulino wrote:
| > ===================================================================
| > --- linux-2.6.24.orig/sound/core/memalloc.c
| > +++ linux-2.6.24/sound/core/memalloc.c
| > @@ -218,7 +218,6 @@ static void *snd_malloc_dev_pages(struct
| >  	snd_assert(dma != NULL, return NULL);
| >  	pg = get_order(size);
| >  	gfp_flags = GFP_KERNEL
| > -		| __GFP_COMP	/* compound page lets parts be mapped */
| 
| Oops. Thanks. I'll double check that. mask allocator indeed doesn't
| handle __GFP_COMP and nobody should be passing that into dma_alloc_coherent
| anyways. But the bug you got was for the small size wasn't it?

 No, it triggers the BUG_ON() which checks the gfp, not the one
which checks MASK_MIN_SIZE.

 On the other hand I'm not sure whether it does the right thing
(ie, pass size in bytes instead of order) it does:

"""
pg = get_order(size);
[...]
res = dma_alloc_coherent(dev, PAGE_SIZE << pg, dma, gfp_flags);
if (res != NULL)
	inc_snd_pages(pg);
"""

 Maybe it could be changed to:

"""
res = dma_alloc_coherent(dev, size, dma, gfp_flags);
if (res != NULL)
	inc_snd_pages(get_order(size));
"""

 But sound works (simple tests).

| > ok to reduce the pool to 5MB, right?
| 
| Yes, but not leaving any free over is a little risky, someone might need
| more later. But e.g. going down to 8-9MB would be likely possible.

 Ok.

| The long term plan (but that is some time off and a little vague still) 
| would be to let the various subsystem size the mask zone dynamically for 
| their need.

 That sounds cool.

-- 
Luiz Fernando N. Capitulino
--
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