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 4D4E2C433EF for ; Wed, 20 Jul 2022 15:04:37 +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=kk3kKrrSMfKZy/ujxRLmhspQQqeS7Rcig/ja9BEL+mc=; b=K0bOmhVRttvQ47 4loEC8UtYFFpr3WrATKz17b5Hjdncv/F15wHrtiq0BC0LKG5SJ8swn9BjL4LTfCLJK2fGDet8I4Yn UuvOeEkMmm1eEtZ40UsieXUY0FffB1HPXJXqjRpm746Ub4iVcr8LvPlE2jVXc3FCCcmWNBcTlKIuc 6pEVJgtZCDvU1wFUx8LkEe3DwZGfDLkPwiiQyfpg4YAUzJH78gij+VwvtiE05hrUhVapd4x8DI2dl 42G1E4rQn5ut3z5dMOnq7pYGWQCeoziEEvBQvYE9TxzSbHDyK6X3ZZl2ND/iO3X5dbIxjWd2tBj/h WgUyBtW2YldLNr3JSsdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEBEg-007I00-Cu; Wed, 20 Jul 2022 15:03:38 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEBEc-007HY9-3t for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2022 15:03:36 +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 dfw.source.kernel.org (Postfix) with ESMTPS id B497561B96; Wed, 20 Jul 2022 15:03:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE3ADC3411E; Wed, 20 Jul 2022 15:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658329391; bh=Zf1c1uFxP0J4XNqrTKsVAVezUB91jXDDN7lBpjX5iC8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DAcnwIawJR8lIG8oTv1iYagjsfc/LXXntiAvMjE/ufWx5jVAmi0F/XxMrFdRX78x+ QGjVLIzz3/NFzmHOkKP73opOLYy7+vlFS1GH7JpOWm3onBu1AVFTwM+/QD3VaGXSMx ZkUgHVcoPkSRHUGbe5T2FB7Tm3FohqJLP9fU3tcGsOqtzJ0kBVzvsRked7IGC/PUYJ 4HoXbQ4Pwiz7xz3gyRS2lT3kMohbA5+kR9t4uuzH2Bx8qyk7nhCSeUDEnrAXmL3ojb BSJOpIZS7oh8EM5VOEKwuJqzqpcP2xSllqV8+bV5ftVGHzTM4H1Fim3GTvMPHDJ6i9 AFSeVxtIvZn2g== Date: Wed, 20 Jul 2022 16:03:06 +0100 From: Will Deacon To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, catalin.marinas@arm.com, maz@kernel.org Subject: Re: [PATCH] arm64: fix KASAN_INLINE Message-ID: <20220720150305.GA16367@willie-the-truck> References: <20220713140949.45440-1-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220720_080334_252892_C0DC2F7F X-CRM114-Status: GOOD ( 18.38 ) 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 20, 2022 at 03:53:41PM +0100, Mark Rutland wrote: > 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. > > > > Whoops; this was meant to have: > > Signed-off-by: Mark Rutland > > ... but I somehow messed that up. > > Will, are you happy to fold that in? Thanks, yes, I'll add this now. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel