Re: [PATCH] Add support for RUMP_USE_LIBC_ALLOCATORS

2020-06-14 Thread Christos Zoulas
In article ,
Kamil Rytarowski   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



[PATCH] Add support for RUMP_USE_LIBC_ALLOCATORS

2020-06-14 Thread Kamil Rytarowski
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.



signature.asc
Description: OpenPGP digital signature