linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
To: Daniel Axtens <dja@axtens.net>,
	kasan-dev@googlegroups.com, linux-mm@kvack.org,
	glider@google.com, linux-kernel@vger.kernel.org,
	dvyukov@google.com
Cc: daniel@iogearbox.net, cai@lca.pw,
	syzbot+82e323920b78d54aaed5@syzkaller.appspotmail.com,
	syzbot+59b7daa4315e07a994f1@syzkaller.appspotmail.com,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 3/3] kasan: don't assume percpu shadow allocations will succeed
Date: Fri, 6 Dec 2019 19:24:31 +0300	[thread overview]
Message-ID: <87172e8f-9698-0805-252f-55f68ee07862@virtuozzo.com> (raw)
In-Reply-To: <20191205140407.1874-3-dja@axtens.net>



On 12/5/19 5:04 PM, Daniel Axtens wrote:
> syzkaller and the fault injector showed that I was wrong to assume
> that we could ignore percpu shadow allocation failures.
> 
> Handle failures properly. Merge all the allocated areas back into the free
> list and release the shadow, then clean up and return NULL. The shadow
> is released unconditionally, which relies upon the fact that the release
> function is able to tolerate pages not being present.
> 
> Also clean up shadows in the recovery path - currently they are not
> released, which leaks a bit of memory.
> 
> Fixes: 3c5c3cfb9ef4 ("kasan: support backing vmalloc space with real shadow memory")
> Reported-by: syzbot+82e323920b78d54aaed5@syzkaller.appspotmail.com
> Reported-by: syzbot+59b7daa4315e07a994f1@syzkaller.appspotmail.com
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Signed-off-by: Daniel Axtens <dja@axtens.net>
> ---

Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>


  reply	other threads:[~2019-12-06 16:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 14:04 [PATCH 1/3] mm: add apply_to_existing_pages helper Daniel Axtens
2019-12-05 14:04 ` [PATCH 2/3] kasan: use apply_to_existing_pages for releasing vmalloc shadow Daniel Axtens
2019-12-06 16:24   ` Andrey Ryabinin
2019-12-05 14:04 ` [PATCH 3/3] kasan: don't assume percpu shadow allocations will succeed Daniel Axtens
2019-12-06 16:24   ` Andrey Ryabinin [this message]
2019-12-06 16:24 ` [PATCH 1/3] mm: add apply_to_existing_pages helper Andrey Ryabinin
2019-12-07  0:37 ` Andrew Morton
2019-12-07  0:38 ` Andrew Morton
2019-12-07  2:16   ` Daniel Axtens
2019-12-09  7:34   ` Christoph Hellwig
2019-12-11  1:31     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87172e8f-9698-0805-252f-55f68ee07862@virtuozzo.com \
    --to=aryabinin@virtuozzo.com \
    --cc=akpm@linux-foundation.org \
    --cc=cai@lca.pw \
    --cc=daniel@iogearbox.net \
    --cc=dja@axtens.net \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=syzbot+59b7daa4315e07a994f1@syzkaller.appspotmail.com \
    --cc=syzbot+82e323920b78d54aaed5@syzkaller.appspotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox