tech-kern archive

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

Re: [PATCH] Add support for RUMP_USE_LIBC_ALLOCATORS



In article <c6eaf0ee-592d-8af4-24c5-d5a53064ce1a%netbsd.org@localhost>,
Kamil Rytarowski  <kamil%netbsd.org@localhost> wrote:
>-=-=-=-=-=-
>-=-=-=-=-=-
>
>I propose to add a new option for building rumpkernel:
>RUMP_USE_LIBC_ALLOCATORS.
>
>This option wires the kernel allocators directly to the libc functions.
>This is useful for sanitizers with their fine-grained checks of
>allocated chunks.
>
>http://netbsd.org/~kamil/patch-00268-RUMP_USE_LIBC_ALLOCATORS.2.txt
>
>Does this code and approach look good? Is possible to improve this
>approach? There is a fallout with ATF test t_vm::uvmwait as it no longer
>passes as the memory limit is no longer respected.
>
>With this patch rumpkernel is now more sensitive to real memory access
>bugs. The immediate detected problem is with kthread_join() that
>attempts to join a thread that was freed.
>
>http://netbsd.org/~kamil/rump/heap-use-after-free.txt
>
>We use this patch during the ongoing GSoC so quick merge into src/ is
>wanted.

I think putting the libc allocator versions of the functions in their own
files is better, because this way has too many ifdefs. Perhaps subr_pool
needs to be split for that to be effective. Try that and see if it looks
better...

christos



Home | Main Index | Thread Index | Old Index