LWN.net Logo

Sanitizing kernel memory

Sanitizing kernel memory

Posted May 28, 2009 18:38 UTC (Thu) by gmaxwell (subscriber, #30048)
In reply to: Sanitizing kernel memory by anton
Parent article: Sanitizing kernel memory

My thought process was the that the writing at free is cheap (especially as you can avoid pulling in anything in from memory or evicting anything from the cache) and that any userspace app that reads memory handed to it by the kernel before writing it is broken. Don't these people have valgrind?

:)


(Log in to post comments)

Sanitizing kernel memory

Posted May 28, 2009 19:09 UTC (Thu) by anton (guest, #25547) [Link]

any userspace app that reads memory handed to it by the kernel before writing it is broken.
If the application writes a byte to a line that's not in cache, current CPUs load (the rest of) the cache line from main memory (write allocate). In a few special cases this read can be avoided, but for ordinary writes it happens.

Sanitizing kernel memory

Posted May 30, 2009 10:10 UTC (Sat) by willezurmacht (guest, #58372) [Link]

"any userspace app that reads memory handed to it by the kernel before writing it is broken. Don't these people have valgrind?"

Or maybe it's an exploit for an information/memory leak bug in the kernel that retrieves your root password and tty buffers contents from memory.

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