linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux.com>,
	 Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	 Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] slab: store tagged freelist for off-slab slabmgmt
Date: Wed, 03 Apr 2019 09:07:50 -0400	[thread overview]
Message-ID: <1554296870.26196.32.camel@lca.pw> (raw)
In-Reply-To: <CAAeHK+y25S6GYMrGUEQJJ5AU1LZ7T-jWrwoDsLXdxuk_E+q5BQ@mail.gmail.com>

On Wed, 2019-04-03 at 13:23 +0200, Andrey Konovalov wrote:
> On Wed, Apr 3, 2019 at 4:29 AM Qian Cai <cai@lca.pw> wrote:
> > 
> > The commit 51dedad06b5f ("kasan, slab: make freelist stored without
> > tags") calls kasan_reset_tag() for off-slab slab management object
> > leading to freelist being stored non-tagged. However, cache_grow_begin()
> > -> alloc_slabmgmt() -> kmem_cache_alloc_node() which assigns a tag for
> > the address and stores in the shadow address. As the result, it causes
> > endless errors below during boot due to drain_freelist() ->
> > slab_destroy() -> kasan_slab_free() which compares already untagged
> > freelist against the stored tag in the shadow address. Since off-slab
> > slab management object freelist is such a special case, so just store it
> > tagged. Non-off-slab management object freelist is still stored untagged
> > which has not been assigned a tag and should not cause any other
> > troubles with this inconsistency.
> 
> Hi Qian,
> 
> Could you share the config (or other steps) you used to reproduce this?

https://git.sr.ht/~cai/linux-debug/blob/master/config

Additional command-line option to boot:

page_poison=on crashkernel=768M earlycon page_owner=on numa_balancing=enable
systemd.unified_cgroup_hierarchy=1 debug_guardpage_minorder=1


  reply	other threads:[~2019-04-03 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03  2:28 [PATCH] slab: store tagged freelist for off-slab slabmgmt Qian Cai
2019-04-03 11:23 ` Andrey Konovalov
2019-04-03 13:07   ` Qian Cai [this message]
2019-04-03 16:39     ` Andrey Konovalov

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=1554296870.26196.32.camel@lca.pw \
    --to=cai@lca.pw \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=cl@linux.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.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;
as well as URLs for NNTP newsgroup(s).