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 A7E05CCA480 for ; Wed, 13 Jul 2022 14:12:38 +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=SO1EOysqsUbfhBvHL1y1UoQsmZLfiGM6EHVSoI1OqaE=; b=Rww/LTTjFg9dRJ JKg99l5x/dJPCD0PgyKxjaybiGGLFT2GTwEiavcYybgnKV/X136cMv+3aY/2+xc1F/CGXE+sfu9SA MIUtPSwBqG2nkcqcXOS9LfT/0GuB7YgXMXi3dW7JXuufUkX8/+xDY4GV5jzX+HGVaYL9/8+22faAI ySHeE2QcK2a8v0IMmXgfmH2kHVkmfhTETkX2TB3baZyv3Dl2dH1M0Mzs77LD5NC6ZjdS6aofrtioj GBQx/TIjqoKYrFmEPHWsayKNH/Myfg+esUsvkS1B7eNNLCQvAigAd54fv+sBO1vZLA+9EpdFaOFq2 +bwiYj7gGIE24I3+KB/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBd5C-004Hub-TP; Wed, 13 Jul 2022 14:11:19 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oBd3B-004G0j-0b for linux-arm-kernel@lists.infradead.org; Wed, 13 Jul 2022 14:09:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 839001424; Wed, 13 Jul 2022 07:09:10 -0700 (PDT) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.38.131]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E7A343F73D; Wed, 13 Jul 2022 07:09:08 -0700 (PDT) Date: Wed, 13 Jul 2022 15:09:06 +0100 From: Mark Rutland To: Ard Biesheuvel Cc: Linux ARM , Marc Zyngier , Will Deacon , Kees Cook , Catalin Marinas , Mark Brown , Anshuman Khandual Subject: Re: [PATCH v5 15/21] arm64: idreg-override: use early FDT mapping in ID map Message-ID: References: <20220624150651.1358849-1-ardb@kernel.org> <20220624150651.1358849-16-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220713_070913_138389_E1E3D599 X-CRM114-Status: GOOD ( 24.29 ) 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 Tue, Jul 12, 2022 at 07:03:56PM +0200, Ard Biesheuvel wrote: > On Mon, 11 Jul 2022 at 17:39, Mark Rutland wrote: > > > > Hi Ard, > > > > On Fri, Jun 24, 2022 at 05:06:45PM +0200, Ard Biesheuvel wrote: > > > Instead of calling into the kernel to map the FDT into the kernel page > > > tables before even calling start_kernel(), let's switch to the initial, > > > temporary mapping of the device tree that has been added to the ID map. > > > > > > Signed-off-by: Ard Biesheuvel > > > > Unfortunately, this patch breaks KASAN_INLINE=y, as the accesses to the idmap > > alias of the FDT get a poison check, which faults, resulting in a panic() > > before any of the command line is parsed. > > > > It's a bit painful to fix this; I had hoped it would be simple to fix by > > adding: > > > > KASAN_SANITIZE_idreg-override.o := n > > > > ... to arch/arm64/kernel/Makefile, but there are a bunch of calls to > > out-of-line functions that end up being instrumented (e.g. strncpy() and some > > fdt_*() functions), and it doesn't look like it'll be simple to go fix those. > > Ugh. I suppose the KASAN projection produces invalid shadow addresses > for the TTBR0 range, so there is no way we can map some zero shadow > for the FDT? Yup, exactly. > > Can we revert this? IIUC this patch is an optimization rather being necessary > > for later changes. > > Indeed, let's revert this for now, along with the follow-up patch that > removes the early FDT fixmap remap hack. I'll send a patch shortly. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel