Date: Thu, 14 Jul 2016 14:04:48 -0700 From: Arlie Stephens <arlie@worldash.org> To: freebsd-hackers@freebsd.org Subject: Zone Allocator Initialization Question Message-ID: <20160714210448.GA16971@worldash.org>
next in thread | raw e-mail | index | archive | help
Hi Folks, I'm chasing yet another kernel memory corruption in an obsolete version of FreeBSD (8.4 in this case). I expect that it will turn out to be a bug in some local customization, as they usually are. So I'm not looking for help with actually debugging it ;-) What I would like help with is understanding something my instrumentation is reporting, on systems that don't appear to have the problem. In brief, I'm seeing what appears to be uma_zalloc() returning a pointer to a virtual address that does not have PG_SLAB set on the vm_page_t for the corresponding physical page. Most allocations from that zone are fine; I only see one strange one, and that's fairly early in the system lifetime. (It's one of the "struct file" for files opened by init.) Is there some kind of bootstrap situation with the zone allocator, where certain early use zones get their first memory via a path that doesn't mark PG_SLAB? And if so, is there any other way to recognize those addresses as coming from a zone? (My corruption is scribbling on process' fd_ofiles[] arrays, so I'm trying to write a sanity checker, and was really surprised to find a valid-seeming struct file * that didn't appear to have come from the right place.) Thanks in advance for any enlightenment. -- Arlie (Arlie Stephens arlie@worldash.org)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160714210448.GA16971>