Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Yunseong Kim <ysk@kzalloc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	James Morse <james.morse@arm.com>,
	Yeoreum Yun <yeoreum.yun@arm.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Andrey Konovalov <andreyknvl@gmail.com>,
	Marc Zyngier <maz@kernel.org>, Mark Brown <broonie@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	Ard Biesheuvel <ardb@kernel.org>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com
Subject: Re: [PATCH] arm64: cpufeature: Don't cpu_enable_mte() when KASAN_GENERIC is active
Date: Fri, 10 Oct 2025 13:29:30 +0100	[thread overview]
Message-ID: <aOj8KsntbVPRNBKL@willie-the-truck> (raw)
In-Reply-To: <2b8e3ca5-1645-489c-9d7f-dd13e5fc43ed@kzalloc.com>

On Thu, Oct 09, 2025 at 08:10:53AM +0900, Yunseong Kim wrote:
> To summarize my situation, I thought the boot panic issue might be due
> to incompatibility between MTE and KASAN Generic, so I sent this patch.
> 
> However, it seems that the problem is related to the call path involving
> ZERO page. Also, I am curious how it works correctly in other machine.
> 
> On 10/9/25 7:28 AM, Yunseong Kim wrote:
> > Hi Andrey,
> > 
> > On 10/9/25 6:36 AM, Andrey Konovalov wrote:
> >> On Wed, Oct 8, 2025 at 11:13 PM Yunseong Kim <ysk@kzalloc.com> wrote:
> >>> [...]
> >> I do not understand this. Why is Generic KASAN incompatible with MTE?
> > 
> > My board wouldn't boot on the debian debug kernel, so I enabled
> > earlycon=pl011,0x40d0000 and checked via the UART console.
> > 
> >> Running Generic KASAN in the kernel while having MTE enabled (and e.g.
> >> used in userspace) seems like a valid combination.
> > 
> > Then it must be caused by something else. Thank you for letting me know.
> > 
> > It seems to be occurring in the call path as follows:
> > 
> > cpu_enable_mte()
> >  -> try_page_mte_tagging(ZERO_PAGE(0))
> >    -> VM_WARN_ON_ONCE(folio_test_hugetlb(page_folio(page)));
> > 
> >  https://elixir.bootlin.com/linux/v6.17/source/arch/arm64/include/asm/mte.h#L83
> 
>  -> page_folio(ZERO_PAGE(0))
>   -> (struct folio *)_compound_head(ZERO_PAGE(0))
> 
>  https://elixir.bootlin.com/linux/v6.17/source/include/linux/page-flags.h#L307

Do you have:

https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=f620d66af3165838bfa845dcf9f5f9b4089bf508

?

Will


  reply	other threads:[~2025-10-10 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08 21:04 [PATCH] arm64: cpufeature: Don't cpu_enable_mte() when KASAN_GENERIC is active Yunseong Kim
2025-10-08 21:36 ` Andrey Konovalov
2025-10-08 22:28   ` Yunseong Kim
2025-10-08 23:10     ` Yunseong Kim
2025-10-10 12:29       ` Will Deacon [this message]
2025-10-10 14:56         ` Yunseong Kim

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=aOj8KsntbVPRNBKL@willie-the-truck \
    --to=will@kernel.org \
    --cc=andreyknvl@gmail.com \
    --cc=ardb@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=james.morse@arm.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.com \
    --cc=yeoreum.yun@arm.com \
    --cc=ysk@kzalloc.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