Message ID | 3d15794b3d1b27447fd7fdf862c073192ba657bd.1606161801.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=gjjd=E5=kvack.org=owner-linux-mm@kernel.org> 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=-16.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 2BC61C63697 for <linux-mm@archiver.kernel.org>; Mon, 23 Nov 2020 20:09:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A52E020C56 for <linux-mm@archiver.kernel.org>; Mon, 23 Nov 2020 20:09:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="FfWNnS6D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A52E020C56 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 43E096B00BB; Mon, 23 Nov 2020 15:09:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A2C66B00BC; Mon, 23 Nov 2020 15:09:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A4D56B00BD; Mon, 23 Nov 2020 15:09:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id CBFF96B00BB for <linux-mm@kvack.org>; Mon, 23 Nov 2020 15:09:49 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6A62A1EE6 for <linux-mm@kvack.org>; Mon, 23 Nov 2020 20:09:49 +0000 (UTC) X-FDA: 77516773698.21.metal71_31108e827368 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin21.hostedemail.com (Postfix) with ESMTP id 27DC4180442C3 for <linux-mm@kvack.org>; Mon, 23 Nov 2020 20:09:49 +0000 (UTC) X-HE-Tag: metal71_31108e827368 X-Filterd-Recvd-Size: 4437 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) by imf21.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Mon, 23 Nov 2020 20:09:48 +0000 (UTC) Received: by mail-wr1-f74.google.com with SMTP id w17so775605wrl.8 for <linux-mm@kvack.org>; Mon, 23 Nov 2020 12:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=gEnDsD+N69lIXG3Ma+biKqxogEfpaBdkZlhoQUvyVBc=; b=FfWNnS6DgP7aoSkRvg3HeByQaSuDigoEyB8i2MUSZPS83BNAnfQl+QDxbBoeIDw2Zz lEJsVW3NR8061h7oS71deZYKO+i6jkdR7FmyaU9S6qYasJqCcaRrKGZX5IHSsFGwQrVn jE0ZUFb3ZJFyEqQvpFR66i/Gk0GQm/86LYNy3MjVTHrCYtCQxp+6c19nGjV+lyHp/otk 1KfcVpxv8JmvBBUCuimojZ5ltow/aDbCCrVGcoFPuCb+DE8F8sp71QozB/A7Q/f/e8/h ibjeDB0aU3qVOlaDoFUt3NUcn8A+vDFK/n/eY08TwQdt67SESvF/YY1dinvgJa9VO3zX VlKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=gEnDsD+N69lIXG3Ma+biKqxogEfpaBdkZlhoQUvyVBc=; b=b1zB0ao6T+ZXTe289QbZNQqgS4HV1meqaKpEqRYKf2mw3lk1RmFvyL9Yc+1PJXOxeD vZ0404W0bTUlBVMM3rKvitGoUlskvjt9aagnxC+mGNXwMalrKCEb5tnPYTzusAMBjnZc alCW/ACVuzQ534e+EgmeGe3GhxkVOLSeOjH/yBQSn1TgEH8dps4iAtxkZM0IvGoaC7P7 PBf8xOKLlAy6lfCDfcVCowj3C1+gJVF8kP+8EcUPq7t8d02DudKAvBSUI+HiqHx5GNj+ /wkCAhy1AP/0pz2lM2j38lT0fZiXVq3pid7dSGw9QpW9/KxZ7XcDtgt02X8dKwdkj5Ow dzQg== X-Gm-Message-State: AOAM533cai6gYQDOTeecibwqnfaWfSTNmvmKj4xEq7Mb7b5Ng6x0K05s UhHKRpw9nDee2e4MyRMAfQevp/LyzNP3jHbn X-Google-Smtp-Source: ABdhPJxuTyKGJpJ9R13tryozNvCIfSMHFYGMbWGDD7E7GAT3bPdC8BzbC8PwCKdMykkLVk97+KSIe7Ogp0sZD3jA X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a1c:398a:: with SMTP id g132mr585815wma.51.1606162187602; Mon, 23 Nov 2020 12:09:47 -0800 (PST) Date: Mon, 23 Nov 2020 21:07:58 +0100 In-Reply-To: <cover.1606161801.git.andreyknvl@google.com> Message-Id: <3d15794b3d1b27447fd7fdf862c073192ba657bd.1606161801.git.andreyknvl@google.com> Mime-Version: 1.0 References: <cover.1606161801.git.andreyknvl@google.com> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH mm v11 34/42] kasan: define KASAN_GRANULE_SIZE for HW_TAGS From: Andrey Konovalov <andreyknvl@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Dmitry Vyukov <dvyukov@google.com>, Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Marco Elver <elver@google.com>, Evgenii Stepanov <eugenis@google.com>, Branislav Rankov <Branislav.Rankov@arm.com>, Kevin Brodsky <kevin.brodsky@arm.com>, kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov <andreyknvl@google.com> 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: <linux-mm.kvack.org> |
Series |
kasan: add hardware tag-based mode for arm64
|
expand
|
diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index bc4f28156157..92cb2c16e314 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -5,7 +5,13 @@ #include <linux/kasan.h> #include <linux/stackdepot.h> +#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS) #define KASAN_GRANULE_SIZE (1UL << KASAN_SHADOW_SCALE_SHIFT) +#else +#include <asm/mte-kasan.h> +#define KASAN_GRANULE_SIZE MTE_GRANULE_SIZE +#endif + #define KASAN_GRANULE_MASK (KASAN_GRANULE_SIZE - 1) #define KASAN_MEMORY_PER_SHADOW_PAGE (KASAN_GRANULE_SIZE << PAGE_SHIFT)