Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp513224pxb; Fri, 8 Jan 2021 10:33:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZPl1CW79Laozs3k8ryNaG2E9HVTSRj+ZftnY4pkXOeJp99cTtsxfKhB1JHq2T9L1RIAI6 X-Received: by 2002:a17:906:4d47:: with SMTP id b7mr3393893ejv.420.1610130781702; Fri, 08 Jan 2021 10:33:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610130781; cv=none; d=google.com; s=arc-20160816; b=Rka44teubMjxH7Faqp1KtJ8Appayk9k5I+fyhO1abg8NBN1KOWMab8eunE2P0iEggg 50mTr/Q0IYz+8EJSEUpsc+v6mvJ442bA6jGfGSfp8rwei9DeJ/Ma+5QN1nU+yQ57P/ZK LK1fcEEjCKD5Ifn0aAMBUuQ9ty1qxSIlaqzhju+bUh21pGY2ulFBlfvsr0yHRszt5Vop VIGgKJqJyNbXUJEmgabfbiXmUcy8uu1I63bsreCndgyFfuC84OZhrU9THVhfIYEO/kqd HtM6g7r3FhWj8MKKvX5qVnBetZqMcka0YherWie8fxzgD5/6OGzH/gApqAMKicZe4owQ GSsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=QMtgJrbmi2Dq7xj4bsuhnhgijvRCuVpV/hWagawzWvg=; b=OJy9H7YAH8XOwBDpxVFeuQc+4Lw87N8x/P1JuznmOA8g0SziZ0N43HpqbtJH+7+p+4 VXIvGa7WKDHVioDvQ/A5QDK5nfpUrUboeGdYTWWlGujpLMH7K/0Tf8YzVZwGZUDiyhXg P1FwAvjBG10dR1z4m+dQOClfkcyO+cJL/4dNK/A7yAIS6lFs501SKTFR5V4fqWXAe1ul wWIcDTBxHgsj8R/PtPivcWFU/rmANl1071pL58ok0aKwkOf/s8crSOKimZgxyjsewgXf +Z97ENXbw+c+MRmPsgdIhoCNdaQ/ilro5UN7vSCcOWdlh53y9h/dEV35kS+84jUoxmly QQww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NtitF2di; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a10si3844432edq.184.2021.01.08.10.32.38; Fri, 08 Jan 2021 10:33:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NtitF2di; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728614AbhAHSbZ (ORCPT + 99 others); Fri, 8 Jan 2021 13:31:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728594AbhAHSbY (ORCPT ); Fri, 8 Jan 2021 13:31:24 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F29DC0612EA for ; Fri, 8 Jan 2021 10:30:44 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id m6so6769786pfm.6 for ; Fri, 08 Jan 2021 10:30:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QMtgJrbmi2Dq7xj4bsuhnhgijvRCuVpV/hWagawzWvg=; b=NtitF2diZ560VjUqe0aNEmnGnCs9j/OcQDpd7obF4GWgSzxReXHWFgsLG5uZDxRaAK X1DFXpWiVX/2j6DXeOECWut1VLvH6JvH4osI5ORI7YpkxZEwZqRAiAG8hdW1JzaXcXki 1gY1bcNmz91Rf+MF3bt81LWkFTuQ3uJH/z52LZ2MYoapANxl2lO5E2Ckws8FPCS3MkDn yCkEOlFMJp8zuATAhPXOhLc00WHUwBjInJ1pMTemnqy7GHRH0qkUqwJs7JScsb2H91kZ S7LJaUE0xSS6L5lkVN3wmRJ6FPiAYINlGZINGhD/Uy5sur/SVdr0j9BuRzSpcysjUp5V 0R1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QMtgJrbmi2Dq7xj4bsuhnhgijvRCuVpV/hWagawzWvg=; b=ro9cT9yhFWnvkNG/LKSBJhbAC2sA8Doy+1RYTT/abdpk1tGckQJfsFRfzN/1kx3AoC 1Hv7Q/sHAiroLFU44yFsGvEKT70Nr/tVZGKEG3RA2CAlFvWHVe+e0hIkOlDxmtyJR4Ue DYg7dxvKsJyqs2bDCDS1Sq9c9LNBp6gy6FPP6faNvjo0PCD29FJRHV09fIdpjeoU4R8X 3zVnC3+m+6Z5Ka+5dYi8QoLRv+OpvtlvVEQwPDh8z3b2vkBHG9A+73COL++Ixm3A/Hbr qO2wrgy/0ad9hVFChc3xOtj//TyP1Y+l6Dnz1qnFLZ2IoLQQk/Yxuoa7qyFvKitZ1ai4 j3mA== X-Gm-Message-State: AOAM5324udocngG9LA7XbmtwBpcgpyHcPTx9fx7p8vwv81WJhdV7EUao jHqPEq4JD3248G+/qLcOL/mf3o58KP4pwZO1elcBVg== X-Received: by 2002:a62:e309:0:b029:1ae:5b4a:3199 with SMTP id g9-20020a62e3090000b02901ae5b4a3199mr4942892pfh.24.1610130643942; Fri, 08 Jan 2021 10:30:43 -0800 (PST) MIME-Version: 1.0 References: <20210103171137.153834-1-lecopzer@gmail.com> In-Reply-To: <20210103171137.153834-1-lecopzer@gmail.com> From: Andrey Konovalov Date: Fri, 8 Jan 2021 19:30:33 +0100 Message-ID: Subject: Re: [PATCH 0/3] arm64: kasan: support CONFIG_KASAN_VMALLOC To: Lecopzer Chen , Catalin Marinas , Will Deacon Cc: LKML , Linux Memory Management List , kasan-dev , Linux ARM , Dan Williams , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrew Morton , linux-mediatek@lists.infradead.org, yj.chiang@mediatek.com, Lecopzer Chen Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!