Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org,
	maz@kernel.org, will@kernel.org
Subject: Re: [PATCH] arm64: fix KASAN_INLINE
Date: Fri, 15 Jul 2022 17:49:56 +0100	[thread overview]
Message-ID: <YtGatGGgZD/g+dvu@arm.com> (raw)
In-Reply-To: <20220713140949.45440-1-mark.rutland@arm.com>

On Wed, Jul 13, 2022 at 03:09:49PM +0100, Mark Rutland wrote:
> Since commit:
> 
>   a004393f45d9a55e ("arm64: idreg-override: use early FDT mapping in ID map")
> 
> Kernels built with KASAN_INLINE=y die early in boot before producing any
> console output. This is because the accesses made to the FDT (e.g. in
> generic string processing functions) are instrumented with KASAN, and
> with KASAN_INLINE=y any access to an address in TTBR0 results in a bogus
> shadow VA, resulting in a data abort.
> 
> This patch fixes this by reverting commits:
> 
>   7559d9f97581654f ("arm64: setup: drop early FDT pointer helpers")
>   bd0c3fa21878b6d0 ("arm64: idreg-override: use early FDT mapping in ID map")
> 
> ... and using the TTBR1 fixmap mapping of the FDT.
> 
> Note that due to a later commit:
> 
>   b65e411d6cc2f12a ("arm64: Save state of HCR_EL2.E2H before switch to EL1")
> 
> ... which altered the prototype of init_feature_override() (and
> invocation from head.S), commit bd0c3fa21878b6d0 does not revert
> cleanly, and I've fixed that up manually.
> 
> Fixes: a004393f45d9a55e ("arm64: idreg-override: use early FDT mapping in ID map")
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Will Deacon <will@kernel.org>

I'll leave this to Will to pick since the fixed commit is only in -next.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

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

  reply	other threads:[~2022-07-15 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 14:09 [PATCH] arm64: fix KASAN_INLINE Mark Rutland
2022-07-15 16:49 ` Catalin Marinas [this message]
2022-07-19 19:56 ` Will Deacon
2022-07-20 14:53 ` Mark Rutland
2022-07-20 15:03   ` Will Deacon

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=YtGatGGgZD/g+dvu@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=ardb@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --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