[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+fCnZcQEEkpe+OtCYfWZb1nzov0FChQgTF3yuK6=M5bN_YLWA@mail.gmail.com>
Date: Wed, 11 Aug 2021 02:41:22 +0200
From: Andrey Konovalov <andreyknvl@...il.com>
To: Shakeel Butt <shakeelb@...gle.com>
Cc: andrey.konovalov@...ux.dev,
Andrew Morton <akpm@...ux-foundation.org>,
kasan-dev <kasan-dev@...glegroups.com>,
Linux MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/slub, kasan: fix checking page_alloc allocations on free
On Wed, Aug 11, 2021 at 2:18 AM Shakeel Butt <shakeelb@...gle.com> wrote:
>
> On Tue, Aug 10, 2021 at 4:47 PM <andrey.konovalov@...ux.dev> wrote:
> >
> > From: Andrey Konovalov <andreyknvl@...il.com>
> >
> > A fix for stat counters f227f0faf63b ("slub: fix unreclaimable slab stat
> > for bulk free") used page_address(page) as kfree_hook() argument instead
> > of object. While the change is technically correct, it breaks KASAN's
> > ability to detect improper (unaligned) pointers passed to kfree() and
> > causes the kmalloc_pagealloc_invalid_free test to fail.
> >
> > This patch changes free_nonslab_page() to pass object to kfree_hook()
> > instead of page_address(page) as it was before the fix.
> >
> > Fixed: f227f0faf63b ("slub: fix unreclaimable slab stat for bulk free")
> > Signed-off-by: Andrey Konovalov <andreyknvl@...il.com>
>
> The fix is already in the mm tree:
> https://lkml.kernel.org/r/20210802180819.1110165-1-shakeelb@google.com
Ah, I missed this.
Please CC kasan-dev for KASAN-related fixes.
Thanks!
Powered by blists - more mailing lists