Re: [PATCH v3] kasan: fix KASAN unit tests for tag-based KASAN

2020-07-08 Thread Andrey Konovalov
On Mon, Jul 6, 2020 at 1:50 PM Walter Wu wrote: > > We use tag-based KASAN, then KASAN unit tests don't detect out-of-bounds > memory access. They need to be fixed. > > With tag-based KASAN, the state of each 16 aligned bytes of memory is > encoded in one shadow byte and the shadow value is tag

Re: [PATCH v3] kasan: fix KASAN unit tests for tag-based KASAN

2020-07-06 Thread Dmitry Vyukov
On Mon, Jul 6, 2020 at 1:50 PM Walter Wu wrote: > > We use tag-based KASAN, then KASAN unit tests don't detect out-of-bounds > memory access. They need to be fixed. > > With tag-based KASAN, the state of each 16 aligned bytes of memory is > encoded in one shadow byte and the shadow value is tag

[PATCH v3] kasan: fix KASAN unit tests for tag-based KASAN

2020-07-06 Thread Walter Wu
We use tag-based KASAN, then KASAN unit tests don't detect out-of-bounds memory access. They need to be fixed. With tag-based KASAN, the state of each 16 aligned bytes of memory is encoded in one shadow byte and the shadow value is tag of pointer, so we need to read next shadow byte, the shadow