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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4BF2C6379F for ; Fri, 17 Feb 2023 15:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230101AbjBQPAg (ORCPT ); Fri, 17 Feb 2023 10:00:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229941AbjBQPA3 (ORCPT ); Fri, 17 Feb 2023 10:00:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0BAC7290D; Fri, 17 Feb 2023 07:00:06 -0800 (PST) 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 84BE9B82A26; Fri, 17 Feb 2023 14:58:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CECF2C433D2; Fri, 17 Feb 2023 14:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676645931; bh=MtqNCOwgfK+uXpcr0rZdEnDp31xRiNLfgJsnxPeWYqI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Y+nxlJ/gcm1x1jXsY3cF3B2F4DeZFxJ9wZOVnugbYAbAfjCUaUNp6p8wLm6FsPubc y2vH2kqB56EDNmv6n9vtjALmNGH0PYbk1CIRl/oF53U5XcUxCzzv9XtK04QMvq4Qhg n8t43QZ+dFseHw1S4ynHE9XUtR4jMpd2TtHiKWBgTrrnP9fdYcYAmbp4ojbYCkQni9 4JWBeXVn+vRxHUTHYiG8pQT89DD73jY/kZVn5jLYwZklPZsb1ujOFPKmcJKTzRnW6X e7Z54JinCqoqpi2P+C/zcmlGwW5QT/aNTofmP7TJgXMt/maIyvhVUGBl4v5sE6sAGU 6ClN341Ryg/0A== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Ard Biesheuvel , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-efi@vger.kernel.org Cc: Alexandre Ghiti Subject: Re: [PATCH v4 3/6] riscv: Move DTB_EARLY_BASE_VA to the kernel address space In-Reply-To: <20230203075232.274282-4-alexghiti@rivosinc.com> References: <20230203075232.274282-1-alexghiti@rivosinc.com> <20230203075232.274282-4-alexghiti@rivosinc.com> Date: Fri, 17 Feb 2023 15:58:48 +0100 Message-ID: <873574uymv.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexandre Ghiti writes: > The early virtual address should lie in the kernel address space for > inline kasan instrumentation to succeed, otherwise kasan tries to > dereference an address that does not exist in the address space (since > kasan only maps *kernel* address space, not the userspace). > > Simply use the very first address of the kernel address space for the > early fdt mapping. > > It allowed an Ubuntu kernel to boot successfully with inline > instrumentation. > > Signed-off-by: Alexandre Ghiti Reviewed-by: Bj=C3=B6rn T=C3=B6pel