Message ID | 3a3002e1d70f8faf2dfc07176c3ece22450b68a3.1600204505.git.andreyknvl@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=2pn3=CY=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EFAC06CA for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 15 Sep 2020 21:17:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B733D20795 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 15 Sep 2020 21:17:39 +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="et5na2Sr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B733D20795 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 AE6B3900092; Tue, 15 Sep 2020 17:17:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A96A890008A; Tue, 15 Sep 2020 17:17:38 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9AD25900092; Tue, 15 Sep 2020 17:17:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0218.hostedemail.com [216.40.44.218]) by kanga.kvack.org (Postfix) with ESMTP id 86D3990008A for <linux-mm@kvack.org>; Tue, 15 Sep 2020 17:17:38 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4E8228249980 for <linux-mm@kvack.org>; Tue, 15 Sep 2020 21:17:38 +0000 (UTC) X-FDA: 77266557396.08.humor97_3712d0f27114 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id AD4A51819E621 for <linux-mm@kvack.org>; Tue, 15 Sep 2020 21:17:37 +0000 (UTC) X-Spam-Summary: 1,0,0,5db544313f29021f,d41d8cd98f00b204,3by9hxwokcfqw9zd0k69h72aa270.ya8749gj-886hwy6.ad2@flex--andreyknvl.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1431:1437:1516:1518:1534:1540:1568:1593:1594:1711:1714:1730:1747:1777:1792:1981:2194:2199:2393:2559:2562:3138:3139:3140:3141:3142:3152:3866:3867:4250:4321:5007:6261:6642:6653:6742:9969:10004:10400:11026:11232:11473:11658:11914:12043:12048:12297:12438:12555:12895:12986:13069:13311:13357:14096:14097:14181:14394:14659:14721:21080:21365:21444:21451:21627:30054,0,RBL:209.85.221.74:@flex--andreyknvl.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yrhz8rykqqfrzwh6uqcqyub9remyph3k756aq3745wtgbmxti1spstrx5uft6.5f8mo78t5wjyoforwhx9tfktg6fbbkni4xkeumgi3ycna7xngns554yza6mo6cr.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMM ARY:none X-HE-Tag: humor97_3712d0f27114 X-Filterd-Recvd-Size: 4366 Received: from mail-wr1-f74.google.com (mail-wr1-f74.google.com [209.85.221.74]) by imf25.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Tue, 15 Sep 2020 21:17:36 +0000 (UTC) Received: by mail-wr1-f74.google.com with SMTP id g6so1717451wrv.3 for <linux-mm@kvack.org>; Tue, 15 Sep 2020 14:17:36 -0700 (PDT) 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=SMbpusk9UPFJ5bty/4o1CBzmR923bOTqJu4p/yHyDoA=; b=et5na2SrMTeEtk7EWiOzMg0RIlxhLHym2BHU/vxQbTuVAB46m56Vgt+uJkfq6C1HPC LdLXNgovu/Qc5xh0rc0eA0wF96LwrPAujajBypmTg2C9f00xeyv2mMhZBtqDmrJPwnmx wItchGs3NqcMVlvP2XrDs63cj25TUc29zJtXuj8oAElnc584tZimCx/2j9MN+aveLpbe 6CExqkZyjmo1zU4cX09+bUDu5QeTKo0OoBQfzNRGLVcv7Pxfas6s/765v6fOyapNv95w Ef+ox4JfLp90yekqgK4IN7gatUONDMd8P8B2lydG89kADRCDIGIqUbs8vlf0OeozcRfe bYNw== 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=SMbpusk9UPFJ5bty/4o1CBzmR923bOTqJu4p/yHyDoA=; b=jJVCM/5O11VQENWmj+YfFS2ojxFQfF52QwjtkctctsLHKeOPF7u/b36CJvJXPncWQC q8m7cPqZmLRVhBpX75gHuMrPyCM/vKXEAPw6dvPCbG1tbLcEi9t9ZbtN0eStWBDq5HwX 8fPJ0wm75jeU0oaeLwqvtAlyZd7FEc0nuk/0YhiRGZzEsmSbJt249DRdgD9g9qQI4RlC zPOs1Y1qS518xB7VBrW5p651iDByHRXWQbjK1lhK0+vAERs0mUY9Z4sWmC75l6Ofwb5I DiOcgqMeAJI++faolkWXCs0lNDCNaiytbtaEFvraFOuENAW4OzXPHe5Ad26Q9JEwGRyW 6s+Q== X-Gm-Message-State: AOAM532t9bT2PpI+OpbGVLSVzipjKmpiUtnmCA9NZfpNedUMOEFX2ujV b7Oxsne0QPhd53gIYntyHbzpcBDON7RxtrX6 X-Google-Smtp-Source: ABdhPJwujyv1jICnb8Z84hBJXMAHZtwatucCSBcuhq+9tnfe5N4bmea9C5aR+KvNqkTUUlaGyRY0Mdi7Bwl5AIg1 X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a5d:5281:: with SMTP id c1mr23095217wrv.184.1600204655669; Tue, 15 Sep 2020 14:17:35 -0700 (PDT) Date: Tue, 15 Sep 2020 23:16:12 +0200 In-Reply-To: <cover.1600204505.git.andreyknvl@google.com> Message-Id: <3a3002e1d70f8faf2dfc07176c3ece22450b68a3.1600204505.git.andreyknvl@google.com> Mime-Version: 1.0 References: <cover.1600204505.git.andreyknvl@google.com> X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog Subject: [PATCH v2 30/37] kasan: define KASAN_GRANULE_SIZE for HW_TAGS From: Andrey Konovalov <andreyknvl@google.com> To: Dmitry Vyukov <dvyukov@google.com>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, kasan-dev@googlegroups.com Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>, Alexander Potapenko <glider@google.com>, Marco Elver <elver@google.com>, Evgenii Stepanov <eugenis@google.com>, Elena Petrova <lenaptr@google.com>, Branislav Rankov <Branislav.Rankov@arm.com>, Kevin Brodsky <kevin.brodsky@arm.com>, Will Deacon <will.deacon@arm.com>, Andrew Morton <akpm@linux-foundation.org>, 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-Rspamd-Queue-Id: AD4A51819E621 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 8b43fc163ed1..ba63d8a62968 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-helpers.h> +#define KASAN_GRANULE_SIZE (MTE_GRANULE_SIZE) +#endif + #define KASAN_GRANULE_MASK (KASAN_GRANULE_SIZE - 1) #define KASAN_TAG_KERNEL 0xFF /* native kernel pointers tag */