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: <p73wsq0lw9r.fsf@crumb.suse.de>
Date:	23 Jan 2008 10:35:28 +0100
From:	Andi Kleen <andi@...stfloor.org>
To:	Loïc Grenié <loic.grenie@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: vmalloc_32 and SLAB incompatible in 2.6.23.9

"Loïc Grenié" <loic.grenie@...il.com> writes:

>      Since GFP_DMA32 is not considered a valid flag, vmalloc_32 and
>   SLAB are incompatible in kernel 2.6.23.9 (and probably later ones).
>   It might be as simple as adding GFP_DMA32 everywhere where
>   GFP_DMA is used in mm/slab.c, but I don't dare do it. I personally
>   switched to SLUB.

I don't think it would really work for slub either.

If you look at /proc/slabinfo you see that there are separate DMA
caches. That is because sl[abo]b all cache objects and if the 
objects have different requirements (like GFP_DMA, GFP_DMA32, GFP_KERNEL)
they would need different caches. Otherwise you risk getting
later objects originally allocated with the wrong flags.

To make GFP_DMA32 work would require adding another set of DMA32
caches to all kmalloc caches etc or a separate one for each
custom kmem cache that you use that only gets _DMA32 objects.

Better just use __get_free_pages() directly. 

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