Re: [PATCH v2 01/14] kasan: sw_tags: Use arithmetic shift for shadow computation

From: Andrey Konovalov
Date: Tue Mar 18 2025 - 11:36:42 EST


On Fri, Mar 14, 2025 at 4:58 PM Maciej Wieczor-Retman
<maciej.wieczor-retman@xxxxxxxxx> wrote:
>
> >KASAN does nothing to deliberately prevent or detect races. Even if
> >the race leads to an OOB or UAF, KASAN might not be able to detect it.
> >But sometimes it does: if poisoned shadow memory values become visible
> >to the other thread/CPU before it makes a shadow memory value check.
>
> Thanks :)
>
> I've came up with a theoretical issue for the following dense series that might
> happen if there is some racing but I'll have to experiment if it actually
> happens.

As long as it doesn't lead to false positive reports or crashes in the
KASAN runtime - I think it should fine.