linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	Will Deacon <will@kernel.org>
Subject: Re: arm64 KASAN_HW_TAGS panic on non-MTE hardware on 5.12-rc1
Date: Fri, 5 Mar 2021 17:52:43 +0000	[thread overview]
Message-ID: <20210305175243.GH23855@arm.com> (raw)
In-Reply-To: <20210305175124.GG23855@arm.com>

On Fri, Mar 05, 2021 at 05:51:26PM +0000, Catalin Marinas wrote:
> On Fri, Mar 05, 2021 at 06:27:45PM +0100, Andrey Konovalov wrote:
> > On Fri, Mar 5, 2021 at 6:11 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
> > > Enabling CONFIG_KASAN_HW_TAGS and running the resulting kernel on
> > > non-MTE hardware panics with an undefined STG instruction from
> > > mte_set_mem_tag_range():
> > >
> > > ./scripts/faddr2line vmlinux kasan_unpoison_task_stack+0x18/0x40
> > > kasan_unpoison_task_stack+0x18/0x40:
> > > mte_set_mem_tag_range at arch/arm64/include/asm/mte-kasan.h:71
> > > (inlined by) mte_set_mem_tag_range at arch/arm64/include/asm/mte-kasan.h:56
> > > (inlined by) kasan_unpoison at mm/kasan/kasan.h:363
> > > (inlined by) kasan_unpoison_task_stack at mm/kasan/common.c:72
> > 
> > This is weird. kasan_unpoison_task_stack() is only defined when
> > CONFIG_KASAN_STACK is enabled, which shouldn't be enablable for
> > HW_TAGS.
> 
> CONFIG_KASAN=y
> # CONFIG_KASAN_GENERIC is not set
> CONFIG_KASAN_HW_TAGS=y
> CONFIG_KASAN_STACK=1

From Kconfig:

config KASAN_STACK
	int
	default 1 if KASAN_STACK_ENABLE || CC_IS_GCC
	default 0

and I use gcc.

-- 
Catalin

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

  parent reply	other threads:[~2021-03-05 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 17:11 arm64 KASAN_HW_TAGS panic on non-MTE hardware on 5.12-rc1 Catalin Marinas
2021-03-05 17:27 ` Andrey Konovalov
     [not found]   ` <20210305175124.GG23855@arm.com>
2021-03-05 17:52     ` Catalin Marinas [this message]
2021-03-05 18:36       ` Andrey Konovalov
2021-03-06 12:01         ` Catalin Marinas
2021-03-08 14:56           ` 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=20210305175243.GH23855@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=andreyknvl@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@kernel.org \
    /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).