From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C8E5CCA480 for ; Fri, 15 Jul 2022 16:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E4Da1OSdSIFfU7/5hG3MOTIuwgmR6lzDtUPRJN2etWg=; b=qA4YeYLnaJ6SZM do82AQAhEnKeTCf+BbwK43VkmppdRhS1BVjQM505gy0n7W3U6jEqKouySx/0fKkHgs1S46xpwSBj5 662V8/tHeAWzorFY2rYxFMv7afT9jb8+6SEBSKyyZgcxkcjRNLclGuu/CWqwYEm5NGEs7n4iVHORh 5YOMOblL9BNS0sZgRxT169n4rlelER3X7llh7bh+eEWXtqP0lfFd/e91Ufh26E1ber/4l43RAiwjc EysBCtViGYC+W53NK4gGiGdtvbq6JYC3VN4LoyZokHybfPG+8ovJ3Y9oD84r40C+WbW4z58bIEYkM 6R6DNwTxsXjF4oKdB3eQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCOW0-008wi9-W7; Fri, 15 Jul 2022 16:50:09 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCOVx-008wgu-GC for linux-arm-kernel@lists.infradead.org; Fri, 15 Jul 2022 16:50:06 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EF1B8B82D57; Fri, 15 Jul 2022 16:50:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E66DC34115; Fri, 15 Jul 2022 16:50:00 +0000 (UTC) Date: Fri, 15 Jul 2022 17:49:56 +0100 From: Catalin Marinas To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, maz@kernel.org, will@kernel.org Subject: Re: [PATCH] arm64: fix KASAN_INLINE Message-ID: References: <20220713140949.45440-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220713140949.45440-1-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220715_095005_726916_62B99D61 X-CRM114-Status: GOOD ( 16.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > Cc: Catalin Marinas > Cc: Marc Zyngier > Cc: Will Deacon I'll leave this to Will to pick since the fixed commit is only in -next. Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel