From patchwork Sun Jan 3 17:11:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lecopzer Chen X-Patchwork-Id: 11995781 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.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 4CCE3C433E0 for ; Sun, 3 Jan 2021 17:14:35 +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 0FBEA206F4 for ; Sun, 3 Jan 2021 17:14:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0FBEA206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qDG3y1UlwNi0hVRRUOXvvv+0D2aUh2fv45evd/opn/8=; b=ArtUqDANqBqfru6/FO+tp8oSQ STkHYAkp5l7Q0G5lZpi8X4fC+IU/kJGUieXDF3nGZgBSU1LnAke6spEk3Y/an3F7gpvdO5goE37Am 5NpnqJ4e/QS5FSGzbEgDNT3dzeCl5iHJLCwGw7c0D6qPO+sFLwbclOCBin0NvhI2w1zjGBWY0fhyB 89dA9je4L3h7FhDH0fE2VdBqjSa00rfabwvkpRt6tCTM/rIDthECaBlRtWzXI+AbGJh22wNnRaI39 j/n0ZQ2i7zJej1HQ4O+wXPUnV4dB1rle+IQ263skJoyGxbaa6ZpZoZvqsHlTQWr+4MTGTAE6aanpc MLwtJm0xg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw6w1-0003TO-0f; Sun, 03 Jan 2021 17:12:53 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw6vx-0003RL-Ic; Sun, 03 Jan 2021 17:12:50 +0000 Received: by mail-pl1-x633.google.com with SMTP id e2so13137878plt.12; Sun, 03 Jan 2021 09:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+qF0SijNFO/T+7vPigxBwLWfcVu8oPsZO7isaPG+ku8=; b=OMdVh9zxiZv9azAo9+0yvKEkkHlQiRNekWETEHuEwCBvQ/iy+NnfWuO6Su8nvxl4TR sVszfeEmM3v6ig7Bfge2C/f8TMwms22mkgt/r+S1gm5pQD30UUMNB1ccdgcJe+m94I5t J15E8JULz9YMpwuHH0YoR8QOJTPyYKmqYBUcuJIUOFiTqlTiqFCwcJhW5+bclo1I1bHh xSrS1+tkxQklhB+96h6QdMKFDflPTJ8CCmoRsXLd3RrPWQf+NVhZwQFHDjjueJLgPXkC s6/eYfDfshOnGDGGwAocvHfl7zfhoVnfeXVVnTl77GfSS2IZjeyhhVx+kDPivmTfxEFY NCow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+qF0SijNFO/T+7vPigxBwLWfcVu8oPsZO7isaPG+ku8=; b=nrzFpM2btKXeqyuruqrdFlAqF9lnKhQS3H6XOxgtiv3ByeZctNkWk5kAkHI0yAnsIE 3L+hE82GcpB/VvmgaTkwm8rcIqdts5sU5LyLqFCpz9UxUEDng/RQafpi1eOMFIK4e1XV K0GpYxFOs6b3/yBU5GREcxkw2Yl75OEetIApFU7fi3RYcHHXIYrdDHgTlDcjwMdwcMjA jPP3kZgtbaFUBKPIwhvh5oVLwrHyCPhmGuzwRmJ2BkFrueoYyZ+85AXeJirO7rmZQwye XxDJLons/vQqOBs8huBpZbXTM+mwbCdLVuYo+LqJXanir/6PLsFoPxHpDIQ6WzohL1CO a9WQ== X-Gm-Message-State: AOAM530L4M2J/ZmdifnaiOZH9+YGeJuo9W99JXVwYnLLO56Jb6bkulUF 1aRFkfVo8/3/Clbvlm4b+vM= X-Google-Smtp-Source: ABdhPJw3OQwhq9OxHmMcioQgHt+p48eMqxA1ZNlpDr311WozdKIFyTrL8TttCW0PNA95g+ifOua7dw== X-Received: by 2002:a17:902:7207:b029:da:fd0c:521a with SMTP id ba7-20020a1709027207b02900dafd0c521amr68665365plb.45.1609693967387; Sun, 03 Jan 2021 09:12:47 -0800 (PST) Received: from localhost.localdomain (61-230-37-4.dynamic-ip.hinet.net. [61.230.37.4]) by smtp.gmail.com with ESMTPSA id y3sm19771657pjb.18.2021.01.03.09.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 09:12:46 -0800 (PST) From: Lecopzer Chen To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] arm64: kasan: don't populate vmalloc area for CONFIG_KASAN_VMALLOC Date: Mon, 4 Jan 2021 01:11:35 +0800 Message-Id: <20210103171137.153834-2-lecopzer@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210103171137.153834-1-lecopzer@gmail.com> References: <20210103171137.153834-1-lecopzer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210103_121249_651003_6A140E96 X-CRM114-Status: GOOD ( 13.81 ) 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 , glider@google.com, yj.chiang@mediatek.com, Lecopzer Chen , linux-mediatek@lists.infradead.org, catalin.marinas@arm.com, aryabinin@virtuozzo.com, dan.j.williams@intel.com, will@kernel.org, akpm@linux-foundation.org, dvyukov@google.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Linux support KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 ("kasan: support backing vmalloc space with real shadow memory") Like how the MODULES_VADDR does now, just not to early populate the VMALLOC_START between VMALLOC_END. similarly, the kernel code mapping is now in the VMALLOC area and should keep these area populated. Signed-off-by: Lecopzer Chen --- arch/arm64/mm/kasan_init.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/arm64/mm/kasan_init.c b/arch/arm64/mm/kasan_init.c index d8e66c78440e..d7ad3f1e9c4d 100644 --- a/arch/arm64/mm/kasan_init.c +++ b/arch/arm64/mm/kasan_init.c @@ -214,6 +214,7 @@ static void __init kasan_init_shadow(void) { u64 kimg_shadow_start, kimg_shadow_end; u64 mod_shadow_start, mod_shadow_end; + u64 vmalloc_shadow_start, vmalloc_shadow_end; phys_addr_t pa_start, pa_end; u64 i; @@ -223,6 +224,9 @@ static void __init kasan_init_shadow(void) mod_shadow_start = (u64)kasan_mem_to_shadow((void *)MODULES_VADDR); mod_shadow_end = (u64)kasan_mem_to_shadow((void *)MODULES_END); + vmalloc_shadow_start = (u64)kasan_mem_to_shadow((void *)VMALLOC_START); + vmalloc_shadow_end = (u64)kasan_mem_to_shadow((void *)VMALLOC_END); + /* * We are going to perform proper setup of shadow memory. * At first we should unmap early shadow (clear_pgds() call below). @@ -241,12 +245,21 @@ static void __init kasan_init_shadow(void) kasan_populate_early_shadow(kasan_mem_to_shadow((void *)PAGE_END), (void *)mod_shadow_start); - kasan_populate_early_shadow((void *)kimg_shadow_end, - (void *)KASAN_SHADOW_END); + if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) { + kasan_populate_early_shadow((void *)vmalloc_shadow_end, + (void *)KASAN_SHADOW_END); + if (vmalloc_shadow_start > mod_shadow_end) + kasan_populate_early_shadow((void *)mod_shadow_end, + (void *)vmalloc_shadow_start); + + } else { + kasan_populate_early_shadow((void *)kimg_shadow_end, + (void *)KASAN_SHADOW_END); + if (kimg_shadow_start > mod_shadow_end) + kasan_populate_early_shadow((void *)mod_shadow_end, + (void *)kimg_shadow_start); + } - if (kimg_shadow_start > mod_shadow_end) - kasan_populate_early_shadow((void *)mod_shadow_end, - (void *)kimg_shadow_start); for_each_mem_range(i, &pa_start, &pa_end) { void *start = (void *)__phys_to_virt(pa_start); From patchwork Sun Jan 3 17:11:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lecopzer Chen X-Patchwork-Id: 11995783 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.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 4F409C433E0 for ; Sun, 3 Jan 2021 17:14:42 +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 0F5DD206F4 for ; Sun, 3 Jan 2021 17:14:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F5DD206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/xpl7jSM+ABtPteBTmyguS20tWTuM1YFlkEIVkoTThI=; b=VupUrpe7xcUXv7jc0t9UxW7Sb rc6wGA7/ffIRnN1Jfb/pRQvIAOyI970im2drIYTlXTDhcpiV6nsz2ra8ICSsAl0Gvu55mc5me/P6Q m4besuiWMvZyoYWIzcNbN94jwNfEtGt1lKTBaBkK0IdWbjFiXDwRL907hfzHm01cxjkfSpI9Mih9I nDwOJgY0n7LN6fBmgVpgXAi+n2TOkNVgG5GjZtDnanGjj+6PwxmEDqr6R3asUPFfb424jqmFNZ/+c N1Z0HWtU3C1FKdIpxQHD2L5V4MWN3AXdB+jzB6yG/hDWA+kIklr1jZhsVCbBVyn7eiQnYug/6vmji BCRevffOw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw6wA-0003X1-TV; Sun, 03 Jan 2021 17:13:03 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw6w5-0003Uf-Qw; Sun, 03 Jan 2021 17:12:59 +0000 Received: by mail-pj1-x102b.google.com with SMTP id j13so8919451pjz.3; Sun, 03 Jan 2021 09:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zcihLP7J+zvmlqvpCHNLNMn5gBB4sRocIGyVUTdgvis=; b=ZscOQ6cT7SGXbsyGrP7LqEThhcvbyy24898khh22BD7Fu/H0UxOpAIELLl3r+EqjD7 MmnJYZc49kc7pL7yKi1xo/2qhiZZ+0X1+MVIfgQNAsvP2sFwzT84vkyO6I5ONCJTbTSA G79jEqpmI2sQOlFc68ao4aNRrxodHsahsS7kKJ7TBlKcI8YUvOW0NTI8yKQ968Ftun8g uwVYk3EctRRNVm2qc93TxvUWOKJc7aY3l3bKw6FXmIrhhn7r0juvJyrnQXXkLWIARE2/ /6qCzhwFqYOadxbxxYaXpADRfBlmX2B07/v2mKz5p/V5zdxbJnqK3iMtUzqudxPO3eEN MQGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zcihLP7J+zvmlqvpCHNLNMn5gBB4sRocIGyVUTdgvis=; b=potmG21M55y/zan8BSiHzTAjqTHYMRo07fKg255V5qwzH7quDKFIc7j8r00tefroqp 5nBJoLHnaNpzxN/jLiPs8xCDbcBS1NpjpfDHzsq1AshKKp/1TnMUWkwrRJFElFGN7IPz aCx0798tqIdRBWWCmcI3wod4XW8QPmjP/FNR5lyXC9vD7Kn4RcNKB25At9lDeBMtibCZ scaRIRiAsynMh7Yie348XWuVPpPg9E1dedZ/bJr4zJWXvNllxxjtHWs/elm0bLUMQ+Ow dHjLsGX/lsr9SitcR8K88NpMzHIAkHgVF2bp6G0HOLy0mtg6yDW2JbbQ+Qe43bAG7/+M WPHg== X-Gm-Message-State: AOAM533ZNJOrZawPL0g9tYz+vdUXYRrAGTi4v0ciUgkJI/NkwOU+Zgin vIi9cvkqq2d+OZjV/Rho72Q= X-Google-Smtp-Source: ABdhPJx+iEuKqbcGx4lndjhagQr1+v/81mg079S4Dgf37vjcORpgsvukDld0Xa8LwJHTq8YbzLCBow== X-Received: by 2002:a17:90a:4209:: with SMTP id o9mr26729316pjg.75.1609693975741; Sun, 03 Jan 2021 09:12:55 -0800 (PST) Received: from localhost.localdomain (61-230-37-4.dynamic-ip.hinet.net. [61.230.37.4]) by smtp.gmail.com with ESMTPSA id y3sm19771657pjb.18.2021.01.03.09.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 09:12:55 -0800 (PST) From: Lecopzer Chen To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] arm64: kasan: abstract _text and _end to KERNEL_START/END Date: Mon, 4 Jan 2021 01:11:36 +0800 Message-Id: <20210103171137.153834-3-lecopzer@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210103171137.153834-1-lecopzer@gmail.com> References: <20210103171137.153834-1-lecopzer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210103_121258_402832_90EC25E9 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. 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 , glider@google.com, yj.chiang@mediatek.com, Lecopzer Chen , linux-mediatek@lists.infradead.org, catalin.marinas@arm.com, aryabinin@virtuozzo.com, dan.j.williams@intel.com, will@kernel.org, akpm@linux-foundation.org, dvyukov@google.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Arm64 provide defined macro for KERNEL_START and KERNEL_END, thus replace by the abstration instead of using _text and _end directly. Signed-off-by: Lecopzer Chen --- arch/arm64/mm/kasan_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/kasan_init.c b/arch/arm64/mm/kasan_init.c index d7ad3f1e9c4d..acb549951f87 100644 --- a/arch/arm64/mm/kasan_init.c +++ b/arch/arm64/mm/kasan_init.c @@ -218,8 +218,8 @@ static void __init kasan_init_shadow(void) phys_addr_t pa_start, pa_end; u64 i; - kimg_shadow_start = (u64)kasan_mem_to_shadow(_text) & PAGE_MASK; - kimg_shadow_end = PAGE_ALIGN((u64)kasan_mem_to_shadow(_end)); + kimg_shadow_start = (u64)kasan_mem_to_shadow(KERNEL_START) & PAGE_MASK; + kimg_shadow_end = PAGE_ALIGN((u64)kasan_mem_to_shadow(KERNEL_END)); mod_shadow_start = (u64)kasan_mem_to_shadow((void *)MODULES_VADDR); mod_shadow_end = (u64)kasan_mem_to_shadow((void *)MODULES_END); @@ -241,7 +241,7 @@ static void __init kasan_init_shadow(void) clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END); kasan_map_populate(kimg_shadow_start, kimg_shadow_end, - early_pfn_to_nid(virt_to_pfn(lm_alias(_text)))); + early_pfn_to_nid(virt_to_pfn(lm_alias(KERNEL_START)))); kasan_populate_early_shadow(kasan_mem_to_shadow((void *)PAGE_END), (void *)mod_shadow_start); From patchwork Sun Jan 3 17:11:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lecopzer Chen X-Patchwork-Id: 11995785 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.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 5AD4DC433E0 for ; Sun, 3 Jan 2021 17:14:46 +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 13F44206F4 for ; Sun, 3 Jan 2021 17:14:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 13F44206F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=F7nMgRr5ivaqrvXkaMFPVhL/V6NKhoSOGto0JHStBKg=; b=S3zmp5FPk03JX/YeGhc56UjKU Up4JY+oP6Bwxn7HPAhQoYT2U0nKHI5lLNq+MxW4SCw3FZdVLVKGldWDq0dU7ZRezxRDfP3iESkK5G lkjH1r0Xcxt5gnc9rmSxXfkDOmtDj7sK3++uh0BmaEiCmD8wIu9X9gBsg3WZEnjF+o0J4B99Wc/Y5 Bs2mOBIuQSm+KBf0VYhlYc4+7EfMtb93GnQ/9OasVsa8maxmdD1d3jAU7V216XtAJzlwxhS5UvgHD 17d3GZPAikevNvJYaurt/YPPXkAQF9mnPTYQuL5NIb0a+1tJjGjBSW1+kTPgQAPvDA0iss1rd5Q91 tdEhfjXWw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw6wJ-0003bU-08; Sun, 03 Jan 2021 17:13:11 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kw6wC-0003XN-90; Sun, 03 Jan 2021 17:13:05 +0000 Received: by mail-pf1-x430.google.com with SMTP id q22so14889640pfk.12; Sun, 03 Jan 2021 09:13:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DJN/Pu+8mLKZ+B4Z+Om7De+VUDyUCro4rXn59AnfrE4=; b=GJ5A/1auzoduEeasEqtvu6hr2Gs+drY4Z01k6WXJ2D0EaD0TxZpf80iuC/SBcfu7Kb hXyPC3xEMoHL/mgBh6vg/GZfWEibhw/I4yDdJRXQ8Yt9oW/rFji7DYEgtbvRlAKYL4By b/gJD/6JFcbSBIpVUjlL6DhJ5fhxZTR7Sla9lgdVXU1mMNFIKRm5anKzzOVNDwfXX1XU gCDzb2f6wfp4r9vsDorKGW3kakon1w2NTvb/PUjFtuPv+ghU1N5U9Dcn6V+zl7GFCwr5 9myPOPcGdnFPuk9yF/SSMGbjOnj0N29Z3+HjPDhCf05bEwLSdjP3BpbLNi0UnIHBwFf6 zePQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DJN/Pu+8mLKZ+B4Z+Om7De+VUDyUCro4rXn59AnfrE4=; b=bWIDCjVM1sM5hxuLpb3mzJVdMjU+7ufcgSXSMK2qc+qPgqRnqZIafgXdUEKktykEq7 6ZTUCE4lVIjZ3NqJr8KZ4kjlJPGUJkUAseWFrzYfgiqfXWkz7jk+zMiFFizG0rabBQSq VOwd0z/9wFZAE9hb9o+WUnajMsKLxtze8sEkURPJhvbiLN0AzTzKgBkYejizOgjlX519 QesBUEGlEJqH1sRdleTppA2eQS4hv5q8U56qpd/tKZSOHZddbiipXTiqfJIVHomqvKlE YYIHV58msfW2RVDRw2TpIdrKvkRAU1lqL9qfYwxbf8x+z/CE0Md+07N9QrDI6/cnnufx +HSQ== X-Gm-Message-State: AOAM532/8PsktuAb+bxFmwYRRFEke7E0K8MfCTMNAIZnSRO5F/rKDjJ4 EX+iIy++gRKbpfwqTxe7CVI= X-Google-Smtp-Source: ABdhPJyrjwRxNiXYf74ApoL/95Jw1Unu7nMqfXQ+KrD97MJV6r4/uJZcqZdl4vapaCluE9JG/ag4iQ== X-Received: by 2002:aa7:86d5:0:b029:1a3:61b6:9c1 with SMTP id h21-20020aa786d50000b02901a361b609c1mr61911995pfo.55.1609693982185; Sun, 03 Jan 2021 09:13:02 -0800 (PST) Received: from localhost.localdomain (61-230-37-4.dynamic-ip.hinet.net. [61.230.37.4]) by smtp.gmail.com with ESMTPSA id y3sm19771657pjb.18.2021.01.03.09.12.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jan 2021 09:13:01 -0800 (PST) From: Lecopzer Chen To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] arm64: Kconfig: support CONFIG_KASAN_VMALLOC Date: Mon, 4 Jan 2021 01:11:37 +0800 Message-Id: <20210103171137.153834-4-lecopzer@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210103171137.153834-1-lecopzer@gmail.com> References: <20210103171137.153834-1-lecopzer@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210103_121304_391779_E5307F96 X-CRM114-Status: GOOD ( 11.35 ) 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 , glider@google.com, yj.chiang@mediatek.com, Lecopzer Chen , linux-mediatek@lists.infradead.org, catalin.marinas@arm.com, aryabinin@virtuozzo.com, dan.j.williams@intel.com, will@kernel.org, akpm@linux-foundation.org, dvyukov@google.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now I have no device to test for HW_TAG, so keep it not selected until someone can test this. Signed-off-by: Lecopzer Chen --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 05e17351e4f3..29ab35aab59e 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -136,6 +136,7 @@ config ARM64 select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_JUMP_LABEL_RELATIVE select HAVE_ARCH_KASAN if !(ARM64_16K_PAGES && ARM64_VA_BITS_48) + select HAVE_ARCH_KASAN_VMALLOC if (HAVE_ARCH_KASAN && !KASAN_HW_TAGS) select HAVE_ARCH_KASAN_SW_TAGS if HAVE_ARCH_KASAN select HAVE_ARCH_KASAN_HW_TAGS if (HAVE_ARCH_KASAN && ARM64_MTE) select HAVE_ARCH_KGDB