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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 20 Mar 2007 11:43:56 -0600
From:	"Chris Friesen" <cfriesen@...tel.com>
To:	linux-kernel@...r.kernel.org
Subject: how to purposfully fragment memory?


I'm trying to test code paths dealing with fragmented memory, so I'd 
like to have a simple way to cause fragmented memory in the kernel.  Is 
there any API in the kernel that would let me allocate two contiguous 
pages, then free one of them?


I tried the following, but it triggers an oops in free_page():

unsigned long addr =
	__get_free_pages(GFP_KERNEL|__GFP_NORETRY|__GFP_NOWARN, 1);
if (!addr)
	break;
free_page(addr+4096);


Thanks,

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