[PATCH 20/31] kasan, vmalloc: reset tags in vmalloc functions
Andrey Konovalov
andreyknvl at gmail.com
Mon Dec 6 13:08:04 PST 2021
On Thu, Dec 2, 2021 at 3:17 PM Marco Elver <elver at google.com> wrote:
>
> On Tue, Nov 30, 2021 at 11:07PM +0100, andrey.konovalov at linux.dev wrote:
> > From: Andrey Konovalov <andreyknvl at google.com>
> >
> > In preparation for adding vmalloc support to SW/HW_TAGS KASAN,
> > reset pointer tags in functions that use pointer values in
> > range checks.
> >
> > vread() is a special case here. Resetting the pointer tag in its
> > prologue could technically lead to missing bad accesses to virtual
> > mappings in its implementation. However, vread() doesn't access the
> > virtual mappings cirectly. Instead, it recovers the physical address
>
> s/cirectly/directly/
>
> But this paragraph is a little confusing, because first you point out
> that vread() might miss bad accesses, but then say that it does checked
> accesses. I think to avoid confusing the reader, maybe just say that
> vread() is checked, but hypothetically, should its implementation change
> to directly access addr, invalid accesses might be missed.
>
> Did I get this right? Or am I still confused?
No, you got it right. Will reword in v2.
Thanks!
More information about the linux-arm-kernel
mailing list