Re: [PATCH 1/5] include/linux: Add instrumented.h infrastructure

From: Alexander Potapenko
Date: Mon Jan 20 2020 - 09:25:39 EST


On Mon, Jan 20, 2020 at 3:19 PM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> This adds instrumented.h, which provides generic wrappers for memory
> access instrumentation that the compiler cannot emit for various
> sanitizers. Currently this unifies KASAN and KCSAN instrumentation. In
> future this will also include KMSAN instrumentation.
>
> Note that, copy_{to,from}_user require special instrumentation,
> providing hooks before and after the access, since we may need to know
> the actual bytes accessed (currently this is relevant for KCSAN, and is
> also relevant in future for KMSAN).
>
> Suggested-by: Arnd Bergmann <arnd@xxxxxxxx>
> Signed-off-by: Marco Elver <elver@xxxxxxxxxx>
Acked-by: Alexander Potapenko <glider@xxxxxxxxxx>