On Sat, Jan 28, 2012 at 01:36:05PM +0100, K Macy wrote:
> Il giorno 28/gen/2012, alle ore 09:39, Pawel Jakub Dawidek <p...@freebsd.org> 
> ha scritto:
> > How do you handle the case when there are two small allocations within
> > one page, where one has the NODUMP flag and one doesn't have the flag?
> 
> Kmem_alloc and zone creation both work at granularities greater than or equal 
> to a page. The per-page management of dump is why this flag is not available 
> to generic malloc.

Hmm, kmem_alloc() in ZFS code is just a wrapper around generic
malloc(9). You only added NODUMP flag for zio_data_buf_alloc(), but I
think you can pass sizes smaller than eg. 4kB to that function (starting
from SPA_MINBLOCKSIZE, which is 512 bytes). How can you tell some other
ZFS code that uses kmem_alloc() won't share the same page as small ZIO
buffer?

I'd like to use that flag with GELI with generic malloc(9). How can I do
that? Maybe defining this property at MALLOC_DEFINE() time for the
entire malloc type would be better? I could then use two separate malloc
types in GELI: one for sensitive data and one for other data.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl

Attachment: pgpW5Tz4dvsLx.pgp
Description: PGP signature

Reply via email to