tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Additional kmem_alloc debugging

On Thu, Feb 05, 2009 at 10:36:44AM +0000, Mindaugas Rasiukevicius wrote:

> How about adding KMEMORY_DEBUG or similar option?

DEBUG plus the run time setting already covers it. It's not enough?

> > The above tells it to queue up to 60000 pages of unmapped KVA to catch
> > use-after-free type errors. Memory backing a freed item is unmapped and the
> > kernel VA space pushed onto a FIFO. The VA space will not be reused until
> > another 30k items have been freed. Until reused the kernel can catch invalid
> > acceses and panic with a page fault.
> How about adding uvm_kmguard_flush(), which would allow to free all pages in
> the FIFO list? I think it might be useful.

Where would this be called from? I could see it being used in the pagedaemon
but it really should get preference over other allocations.

Home | Main Index | Thread Index | Old Index