All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: umgwanakikbuti@gmail.com, bigeasy@linutronix.de,
	open list <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"open list:KERNEL SELFTEST FRAMEWORK" 
	<linux-kselftest@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>,
	regressions@lists.linux.dev, Jens Axboe <axboe@kernel.dk>,
	Nitin Gupta <ngupta@vflare.org>
Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140
Date: Wed, 15 Jun 2022 09:47:30 -0700	[thread overview]
Message-ID: <YqoNIgqYl8lWRFTZ@google.com> (raw)
In-Reply-To: <Yqf+PC+cKePAsaNI@google.com>

On Tue, Jun 14, 2022 at 12:19:24PM +0900, Sergey Senozhatsky wrote:
> On (22/06/13 09:49), Minchan Kim wrote:
> > > Many thanks for the tests.
> > > 
> > > Quite honestly I was hoping that the patch would not help :) Well, ok,
> > > we now know that it's mapping area lock and the lockdep part of its
> > > memory is zero-ed out. The question is - "why?" It really should not
> > > be zeroed out.
> > 
> > Ccing Mike and Sebastian who are author/expert of the culprit patch
> > 
> > Naresh found zsmalloc crashed on the testing [1] and confirmed
> > that Sergey's patch[2] fixed the problem.
> > However, I don't understand why we need reinit the local_lock
> > on cpu_up handler[3].
> > 
> > Could you guys shed some light?
> 
> My guess is that it's either something very specific to Naresh's arch/config
> or a bug somewhere, which memset() per-CPU memory. Not sure how to track it
> down. KASAN maybe?
> 
> We certainly don't expect that
> 
> 	static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = {
> 	        .lock   = INIT_LOCAL_LOCK(lock),
> 	};
> 
> would produce un-initialized dep_map. So I guess we start off with a
> valid per-CPU lock, but then it somehow gets zeroed-out.

Yes, I don't think we need to reinitialize the local_lock.

Naresh, we believe the patch Sergey provided for the test
was just band aid to hide the problem.

Could you please try to bisect it?

WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: umgwanakikbuti@gmail.com, bigeasy@linutronix.de,
	open list <linux-kernel@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"open list:KERNEL SELFTEST FRAMEWORK"
	<linux-kselftest@vger.kernel.org>,
	linux-block <linux-block@vger.kernel.org>,
	regressions@lists.linux.dev, Jens Axboe <axboe@kernel.dk>,
	Nitin Gupta <ngupta@vflare.org>
Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140
Date: Wed, 15 Jun 2022 09:47:30 -0700	[thread overview]
Message-ID: <YqoNIgqYl8lWRFTZ@google.com> (raw)
In-Reply-To: <Yqf+PC+cKePAsaNI@google.com>

On Tue, Jun 14, 2022 at 12:19:24PM +0900, Sergey Senozhatsky wrote:
> On (22/06/13 09:49), Minchan Kim wrote:
> > > Many thanks for the tests.
> > > 
> > > Quite honestly I was hoping that the patch would not help :) Well, ok,
> > > we now know that it's mapping area lock and the lockdep part of its
> > > memory is zero-ed out. The question is - "why?" It really should not
> > > be zeroed out.
> > 
> > Ccing Mike and Sebastian who are author/expert of the culprit patch
> > 
> > Naresh found zsmalloc crashed on the testing [1] and confirmed
> > that Sergey's patch[2] fixed the problem.
> > However, I don't understand why we need reinit the local_lock
> > on cpu_up handler[3].
> > 
> > Could you guys shed some light?
> 
> My guess is that it's either something very specific to Naresh's arch/config
> or a bug somewhere, which memset() per-CPU memory. Not sure how to track it
> down. KASAN maybe?
> 
> We certainly don't expect that
> 
> 	static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = {
> 	        .lock   = INIT_LOCAL_LOCK(lock),
> 	};
> 
> would produce un-initialized dep_map. So I guess we start off with a
> valid per-CPU lock, but then it somehow gets zeroed-out.

Yes, I don't think we need to reinitialize the local_lock.

Naresh, we believe the patch Sergey provided for the test
was just band aid to hide the problem.

Could you please try to bisect it?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-15 16:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02  8:49 qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140 Naresh Kamboju
2022-06-02  8:49 ` Naresh Kamboju
2022-06-06 17:36 ` Minchan Kim
2022-06-06 17:36   ` Minchan Kim
2022-06-07  1:21   ` Naresh Kamboju
2022-06-07  1:21     ` Naresh Kamboju
2022-06-07 23:52     ` Minchan Kim
2022-06-07 23:52       ` Minchan Kim
2022-06-08  2:39       ` Sergey Senozhatsky
2022-06-08  2:39         ` Sergey Senozhatsky
2022-06-08  2:42         ` Sergey Senozhatsky
2022-06-08  2:42           ` Sergey Senozhatsky
2022-06-08  2:45           ` Sergey Senozhatsky
2022-06-08  2:45             ` Sergey Senozhatsky
2022-06-08  7:36             ` Sergey Senozhatsky
2022-06-08  7:36               ` Sergey Senozhatsky
2022-06-12 15:26               ` Naresh Kamboju
2022-06-12 15:26                 ` Naresh Kamboju
2022-06-13  7:54                 ` Sergey Senozhatsky
2022-06-13  7:54                   ` Sergey Senozhatsky
2022-06-13 16:49                   ` Minchan Kim
2022-06-13 16:49                     ` Minchan Kim
2022-06-14  3:19                     ` Sergey Senozhatsky
2022-06-14  3:19                       ` Sergey Senozhatsky
2022-06-15 16:47                       ` Minchan Kim [this message]
2022-06-15 16:47                         ` Minchan Kim
2022-06-08 20:45           ` Minchan Kim
2022-06-08 20:45             ` Minchan Kim
2022-06-09 11:02             ` Sergey Senozhatsky
2022-06-09 11:02               ` Sergey Senozhatsky

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=YqoNIgqYl8lWRFTZ@google.com \
    --to=minchan@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bigeasy@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=ngupta@vflare.org \
    --cc=regressions@lists.linux.dev \
    --cc=senozhatsky@chromium.org \
    --cc=umgwanakikbuti@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.