LWN.net Logo

Zeroing freed memory

Zeroing freed memory

Posted Nov 14, 2008 15:10 UTC (Fri) by PaXTeam (subscriber, #24616)
In reply to: Zeroing freed memory by Felix_the_Mac
Parent article: /dev/ksm: dynamic memory sharing

> On the face of it that sounds pretty sensible (from a security perspective).
> Why doesn't Linux do it?

PaX has had such a feature for some time, but its performance impact isn't negligible. i have only numbers for an early naive implementation (pages were zeroed twice effectively), the kernel time of kernel compilation went up by some 40%, IIRC, so even assuming the current implementation it's probably not better than 20%. now this is kernel time only, if your workload is mostly userland then you will care a lot less, otherwise you'll have to find out where on the user/kernel scale you fall and decide accordingly if it's worth it.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds