All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: David Gow <davidgow@google.com>,
	Vincent Whitchurch <vincent.whitchurch@axis.com>,
	Patricia Alfonso <trishalfonso@google.com>,
	Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	anton.ivanov@cambridgegreys.com,
	Brendan Higgins <brendanhiggins@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	linux-um@lists.infradead.org, LKML <linux-kernel@vger.kernel.org>,
	Daniel Latypov <dlatypov@google.com>
Subject: Re: [RFC PATCH v3] UML: add support for KASAN under x86_64
Date: Fri, 27 May 2022 15:52:12 +0200	[thread overview]
Message-ID: <CACT4Y+aH7LqDUqAyQ7+hkyeZTtkYnMHia73M7=EeAzMYzJ8pQg@mail.gmail.com> (raw)
In-Reply-To: <134957369d2e0abf51f03817f1e4de7cbf21f76e.camel@sipsolutions.net>

On Fri, 27 May 2022 at 15:27, Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Fri, 2022-05-27 at 15:18 +0200, Dmitry Vyukov wrote:
> > On Fri, 27 May 2022 at 15:15, Johannes Berg <johannes@sipsolutions.net> wrote:
> > >
> > > On Fri, 2022-05-27 at 15:09 +0200, Dmitry Vyukov wrote:
> > > > > I did note (this is more for kasan-dev@) that the "freed by" is fairly
> > > > > much useless when using kfree_rcu(), it might be worthwhile to annotate
> > > > > that somehow, so the stack trace is recorded by kfree_rcu() already,
> > > > > rather than just showing the RCU callback used for that.
> > > >
> > > > KASAN is doing it for several years now, see e.g.:
> > > > https://groups.google.com/g/syzkaller-bugs/c/eTW9zom4O2o/m/_v7cOo2RFwAJ
> > > >
> > >
> > > Hm. It didn't for me:
> >
> > Please post a full report with line numbers and kernel version.
>
> That was basically it, apart from a few lines snipped from the stack
> traces. Kernel version was admittedly a little older - 5.18.0-rc1 + a
> few UML fixes + this KASAN patch (+ the fixes I pointed out earlier)
>
> I guess it doesn't really matter that much, just had to dig a bit to
> understand why it was freed.

Humm... I don't have any explanation based only on this info.
Generally call_rcu stacks are memorized and I see the call is still there:
https://elixir.bootlin.com/linux/v5.18/source/kernel/rcu/tree.c#L3595
It may be caused by some narrow races, depleted reserve memory in
stackdepot, or race with quarantine eviction.

WARNING: multiple messages have this Message-ID (diff)
From: Dmitry Vyukov <dvyukov@google.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: David Gow <davidgow@google.com>,
	Vincent Whitchurch <vincent.whitchurch@axis.com>,
	Patricia Alfonso <trishalfonso@google.com>,
	Jeff Dike <jdike@addtoit.com>,
	Richard Weinberger <richard@nod.at>,
	anton.ivanov@cambridgegreys.com,
	Brendan Higgins <brendanhiggins@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	linux-um@lists.infradead.org, LKML <linux-kernel@vger.kernel.org>,
	Daniel Latypov <dlatypov@google.com>
Subject: Re: [RFC PATCH v3] UML: add support for KASAN under x86_64
Date: Fri, 27 May 2022 15:52:12 +0200	[thread overview]
Message-ID: <CACT4Y+aH7LqDUqAyQ7+hkyeZTtkYnMHia73M7=EeAzMYzJ8pQg@mail.gmail.com> (raw)
In-Reply-To: <134957369d2e0abf51f03817f1e4de7cbf21f76e.camel@sipsolutions.net>

On Fri, 27 May 2022 at 15:27, Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Fri, 2022-05-27 at 15:18 +0200, Dmitry Vyukov wrote:
> > On Fri, 27 May 2022 at 15:15, Johannes Berg <johannes@sipsolutions.net> wrote:
> > >
> > > On Fri, 2022-05-27 at 15:09 +0200, Dmitry Vyukov wrote:
> > > > > I did note (this is more for kasan-dev@) that the "freed by" is fairly
> > > > > much useless when using kfree_rcu(), it might be worthwhile to annotate
> > > > > that somehow, so the stack trace is recorded by kfree_rcu() already,
> > > > > rather than just showing the RCU callback used for that.
> > > >
> > > > KASAN is doing it for several years now, see e.g.:
> > > > https://groups.google.com/g/syzkaller-bugs/c/eTW9zom4O2o/m/_v7cOo2RFwAJ
> > > >
> > >
> > > Hm. It didn't for me:
> >
> > Please post a full report with line numbers and kernel version.
>
> That was basically it, apart from a few lines snipped from the stack
> traces. Kernel version was admittedly a little older - 5.18.0-rc1 + a
> few UML fixes + this KASAN patch (+ the fixes I pointed out earlier)
>
> I guess it doesn't really matter that much, just had to dig a bit to
> understand why it was freed.

Humm... I don't have any explanation based only on this info.
Generally call_rcu stacks are memorized and I see the call is still there:
https://elixir.bootlin.com/linux/v5.18/source/kernel/rcu/tree.c#L3595
It may be caused by some narrow races, depleted reserve memory in
stackdepot, or race with quarantine eviction.

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


  reply	other threads:[~2022-05-27 13:52 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  0:46 [PATCH] UML: add support for KASAN under x86_64 Patricia Alfonso
2020-02-26  0:46 ` Patricia Alfonso
2020-02-26  1:19 ` Brendan Higgins
2020-02-26  1:19   ` Brendan Higgins
2020-02-26 15:24 ` Dmitry Vyukov
2020-02-26 15:24   ` Dmitry Vyukov
2020-03-06  0:03 ` Patricia Alfonso
2020-03-06  0:03   ` Patricia Alfonso
2020-03-11 10:32   ` Johannes Berg
2020-03-11 10:32     ` Johannes Berg
2020-03-11 10:46     ` Dmitry Vyukov
2020-03-11 10:46       ` Dmitry Vyukov
2020-03-11 11:18     ` Johannes Berg
2020-03-11 11:18       ` Johannes Berg
2020-03-11 11:40       ` Johannes Berg
2020-03-11 11:40         ` Johannes Berg
2020-03-11 17:34       ` Dmitry Vyukov
2020-03-11 17:34         ` Dmitry Vyukov
2020-03-20 13:39         ` Johannes Berg
2020-03-20 13:39           ` Johannes Berg
2020-03-20 15:18           ` Dmitry Vyukov
2020-03-20 15:18             ` Dmitry Vyukov
2020-03-30  7:43             ` Johannes Berg
2020-03-30  7:43               ` Johannes Berg
2020-03-30  8:38               ` Dmitry Vyukov
2020-03-30  8:38                 ` Dmitry Vyukov
2020-03-30  8:41                 ` Johannes Berg
2020-03-30  8:41                   ` Johannes Berg
2020-03-31  6:14                   ` David Gow
2020-03-31  6:14                     ` David Gow
2020-03-31  7:43                     ` Johannes Berg
2020-03-31  7:43                       ` Johannes Berg
2020-03-31 16:39                   ` Patricia Alfonso
2020-03-31 16:39                     ` Patricia Alfonso
2020-03-31 16:54                     ` Richard Weinberger
2020-03-11 22:32     ` Patricia Alfonso
2020-03-11 22:32       ` Patricia Alfonso
2020-03-11 22:44       ` Johannes Berg
2020-03-11 22:44         ` Johannes Berg
2022-05-24 10:34         ` Vincent Whitchurch
2022-05-24 10:34           ` Vincent Whitchurch
2022-05-24 10:45           ` Johannes Berg
2022-05-24 10:45             ` Johannes Berg
2022-05-24 19:35           ` David Gow
2022-05-24 19:35             ` David Gow
2022-05-25 11:17             ` Vincent Whitchurch
2022-05-25 11:17               ` Vincent Whitchurch
2022-05-26  1:01               ` [RFC PATCH v3] " David Gow
2022-05-26  1:01                 ` David Gow
2022-05-26  9:29                 ` Johannes Berg
2022-05-26  9:29                   ` Johannes Berg
2022-05-27  5:31                 ` Dmitry Vyukov
2022-05-27  5:31                   ` Dmitry Vyukov
2022-05-27  7:32                   ` Johannes Berg
2022-05-27  7:32                     ` Johannes Berg
2022-05-27 10:36                 ` Johannes Berg
2022-05-27 10:36                   ` Johannes Berg
2022-05-27 13:05                 ` Johannes Berg
2022-05-27 13:05                   ` Johannes Berg
2022-05-27 13:09                   ` Dmitry Vyukov
2022-05-27 13:09                     ` Dmitry Vyukov
2022-05-27 13:15                     ` Johannes Berg
2022-05-27 13:15                       ` Johannes Berg
2022-05-27 13:18                       ` Dmitry Vyukov
2022-05-27 13:18                         ` Dmitry Vyukov
2022-05-27 13:27                         ` Johannes Berg
2022-05-27 13:27                           ` Johannes Berg
2022-05-27 13:52                           ` Dmitry Vyukov [this message]
2022-05-27 13:52                             ` Dmitry Vyukov
2022-05-27 14:27                             ` Johannes Berg
2022-05-27 14:27                               ` Johannes Berg
2022-05-27 15:46                               ` Dmitry Vyukov
2022-05-27 15:46                                 ` Dmitry Vyukov
2020-03-29 19:06     ` [PATCH] " Richard Weinberger
2020-03-29 19:06       ` Richard Weinberger

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='CACT4Y+aH7LqDUqAyQ7+hkyeZTtkYnMHia73M7=EeAzMYzJ8pQg@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=jdike@addtoit.com \
    --cc=johannes@sipsolutions.net \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=trishalfonso@google.com \
    --cc=vincent.whitchurch@axis.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.