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 X-Spam-Level: X-Spam-Status: No, score=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE658C433DB for ; Fri, 8 Jan 2021 18:43:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2EEFC23A5A for ; Fri, 8 Jan 2021 18:43:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2EEFC23A5A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nxTz4Xcy5wkMk1z1Ryr7eXJaUg9IMS6mHbnlFXI5O3E=; b=VwgEtGW6x0GJGfWp4m/S8V6ul qSlhCvNHJwuGV3LazSYcCVhHFs36ipzjoIAfqk1PT7XC2LgzuhYAYxxpQVYwRw4PvcVZqixMCXUPg FtApzvR343u3ySF1WgoF2LLcJTLSaR8Th3ysB/C2Q/GnOQPDid4f4pjP6KkR32DBKngxxAycMgJCn nhAHNsJ1ABWSE40UC+55ZUzG7tjIhB7cHe2p7A2kl4Eo01iJJL9j1a81q6SwYYNub+BsmWGApsafU 7dk/M0G9x+hYA+keQRI96S/5wZbTZ70LvjVaO+RJfe47B3Zjj4lPHSkfn8yoR5fWJgGxxgVtl48Di zRoUFpLMg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxwhu-0008NY-7L; Fri, 08 Jan 2021 18:41:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxwhq-0008MT-Ut; Fri, 08 Jan 2021 18:41:51 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3DCB223A7F; Fri, 8 Jan 2021 18:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610131309; bh=tkonPwlabkLXLyMxiiESIjCklszdN86fUImv8DVDBWE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IKNY7oVKNuPzRros5fM/7vBHlMCNd4HwHKfOex1gRPKTK/iE9/h3miejxLoeRK+hV gov7ITt3IDhunwKV/Iz3vOI5SlXIaYPrwvIdhyRzrdYlw1XSozjVOc6qCP5P8WdLwI 7Lwz9a8ssTBS9ZW4gzUcskhNHOiS+arAsFVxq9eqJ1dI2JsFRaJdTSzH6EQEF1zkru ysWcgcurunZxBLSj6LwtoTQN+67QHuwoH5st5XI1lCeR7qjxFv6ENJYmHY7wm5M8BB ruvlLpCCbDMM0LhohoDGaL6NOOj+7OnHxIwwCeRItOgSALMPRJ+qb+Rj+Y1jIgWm7L F4fr9OSbx+cxA== Received: by mail-oi1-f182.google.com with SMTP id f132so12348645oib.12; Fri, 08 Jan 2021 10:41:49 -0800 (PST) X-Gm-Message-State: AOAM531wyDPwFeiK+DYrBsRz7T8fA6uR3CTmKyxwojGytUlMUucdRkhe pCWIUN+E7gpQc87u36UI2TSi2U0cTQ1Afb4Wdgc= X-Google-Smtp-Source: ABdhPJyF6RpCzxKa/lecY4GdxCfZbTUh3I+6FsPQwG/WCqXte4+mxyac9+wbRo4e2HSt3x5nd8cXBeC7aZkaX3l5ptc= X-Received: by 2002:aca:d98a:: with SMTP id q132mr3228281oig.33.1610131308441; Fri, 08 Jan 2021 10:41:48 -0800 (PST) MIME-Version: 1.0 References: <20210103171137.153834-1-lecopzer@gmail.com> In-Reply-To: From: Ard Biesheuvel Date: Fri, 8 Jan 2021 19:41:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] arm64: kasan: support CONFIG_KASAN_VMALLOC To: Andrey Konovalov X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_134151_148021_9D592D38 X-CRM114-Status: GOOD ( 18.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lecopzer Chen , Linux Memory Management List , Catalin Marinas , yj.chiang@mediatek.com, LKML , kasan-dev , Lecopzer Chen , linux-mediatek@lists.infradead.org, Linux ARM , Andrey Ryabinin , Alexander Potapenko , Dan Williams , Will Deacon , Andrew Morton , Dmitry Vyukov 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 Fri, 8 Jan 2021 at 19:31, Andrey Konovalov wrote: > > On Sun, Jan 3, 2021 at 6:12 PM Lecopzer Chen wrote: > > > > Linux supports KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 > > ("kasan: support backing vmalloc space with real shadow memory") > > > > Acroding to how x86 ported it [1], they early allocated p4d and pgd, > > but in arm64 I just simulate how KAsan supports MODULES_VADDR in arm64 > > by not to populate the vmalloc area except for kimg address. > > > > Test environment: > > 4G and 8G Qemu virt, > > 39-bit VA + 4k PAGE_SIZE with 3-level page table, > > test by lib/test_kasan.ko and lib/test_kasan_module.ko > > > > It also works in Kaslr with CONFIG_RANDOMIZE_MODULE_REGION_FULL, > > but not test for HW_TAG(I have no proper device), thus keep > > HW_TAG and KASAN_VMALLOC mutual exclusion until confirming > > the functionality. > > > > > > [1]: commit 0609ae011deb41c ("x86/kasan: support KASAN_VMALLOC") > > > > Signed-off-by: Lecopzer Chen > > Hi Lecopzer, > > Thanks for working on this! > > Acked-by: Andrey Konovalov > Tested-by: Andrey Konovalov > > for the series along with the other two patches minding the nit in patch #3. > > Will, Catalin, could you please take a look at the arm changes? > > Thanks! > If vmalloc can now be backed with real shadow memory, we no longer have to keep the module region in its default location when KASLR and KASAN are both enabled. So the check on line 164 in arch/arm64/kernel/kaslr.c should probably be updated to reflect this change. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel