From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: David Gow <davidgow@google.com>,
Johannes Berg <johannes@sipsolutions.net>,
Patricia Alfonso <trishalfonso@google.com>,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
"anton.ivanov@cambridgegreys.com"
<anton.ivanov@cambridgegreys.com>,
Brendan Higgins <brendanhiggins@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andrey Konovalov <andreyknvl@gmail.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
kasan-dev <kasan-dev@googlegroups.com>,
"linux-um@lists.infradead.org" <linux-um@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Daniel Latypov <dlatypov@google.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"kunit-dev@googlegroups.com" <kunit-dev@googlegroups.com>
Subject: Re: [PATCH v4 2/2] UML: add support for KASAN under x86_64
Date: Thu, 30 Jun 2022 14:54:34 +0200 [thread overview]
Message-ID: <20220630125434.GA20153@axis.com> (raw)
In-Reply-To: <CACT4Y+ZahTu0pGNSdZmx=4ZJHt4=mVuhxQnH_7ykDA5_fBJZVQ@mail.gmail.com>
On Thu, Jun 30, 2022 at 11:41:04AM +0200, Dmitry Vyukov wrote:
> On Thu, 30 Jun 2022 at 10:08, David Gow <davidgow@google.com> wrote:
> > diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
> > index 1c2d4b29a3d4..a089217e2f0e 100644
> > --- a/arch/um/kernel/Makefile
> > +++ b/arch/um/kernel/Makefile
> > @@ -27,6 +27,9 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
> > obj-$(CONFIG_STACKTRACE) += stacktrace.o
> > obj-$(CONFIG_GENERIC_PCI_IOMAP) += ioport.o
> >
> > +KASAN_SANITIZE_stacktrace.o := n
> > +KASAN_SANITIZE_sysrq.o := n
>
> Why are these needed?
> It's helpful to leave some comments for any of *_SANITIZE:=n.
> Otherwise later it's unclear if it's due to some latent bugs, some
> inherent incompatibility, something that can be fixed, etc.
I believe I saw the stacktrace code itself triggering KASAN splats and
causing recursion when sanitization was not disabled on it. I noticed
that other architectures disabled sanitization of their stacktrace code,
eg. ARM in commit 4d576cab16f57e1f87978f ("ARM: 9028/1: disable KASAN in
call stack capturing routines"), so I did not investigate it further.
(Note that despite the name, sysrq.c is also just stacktrace code.)
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
WARNING: multiple messages have this Message-ID (diff)
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: David Gow <davidgow@google.com>,
Johannes Berg <johannes@sipsolutions.net>,
Patricia Alfonso <trishalfonso@google.com>,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
"anton.ivanov@cambridgegreys.com"
<anton.ivanov@cambridgegreys.com>,
Brendan Higgins <brendanhiggins@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andrey Konovalov <andreyknvl@gmail.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
kasan-dev <kasan-dev@googlegroups.com>,
"linux-um@lists.infradead.org" <linux-um@lists.infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Daniel Latypov <dlatypov@google.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"kunit-dev@googlegroups.com" <kunit-dev@googlegroups.com>
Subject: Re: [PATCH v4 2/2] UML: add support for KASAN under x86_64
Date: Thu, 30 Jun 2022 14:54:34 +0200 [thread overview]
Message-ID: <20220630125434.GA20153@axis.com> (raw)
In-Reply-To: <CACT4Y+ZahTu0pGNSdZmx=4ZJHt4=mVuhxQnH_7ykDA5_fBJZVQ@mail.gmail.com>
On Thu, Jun 30, 2022 at 11:41:04AM +0200, Dmitry Vyukov wrote:
> On Thu, 30 Jun 2022 at 10:08, David Gow <davidgow@google.com> wrote:
> > diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
> > index 1c2d4b29a3d4..a089217e2f0e 100644
> > --- a/arch/um/kernel/Makefile
> > +++ b/arch/um/kernel/Makefile
> > @@ -27,6 +27,9 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
> > obj-$(CONFIG_STACKTRACE) += stacktrace.o
> > obj-$(CONFIG_GENERIC_PCI_IOMAP) += ioport.o
> >
> > +KASAN_SANITIZE_stacktrace.o := n
> > +KASAN_SANITIZE_sysrq.o := n
>
> Why are these needed?
> It's helpful to leave some comments for any of *_SANITIZE:=n.
> Otherwise later it's unclear if it's due to some latent bugs, some
> inherent incompatibility, something that can be fixed, etc.
I believe I saw the stacktrace code itself triggering KASAN splats and
causing recursion when sanitization was not disabled on it. I noticed
that other architectures disabled sanitization of their stacktrace code,
eg. ARM in commit 4d576cab16f57e1f87978f ("ARM: 9028/1: disable KASAN in
call stack capturing routines"), so I did not investigate it further.
(Note that despite the name, sysrq.c is also just stacktrace code.)
next prev parent reply other threads:[~2022-06-30 12:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 8:08 [PATCH v4 1/2] mm: Add PAGE_ALIGN_DOWN macro David Gow
2022-06-30 8:08 ` David Gow
2022-06-30 8:08 ` [PATCH v4 2/2] UML: add support for KASAN under x86_64 David Gow
2022-06-30 8:08 ` David Gow
2022-06-30 9:41 ` Dmitry Vyukov
2022-06-30 9:41 ` Dmitry Vyukov
2022-06-30 12:54 ` Vincent Whitchurch [this message]
2022-06-30 12:54 ` Vincent Whitchurch
2022-06-30 13:28 ` Andrey Konovalov
2022-06-30 13:28 ` Andrey Konovalov
2022-07-01 9:08 ` David Gow
2022-07-01 9:08 ` David Gow
2022-07-01 9:16 ` Vincent Whitchurch
2022-07-01 9:16 ` Vincent Whitchurch
2022-07-01 9:43 ` David Gow
2022-07-01 9:43 ` David Gow
2022-07-01 10:04 ` Vincent Whitchurch
2022-07-01 10:04 ` Vincent Whitchurch
2022-07-01 10:34 ` Dmitry Vyukov
2022-07-01 10:34 ` Dmitry Vyukov
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=20220630125434.GA20153@axis.com \
--to=vincent.whitchurch@axis.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=dvyukov@google.com \
--cc=jdike@addtoit.com \
--cc=johannes@sipsolutions.net \
--cc=kasan-dev@googlegroups.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
--cc=ryabinin.a.a@gmail.com \
--cc=trishalfonso@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 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.