Date: Fri, 15 Jul 2016 12:52:35 -0700 From: Arlie Stephens <arlie@worldash.org> To: freebsd-hackers@freebsd.org Subject: Re: Zone Allocator Initialization Question Message-ID: <20160715195235.GA7003@worldash.org> In-Reply-To: <20160714210448.GA16971@worldash.org> References: <20160714210448.GA16971@worldash.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Never mind. This is beautiful code; very easy to follow. I'm now self-educated on zone allocator initialization. If I'd realized it would be this clear, I wouldn't have bothered the list by posting a query. Kudos to the authors. --Arlie On Jul 14 2016, Arlie Stephens wrote: > > 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?20160715195235.GA7003>