tech-kern archive

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

Re: kasan: monitor pools



Maxime Villard <max%m00nbsd.net@localhost> writes:

> Here is a patch [1] that allows kasan to monitor pools and pool_caches. We
> recycle the existing POOL_REDZONE implementation - which I wrote three years
> ago, and which has never been enabled (not even on DEBUG). With this we can
> detect read/write buffer overflows on all our pools, and in particular, on
> mbufs.
>
> I guess people are fine? Otherwise if we prefer to keep a KASAN-independent
> version of POOL_REDZONE, then we need to enable it under DIAGNOSTIC at least
> for it to be meaningful.

I don't have a particular opinion about keeping vs not, but DIAGNOSTIC
should not include anything that causes significant slowdowns, basically
more than assertions.  I don't want to try to get really quantitative,
but DIAGNOSTIC should run at 95%+ the speed of a regular build, so that
there's no real performance reason to avoid it.

POOL_REDZONE, if kept, sound fine for DEBUG, where slowdowns are ok.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index