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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 547EEC433E0 for ; Fri, 8 Jan 2021 18:38:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C3872333E for ; Fri, 8 Jan 2021 18:38:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728783AbhAHSiA (ORCPT ); Fri, 8 Jan 2021 13:38:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728383AbhAHSh7 (ORCPT ); Fri, 8 Jan 2021 13:37:59 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C380C061380 for ; Fri, 8 Jan 2021 10:37:19 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id c22so8119097pgg.13 for ; Fri, 08 Jan 2021 10:37:19 -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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=eW2T0ERT3EcmrriRa+877oo1orT/BVz49StZkuNqKMQNcIaFxdh143+b8LlkF5XuMR kNyWgVr0UEOYZ/WbjZ8Sd+0e08XdNkwXsXhyT1mSfU9c1gRkBrx4ZN/USZMovfYf1buP Qw8/g23Fwa1FOnsYC98vZ9aeUeXNRx8cmRoWQn87zRawWjIoQxG/Akx85WYUsGFQn5qr ebIvlYHuae7YA0rNHMbT+4h73YkFIHHliv2o2YdmHzOb0LicWxghdz5fX/A0o3tPU2cP o6ud33sUCbRpoSyAGJT/tjASduh/4NrlrSEekmdXp3hDUpcCg/NBG+RMSQiyqdS3dQZZ bqng== 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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=pb3FraChTGoYqZes6jyBVPIwWrdfnJ2EbKqQuZXXFZspj3RelMT0uPdSp0D5GJc47+ YNhAGbaPvgd5MbGt5ODr5Vr0jZy9D4aNjJKLhUbhcbQPYaXBBuDlANjmW9QSRQj6cDYV AY7LJjI6zxzt9cxY2SJ0hLYAfsy7zQtsZ6DQyn9iGoHstJVB6ObQqVwkScEKxU0N9Vx8 wmLDflmkRthK1HpHR+jixeiwV06VBAD4N6eCrycQqz0c8Vo95WSt0G2Y4xi4YeA8rQX0 fngYSKG3zWYFEcVlqgU7r+TkfgFqhyTRKshHZEGw9O+lhC6E2cxys6GnazMGDFPwnHgj dj2w== X-Gm-Message-State: AOAM532BiIKFaSlhHdvA5GFQlf/860Ze2qJCt+O405I2CXPaikO9aajp 6IXu5hmN7BNNWrAYTkZGH8clTOqFo2ZyYXhwU4eaOw== X-Google-Smtp-Source: ABdhPJwEfe1QqhFk0jrAFEufd1jArwzUfZxR6UaVy99xbVOyreBChQZUpNRelxBssoGesrEYfF6ujhJVFLOrd+Ew/2I= X-Received: by 2002:a63:4644:: with SMTP id v4mr8354904pgk.440.1610131038922; Fri, 08 Jan 2021 10:37:18 -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:37:08 +0100 Message-ID: Subject: Re: [PATCH 0/3] arm64: kasan: support CONFIG_KASAN_VMALLOC To: Lecopzer Chen 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, Will Deacon , Catalin Marinas , 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. Re this: it makes sense to introduce vmalloc support one step a time and add SW_TAGS support before taking on HW_TAGS. SW_TAGS doesn't require any special hardware. Working on SW_TAGS first will also allow dealing with potential conflicts between vmalloc and tags without having MTE in the picture as well. Just FYI, no need to include that in this change. 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=-13.6 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no 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 62C29C433E6 for ; Fri, 8 Jan 2021 18:37:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CFE322333E for ; Fri, 8 Jan 2021 18:37:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFE322333E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2ADD98D0195; Fri, 8 Jan 2021 13:37:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 238208D0156; Fri, 8 Jan 2021 13:37:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 100148D0195; Fri, 8 Jan 2021 13:37:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id E6DD88D0156 for ; Fri, 8 Jan 2021 13:37:20 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id AD753824556B for ; Fri, 8 Jan 2021 18:37:20 +0000 (UTC) X-FDA: 77683465440.12.sense73_581254e274f5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin12.hostedemail.com (Postfix) with ESMTP id 836FA1802B9D5 for ; Fri, 8 Jan 2021 18:37:20 +0000 (UTC) X-HE-Tag: sense73_581254e274f5 X-Filterd-Recvd-Size: 4255 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Jan 2021 18:37:19 +0000 (UTC) Received: by mail-pf1-f179.google.com with SMTP id t22so6796568pfl.3 for ; Fri, 08 Jan 2021 10:37:19 -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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=eW2T0ERT3EcmrriRa+877oo1orT/BVz49StZkuNqKMQNcIaFxdh143+b8LlkF5XuMR kNyWgVr0UEOYZ/WbjZ8Sd+0e08XdNkwXsXhyT1mSfU9c1gRkBrx4ZN/USZMovfYf1buP Qw8/g23Fwa1FOnsYC98vZ9aeUeXNRx8cmRoWQn87zRawWjIoQxG/Akx85WYUsGFQn5qr ebIvlYHuae7YA0rNHMbT+4h73YkFIHHliv2o2YdmHzOb0LicWxghdz5fX/A0o3tPU2cP o6ud33sUCbRpoSyAGJT/tjASduh/4NrlrSEekmdXp3hDUpcCg/NBG+RMSQiyqdS3dQZZ bqng== 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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=T8IFfg5nyrqhrwS1bc4Vo9HzFYk7DZHWNcSDaq/KRbXGrclWPhB22r6tNQBwzoVUla V9BJHfs6d9LaN2HY790+wnK07lVWYLgdGxna1deU3jRhTtMsbbYG6+1v4z4qkQARIcgd qAerhzL8WsJnp+7fVlM2aBrsS42fAG2gIPguW42T15VeFgbORShv3M5Lg5k9MZCaNBhf XZvTERy5I1CQrrUy/4lv4XxCwMGGfUgl/TyCLNuJ3+3JYVMWyxEhfoMlKXvYOuCxnEqF WdSL2lolWImv8O6QQ1a6DZGoU0XEc2Vt8X3fHvVIQRu8s1PjdjsbBbHP2bnn1/GmiIUR dXCg== X-Gm-Message-State: AOAM5312agBYzb3koilv/7KYGdzhJz7dCU5Kq6wVOXp7fJFR4fkbPyI5 ZGxy9y20KSpf5OybOERAGJ/DRCY3edGwhA+WLZ7ipg== X-Google-Smtp-Source: ABdhPJwEfe1QqhFk0jrAFEufd1jArwzUfZxR6UaVy99xbVOyreBChQZUpNRelxBssoGesrEYfF6ujhJVFLOrd+Ew/2I= X-Received: by 2002:a63:4644:: with SMTP id v4mr8354904pgk.440.1610131038922; Fri, 08 Jan 2021 10:37:18 -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:37:08 +0100 Message-ID: Subject: Re: [PATCH 0/3] arm64: kasan: support CONFIG_KASAN_VMALLOC To: Lecopzer Chen 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, Will Deacon , Catalin Marinas , Lecopzer Chen Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. Re this: it makes sense to introduce vmalloc support one step a time and add SW_TAGS support before taking on HW_TAGS. SW_TAGS doesn't require any special hardware. Working on SW_TAGS first will also allow dealing with potential conflicts between vmalloc and tags without having MTE in the picture as well. Just FYI, no need to include that in this change. 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 5FB90C433E0 for ; Fri, 8 Jan 2021 18:37:41 +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 108182333E for ; Fri, 8 Jan 2021 18:37:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 108182333E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=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=ozD79spY6OVdVOCSxR4+t8jR2QHC2du7lIBrJ5qEStA=; b=ej4RloL+zmHrbI6548yTs9HkW 1jV7f3mY25RORz7D7qlVRl9Lz5+KVWCXRhxrHX7RqKne7ZPwjWyfpHDUHj4ql6OioNYCx8aGNm+pq IRvUp+uKc3PRV0h+/SJ/LOYHVnz/iaKnH3DSZL2aQyV1OyEYUlTURodSaIwXTxhJkbgyeB4SK6ZfY /0hcfLTh4t3dazUNuIwEE2tK+FwXFZJ8K/57AfQISRYfCQQtrrAY/aeGU2uFFOhFobEwPegVNOoAF Fm0Cji6S1b0LmP6BVUW6D8LHGhitzpqZ3gaWHl5lG2DvXQ9Ym62WzIANJOWiGwPDwxFq1ampeeyIl TQDVjxU2w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxwdc-0007SY-53; Fri, 08 Jan 2021 18:37:28 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxwdV-0007Pu-SG for linux-mediatek@lists.infradead.org; Fri, 08 Jan 2021 18:37:23 +0000 Received: by mail-pg1-x535.google.com with SMTP id p18so8137779pgm.11 for ; Fri, 08 Jan 2021 10:37:20 -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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=eW2T0ERT3EcmrriRa+877oo1orT/BVz49StZkuNqKMQNcIaFxdh143+b8LlkF5XuMR kNyWgVr0UEOYZ/WbjZ8Sd+0e08XdNkwXsXhyT1mSfU9c1gRkBrx4ZN/USZMovfYf1buP Qw8/g23Fwa1FOnsYC98vZ9aeUeXNRx8cmRoWQn87zRawWjIoQxG/Akx85WYUsGFQn5qr ebIvlYHuae7YA0rNHMbT+4h73YkFIHHliv2o2YdmHzOb0LicWxghdz5fX/A0o3tPU2cP o6ud33sUCbRpoSyAGJT/tjASduh/4NrlrSEekmdXp3hDUpcCg/NBG+RMSQiyqdS3dQZZ bqng== 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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=dAhB+qZFpR3F562I9s4mx5vqrTCCnkyuu5ErtXB6ML8Sdukvqe1Achuf/ZEXGT/Mhd 6jcQc8pt+D7f2oCJji8uiB2GRYSxNN5kgYHSq/W6Z/HrwXhje4cblz+Chb+/L3fKqE7z JPmmZIxWnbUrEm1Dt74WcVo+oZoQ9QCOTFkNbvb3dXjoAf27JZPWNbfRfWD9vCganJwB PkSYe3IQRDA00JR89GQ9mjN9Aow6JtquZLhaRktjrwdMrAM2xPLRoz1M6FPXf3bS4r7N Q99HHwGX1XFkWwE0ItoiZVUo1CrJ/anL/XKYt3Ky3GhPJhLOJxhr3uMjSERJb6J1CJtW yE8w== X-Gm-Message-State: AOAM530UGPTaG31nwIfaYJpGu+e05MbPCsiHzER6GYyNzZgFMVgH4ShN WexUHe2jnF0MU9pz0NIt9+7HoGgcEWnPbdjuWVB1zw== X-Google-Smtp-Source: ABdhPJwEfe1QqhFk0jrAFEufd1jArwzUfZxR6UaVy99xbVOyreBChQZUpNRelxBssoGesrEYfF6ujhJVFLOrd+Ew/2I= X-Received: by 2002:a63:4644:: with SMTP id v4mr8354904pgk.440.1610131038922; Fri, 08 Jan 2021 10:37:18 -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:37:08 +0100 Message-ID: Subject: Re: [PATCH 0/3] arm64: kasan: support CONFIG_KASAN_VMALLOC To: Lecopzer Chen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_133721_932840_9D79AA66 X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-mediatek@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 , Catalin Marinas , yj.chiang@mediatek.com, linux-mediatek@lists.infradead.org, LKML , kasan-dev , Linux Memory Management List , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , Dan Williams , Will Deacon , Andrew Morton , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.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. Re this: it makes sense to introduce vmalloc support one step a time and add SW_TAGS support before taking on HW_TAGS. SW_TAGS doesn't require any special hardware. Working on SW_TAGS first will also allow dealing with potential conflicts between vmalloc and tags without having MTE in the picture as well. Just FYI, no need to include that in this change. _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 220C6C433DB for ; Fri, 8 Jan 2021 18:38:33 +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 A9C4C23A7D for ; Fri, 8 Jan 2021 18:38:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9C4C23A7D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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=p+l+5HcgLubD87IgMf3MoMkhGaeeIDexNEEg0mxxH2U=; b=N57rB79399rgV3BWoN2CN9VQO VC94eo0AUKuKYbfNj0izrT9mdTfW2S9UYeweM6TzvpZHlwaU9JgEfyY4tOsDGcBATaOneZNBfTudi 67xMV6ko8lfyzg88NTZqzajfS8f2KbGxz/ltsjAYJksflJBNajDEG9SD41W1IPkRCJ94YEjgH0pt/ zBnSdYcWxowY+GCXkh28fTzy62LJThBclipRzaDR/cVJng7WW0I8wqdr/CbeGsBQg5YMK1tz6ECih rlaFKts6rFUyxXromY1gGg6o5IxQZMoeRkMhJB7zqe58L2jdje7CO8ZiXqRv752FdPCA3m1jB8HmC yRnkLgNzQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxwdY-0007Ra-KN; Fri, 08 Jan 2021 18:37:24 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxwdV-0007Pt-2o for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 18:37:22 +0000 Received: by mail-pf1-x429.google.com with SMTP id s21so6762503pfu.13 for ; Fri, 08 Jan 2021 10:37:20 -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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=eW2T0ERT3EcmrriRa+877oo1orT/BVz49StZkuNqKMQNcIaFxdh143+b8LlkF5XuMR kNyWgVr0UEOYZ/WbjZ8Sd+0e08XdNkwXsXhyT1mSfU9c1gRkBrx4ZN/USZMovfYf1buP Qw8/g23Fwa1FOnsYC98vZ9aeUeXNRx8cmRoWQn87zRawWjIoQxG/Akx85WYUsGFQn5qr ebIvlYHuae7YA0rNHMbT+4h73YkFIHHliv2o2YdmHzOb0LicWxghdz5fX/A0o3tPU2cP o6ud33sUCbRpoSyAGJT/tjASduh/4NrlrSEekmdXp3hDUpcCg/NBG+RMSQiyqdS3dQZZ bqng== 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=NdEgLCv0WcsMLswh+8Qu2jUrNvErOztEJExOtEtsP1U=; b=JlzYTj5uDhDhdbKEQ5M3iriKY4WxJYopZXfT7aTpWp22nO13ziEVa5nmDCdKjFLP4U ecSx/XkMtv2vRRMF7dw1V3+RZFb2S6Pz6Qz/oCUboYxbiFoxNWqtwpNEZN1X1J0bFgTB fpHJUTK263XO8DCIoCCknK9ZxaFG2cCu6+uZZLAJP2PzjIxFuKhXQXQ9AOL1rIVXJc4G ptNjBuTyC8NA7h/h7drGdX5tpDHvvcAXENTZ0WxzEMeKJTLq4Mxp3tKe3nKV7CQRT7FV tU2YoWT4wafjTMQoZ2rJ7Z5fUbxFayhq3SS8/9q3EsONigbdoajXcXZhKkAJimTu9AIj FpNg== X-Gm-Message-State: AOAM531H53N8yC8F37fx1no/1FnD5ofCHRWcp6RBVXPViNFhUBj8dSi/ liQ35LxTBmvWLqnltxhdTOuahIhZiVQV2BS/GYS0zQ== X-Google-Smtp-Source: ABdhPJwEfe1QqhFk0jrAFEufd1jArwzUfZxR6UaVy99xbVOyreBChQZUpNRelxBssoGesrEYfF6ujhJVFLOrd+Ew/2I= X-Received: by 2002:a63:4644:: with SMTP id v4mr8354904pgk.440.1610131038922; Fri, 08 Jan 2021 10:37:18 -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:37:08 +0100 Message-ID: Subject: Re: [PATCH 0/3] arm64: kasan: support CONFIG_KASAN_VMALLOC To: Lecopzer Chen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_133721_304445_E3A55C7D X-CRM114-Status: GOOD ( 13.08 ) 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 , Catalin Marinas , yj.chiang@mediatek.com, linux-mediatek@lists.infradead.org, LKML , kasan-dev , Linux Memory Management List , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , Dan Williams , Will Deacon , Andrew Morton , Linux ARM 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 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. Re this: it makes sense to introduce vmalloc support one step a time and add SW_TAGS support before taking on HW_TAGS. SW_TAGS doesn't require any special hardware. Working on SW_TAGS first will also allow dealing with potential conflicts between vmalloc and tags without having MTE in the picture as well. Just FYI, no need to include that in this change. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel